Fix for GLES on windowed rendering contexts (X11)

This commit is contained in:
vanfanel 2020-05-10 17:52:01 +02:00
parent f70ebeb2b3
commit fd02d88b59
1 changed files with 3 additions and 1 deletions

View File

@ -115,8 +115,10 @@ static void gfx_sdl_init(void) {
#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. */
SDL_DisplayMode sdl_displaymode;
SDL_GetCurrentDisplayMode(0, &sdl_displaymode);
wnd = SDL_CreateWindow("Super Mario 64 PC port (OpenGL_ES2)", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
0, 0, SDL_WINDOW_OPENGL | SDL_WINDOW_FULLSCREEN_DESKTOP);
sdl_displaymode.w, sdl_displaymode.h, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_FULLSCREEN_DESKTOP);
#endif
gfx_sdl_set_fullscreen(configFullscreen);