1252 {
1253 try {
1256 window.loop();
1258 std::cerr << std::format(
"mxvk: Exception: {}\n", e.
text());
1259 return EXIT_FAILURE;
1261 std::cerr << std::format(
"mxvk: Argument Exception: {}\n", e.
text());
1262 return EXIT_FAILURE;
1263 } catch (const std::exception &e) {
1264 std::cerr << std::format("puzzle_drop: Exception: {}\n", e.what());
1265 return EXIT_FAILURE;
1266 }
1267 return EXIT_SUCCESS;
1268}
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.
PuzzleDropWindow(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).