2093 {
2094 try {
2097 window.loop();
2099 std::cerr << std::format(
"mxvk: Exception: {}\n", e.
text());
2100 return EXIT_FAILURE;
2102 std::cerr << std::format(
"mxvk: Argument Exception: {}\n", e.
text());
2103 return EXIT_FAILURE;
2104 } catch (const std::exception &e) {
2105 std::cerr << std::format("std::exception: {}\n", e.what());
2106 return EXIT_FAILURE;
2107 }
2108
2109 return EXIT_SUCCESS;
2110}
Arguments proc_args(int &argc, char **argv)
Parse standard libmx2 command-line options from main()'s argv.
Exception thrown by Argz::proc() on unrecognised or malformed options.
PongWindow(const std::string &path, int width, int height, bool fullscreen, bool enable_vsync)
Plain data structure returned by proc_args() with all common libmx2 CLI options.
bool fullscreen
Whether fullscreen mode was requested.
bool enable_vsync
Enable FIFO present mode / v-sync (--enable-vsync).
int height
Viewport height in pixels (default: 720).
std::string path
Asset root; proc_args() defaults it to the executable directory.
int width
Viewport width in pixels (default: 1280).