wayland: Add a hint to disable video mode emulation under Wayland

Add the hint "SDL_VIDEO_WAYLAND_MODE_EMULATION", which can be used to disable mode emulation under Wayland. When disabled, only the desktop and/or native display resolution is exposed.
This commit is contained in:
Frank Praznik 2022-05-15 10:35:59 -04:00 committed by Sam Lantinga
parent e9d3dcea73
commit e1c8350439
2 changed files with 20 additions and 4 deletions

View file

@ -1508,6 +1508,21 @@ extern "C" {
*/
#define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
/**
* \brief A variable controlling whether video mode emulation is enabled under Wayland.
*
* When this hint is set, a standard set of emulated CVT video modes will be exposed for use by the application.
* If it is disabled, the only modes exposed will be the logical desktop size and, in the case of a scaled
* desktop, the native display resolution.
*
* This variable can be set to the following values:
* "0" - Video mode emulation is disabled.
* "1" - Video mode emulation is enabled.
*
* By default video mode emulation is enabled.
*/
#define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION "SDL_VIDEO_WAYLAND_MODE_EMULATION"
/**
* \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
*