#include "mxvk/argz.hpp"
#include "mxvk/mxvk.hpp"
#include "mxvk/mxvk_exception.hpp"
#include <SDL3/SDL.h>
#include <cstdint>
#include <format>
#include <iostream>
#include <memory>
#include <random>
Go to the source code of this file.
|
| int | main (int argc, char **argv) |
◆ main()
| int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 105 of file surface.cpp.
105 {
106 try {
109 window.loop();
111 std::cerr << std::format(
"mxvk: Exception: {}\n", e.
text());
112 return EXIT_FAILURE;
114 std::cerr << std::format(
"mxvk: Argument Exception: {}\n", e.
text());
115 return EXIT_FAILURE;
116 }
117 return EXIT_SUCCESS;
118}
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.
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 filename
Optional input filename (--filename).
int width
Viewport width in pixels (default: 1280).