From a2b597577f0caaa97285632cc5044e24833a1851 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 23 Nov 2025 14:50:51 +0500 Subject: [PATCH] engine: platform: sdl2: do not hide X11 hints under any platform macro --- engine/platform/sdl2/vid_sdl2.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/engine/platform/sdl2/vid_sdl2.c b/engine/platform/sdl2/vid_sdl2.c index a233931e..7633221b 100644 --- a/engine/platform/sdl2/vid_sdl2.c +++ b/engine/platform/sdl2/vid_sdl2.c @@ -910,15 +910,18 @@ qboolean R_Init_Video( const int type ) #endif if( Sys_CheckParm( "-egl" ) ) + { + // EGL doesn't mean we want GLES context + // so force it only on Windows, where GL is usually created via WGL #if XASH_WIN32 - SDL_SetHint( "SDL_OPENGL_ES_DRIVER", "1" ); -#else - SDL_SetHint( "SDL_VIDEO_X11_FORCE_EGL", "1" ); + SDL_SetHint( SDL_HINT_OPENGL_ES_DRIVER, "1" ); +#endif // XASH_WIN32 - SDL_SetHint( "SDL_VIDEO_X11_XRANDR", "1" ); - SDL_SetHint( "SDL_VIDEO_X11_XVIDMODE", "1" ); -#endif // !XASH_WIN32 + SDL_SetHint( SDL_HINT_VIDEO_X11_FORCE_EGL, "1" ); + } + SDL_SetHint( SDL_HINT_VIDEO_X11_XRANDR, "1" ); + SDL_SetHint( SDL_HINT_VIDEO_X11_XVIDMODE, "1" ); switch( type ) {