From 8b9a4ab8e4058dc38a9a14c77f17f115f0fd0bc6 Mon Sep 17 00:00:00 2001 From: atsb Date: Sat, 17 Aug 2024 07:21:51 +0200 Subject: [PATCH] SDL3: Changes for latest master https://github.com/yquake2/ref_gl4/commit/82e397ae92eeaa6a5a890150eb4196ca043afca8 --- src/client/refresh/gl4/gl4_sdl.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/client/refresh/gl4/gl4_sdl.c b/src/client/refresh/gl4/gl4_sdl.c index 10059c66..42c93fc0 100644 --- a/src/client/refresh/gl4/gl4_sdl.c +++ b/src/client/refresh/gl4/gl4_sdl.c @@ -438,7 +438,11 @@ void GL4_ShutdownContext() { if(context) { - SDL_GL_DeleteContext(context); +#ifdef USE_SDL3 + SDL_GL_DestroyContext(context); +#else + SDL_GL_DeleteContext(context); +#endif context = NULL; } } @@ -452,12 +456,13 @@ void GL4_ShutdownContext() int GL4_GetSDLVersion() { #ifdef USE_SDL3 - SDL_Version ver; + int ver = SDL_GetVersion(); + + return ver; #else SDL_version ver; -#endif - SDL_VERSION(&ver); return ver.major; +#endif }