SDL/src
Sam Lantinga d48c97c4a4 Fixed bug 5147 - KMSDRM: SetWindowFullscreen() failing with SDL_WINDOW_FULLSCREEN_DESKTOP
Manuel Alfayate Corchete

This patch is needed so programs that do this work as expected:
1) Start in a different video mode than the mode used by the system and then...
2) Try to go fullscreen with the mode originally used by the system via SetWindowFullScreen() with the SDL_WINDOW_FULLSCREEN_DESKTOP flag.

An example would be pt2-clone in https://github.com/8bitbubsy/pt2-clone.
This program does this:

Starts with:

video.window = SDL_CreateWindow("", SDL_WINDOWPOS_CENTERED,
    SDL_WINDOWPOS_CENTERED, screenW, screenH, windowFlags);


and then, *IF* the user has configured it in fullscreen mode in its .ini, it tries to go fullscreen with the desktop mode:

SDL_SetWindowFullscreen(video.window, SDL_WINDOW_FULLSCREEN_DESKTOP);


This sequence of operations is currently failing because SDL_SetDisplayModeForDisplay() in SDL_video.c fails because display->desktop_mode is not being initialized with its correct value: SetDisplayMode() in SDL_kmsdrmvideo.c will not be able to set the mode because it detects the mode to have a driverdata of 0x0 ("if (!modedata)") and rightfully returns an error.

So, the included patch fixes this small problem, and programs that first change the video mode and then try to go fullscreen with the system video mode will now work.
The patch simply fixes an small omission, but its really needed now that dynamic video mode changing was implemented on the KMSDRM backend.
2020-06-02 16:57:20 -07:00
..
atomic Add basic support for compiling on RISC OS 2020-02-13 20:50:47 +00:00
audio windows: Fix calls to CoCreateInstance() so last parameter is a LPVOID *. 2020-05-20 16:58:33 -04:00
core Getting closer. 2020-05-26 13:19:48 -07:00
cpuinfo Improved CPU detection on ARM platforms 2020-02-04 16:46:22 +00:00
dynapi locale: Implemented SDL_GetPreferredLocales(). 2020-05-04 02:27:29 -04:00
events If there isn't a GetGlobalMouseState() implementation, fall back to the normal one. 2020-05-26 16:34:50 -07:00
file Fixed compile warning 2020-02-10 13:59:05 -08:00
filesystem Added SDL_log.h to SDL_internal.h so logging is available everywhere 2020-04-07 09:38:57 -07:00
haptic Fixed building with --disable-joystick on Linux 2020-05-27 10:27:04 -07:00
hidapi hid: Add Microsoft Precision Mouse to the joystick blacklist. 2020-05-06 03:18:25 -04:00
joystick Fixed bug 5155 - HIDAPI_JoystickDisconnected incorrect array shift 2020-05-29 21:22:11 -07:00
libm Fixed compiler warning 2020-01-29 20:09:16 -08:00
loadso Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
locale locale: Removed unused variable. 2020-05-21 04:01:37 -04:00
main locale: Implemented SDL_GetPreferredLocales(). 2020-05-04 02:27:29 -04:00
power Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
render Fixed iOS build 2020-05-26 13:54:47 -07:00
sensor sensor: Fixed compiler warnings on mingw64. 2020-05-21 03:52:48 -04:00
stdlib Fixed compiler warning building on FreeBSD 2020-05-27 09:22:12 -07:00
test Fix some format specifier warnings 2020-03-25 01:34:15 -04:00
thread More Linux fixes. 2020-05-26 13:19:44 -07:00
timer Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
video Fixed bug 5147 - KMSDRM: SetWindowFullscreen() failing with SDL_WINDOW_FULLSCREEN_DESKTOP 2020-06-02 16:57:20 -07:00
SDL.c Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
SDL_assert.c Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
SDL_assert_c.h Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
SDL_dataqueue.c Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
SDL_dataqueue.h Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
SDL_error.c SDL_error: simplified error string management. 2020-04-21 01:30:36 -04:00
SDL_error_c.h SDL_error: simplified error string management. 2020-04-21 01:30:36 -04:00
SDL_hints.c Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
SDL_hints_c.h Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
SDL_internal.h Added SDL_log.h to SDL_internal.h so logging is available everywhere 2020-04-07 09:38:57 -07:00
SDL_log.c Updated copyright date for 2020 2020-01-16 20:49:25 -08:00