From 12434a79b1e21ba20e01f01f7f04f3708db1c031 Mon Sep 17 00:00:00 2001 From: vanfanel Date: Sun, 10 May 2020 15:41:46 +0200 Subject: [PATCH] Use the system video mode in GLES platforms instead of setting a new one. --- src/pc/gfx/gfx_sdl2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pc/gfx/gfx_sdl2.c b/src/pc/gfx/gfx_sdl2.c index fb7f6a07..e85412f1 100644 --- a/src/pc/gfx/gfx_sdl2.c +++ b/src/pc/gfx/gfx_sdl2.c @@ -113,8 +113,10 @@ static void gfx_sdl_init(void) { wnd = SDL_CreateWindow("Super Mario 64 PC port (OpenGL)", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, DESIRED_SCREEN_WIDTH, DESIRED_SCREEN_HEIGHT, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE); #else + /* GLES platforms generally run without a window server like Xorg. Just use the system video mode, + instead of trying to set a new video mode, which does not make any sense in modern displays. */ wnd = SDL_CreateWindow("Super Mario 64 PC port (OpenGL_ES2)", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, - DESIRED_SCREEN_WIDTH, DESIRED_SCREEN_HEIGHT, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE); + 0, 0, SDL_WINDOW_OPENGL | SDL_WINDOW_FULLSCREEN_DESKTOP); #endif gfx_sdl_set_fullscreen(configFullscreen);