2383 {
2384 try {
2387 window.loop();
2389 std::cerr << std::format(
"mxnetwork: Exception: {}\n", e.
text());
2390 return EXIT_FAILURE;
2392 std::cerr << std::format(
"mxvk: Exception: {}\n", e.
text());
2393 return EXIT_FAILURE;
2395 std::cerr << std::format(
"mxvk: Argument Exception: {}\n", e.
text());
2396 return EXIT_FAILURE;
2397 }
2398
2399 return EXIT_SUCCESS;
2400}
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).