Feature #41 ยป 0039-sdl3-Replace-SDL_GetWindowDisplayMode-call-with-SDL_.patch
client/gui-sdl3/graphics.c | ||
---|---|---|
}
|
||
if (flags_in & SDL_WINDOW_FULLSCREEN) {
|
||
SDL_DisplayMode mode;
|
||
const SDL_DisplayMode *mode;
|
||
SDL_SetWindowFullscreen(main_data.screen, SDL_WINDOW_FULLSCREEN);
|
||
SDL_GetWindowDisplayMode(main_data.screen, &mode);
|
||
width = mode.w;
|
||
height = mode.h;
|
||
mode = SDL_GetWindowFullscreenMode(main_data.screen);
|
||
width = mode->w;
|
||
height = mode->h;
|
||
}
|
||
if (!create_surfaces(width, height)) {
|
client/gui-sdl3/gui_main.c | ||
---|---|---|
**************************************************************************/
|
||
static void fullscreen_callback(struct option *poption)
|
||
{
|
||
SDL_DisplayMode mode;
|
||
const SDL_DisplayMode *mode;
|
||
if (GUI_SDL_OPTION(fullscreen)) {
|
||
SDL_SetWindowFullscreen(main_data.screen, SDL_WINDOW_FULLSCREEN);
|
||
... | ... | |
SDL_SetWindowFullscreen(main_data.screen, 0);
|
||
}
|
||
SDL_GetWindowDisplayMode(main_data.screen, &mode);
|
||
mode = SDL_GetWindowFullscreenMode(main_data.screen);
|
||
if (!create_surfaces(mode.w, mode.h)) {
|
||
if (!create_surfaces(mode->w, mode->h)) {
|
||
/* Try to revert */
|
||
if (!GUI_SDL_OPTION(fullscreen)) {
|
||
SDL_SetWindowFullscreen(main_data.screen, SDL_WINDOW_FULLSCREEN);
|