2457 {
2458 try {
2461 window.loop();
2463 std::cerr << std::format(
"mxnetwork: Exception: {}\n", e.
text());
2464 return EXIT_FAILURE;
2466 std::cerr << std::format(
"mxvk: Exception: {}\n", e.
text());
2467 return EXIT_FAILURE;
2469 std::cerr << std::format(
"mxvk: Argument Exception: {}\n", e.
text());
2470 return EXIT_FAILURE;
2471 }
2472
2473 return EXIT_SUCCESS;
2474}
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.
TetrisWindow(const std::string &path, int width, int height, bool fullscreen, bool enable_vsync)
Lightweight exception wrapper for MXNetwork failures.
std::string text() const
Return the stored error text.
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).