Fix for GLES on windowed rendering contexts (X11)

master
vanfanel 2 years ago
parent f70ebeb2b3
commit fd02d88b59
  1. 4
      src/pc/gfx/gfx_sdl2.c

@ -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);

Loading…
Cancel
Save