Usage
You must specify either
-f or -w flag when running the game. Running without options will display the help message.Options
Launch the game in fullscreen mode.This option sets the SDL video flags to include
SDL_FULLSCREEN, enabling native fullscreen display.Example:Technical details
Technical details
When fullscreen mode is enabled, the game:
- Saves the current monitor resolution using GLFW
- Generates a restoration script at
/tmp/restaurar_xrandr.sh - Stores display configuration including:
- Resolution of each connected output
- Position and layout of multiple monitors
- Primary display designation
- Restores the original configuration when the game exits
Launch the game in windowed mode.This option runs the game in a standard window without changing the desktop resolution.Example:
Display help message and exit.Shows usage information with available command-line options.
Display configuration
Resolution restoration
When the game runs in fullscreen mode (-f), it automatically:
- Saves current configuration - Uses GLFW to detect the primary monitor’s resolution, refresh rate, and uses
xrandrto capture multi-monitor layouts - Generates restoration script - Creates
/tmp/restaurar_xrandr.shwithxrandrcommands to restore the exact configuration - Restores on exit - Executes the restoration script when the game closes
The restoration process may take 1-2 seconds, especially with multiple monitors.
Multi-monitor support
The resolution restoration system supports:- Multiple connected displays
- Extended desktop layouts (relative positioning)
- Primary display designation
- Individual resolution and refresh rate per monitor
Requirements
The game checks forxrandr availability at startup in /usr/bin/xrandr or via the which command.
Exit codes
The game exits with status code0 on normal termination.
Implementation details
The command-line parsing is implemented insrc/main.c:166-179 using the standard getopt() function.
SDL flags
The game uses different SDL video flags based on the display mode: Windowed mode (-w):
-f):
Examples
See also
- Dependencies reference - Required libraries
- File structure - Project organization