1603 {
1604 try {
1607 if (!explicit_resolution) {
1610 }
1611
1613 window.loop();
1615 std::cerr << std::format(
"mxvk: Exception: {}\n", e.
text());
1616 return EXIT_FAILURE;
1618 std::cerr << std::format(
"mxvk: Argument Exception: {}\n", e.
text());
1619 return EXIT_FAILURE;
1620 }
1621
1622 return EXIT_SUCCESS;
1623}
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.
bool hasResolutionArgument(int argc, char **argv)
constexpr int base_height
Plain data structure returned by proc_args() with all common libmx2 CLI options.
FramebufferDimensions framebuffer
Software framebuffer size requested by --framebuffer.
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).