mirror of https://github.com/libsdl-org/SDL.git
wayland: make sure the desktop mode is in the fullscreen mode list
Fixes https://github.com/libsdl-org/SDL/issues/12079
This commit is contained in:
parent
ab5cb707a6
commit
4c6d949e6d
|
|
@ -1025,6 +1025,10 @@ static void display_handle_done(void *data,
|
||||||
// Expose the unscaled, native resolution if the scale is 1.0 or viewports are available...
|
// Expose the unscaled, native resolution if the scale is 1.0 or viewports are available...
|
||||||
if (internal->scale_factor == 1.0 || video->viewporter) {
|
if (internal->scale_factor == 1.0 || video->viewporter) {
|
||||||
SDL_AddFullscreenDisplayMode(dpy, &native_mode);
|
SDL_AddFullscreenDisplayMode(dpy, &native_mode);
|
||||||
|
if (native_mode.w != desktop_mode.w ||
|
||||||
|
native_mode.h != desktop_mode.h) {
|
||||||
|
SDL_AddFullscreenDisplayMode(dpy, &desktop_mode);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// ...otherwise expose the integer scaled variants of the desktop resolution down to 1.
|
// ...otherwise expose the integer scaled variants of the desktop resolution down to 1.
|
||||||
int i;
|
int i;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue