From 9bc9b5e783467434d065a77fa4eb8cd8c38f15d2 Mon Sep 17 00:00:00 2001 From: Bruno Van de Velde Date: Wed, 17 Jul 2024 20:24:19 +0200 Subject: [PATCH] Last SDL3 fix broke building with SDL2 --- src/Backend/Renderer/SDL_Renderer/BackendRenderTargetSDL.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Backend/Renderer/SDL_Renderer/BackendRenderTargetSDL.cpp b/src/Backend/Renderer/SDL_Renderer/BackendRenderTargetSDL.cpp index 41f572174..5e95c8759 100644 --- a/src/Backend/Renderer/SDL_Renderer/BackendRenderTargetSDL.cpp +++ b/src/Backend/Renderer/SDL_Renderer/BackendRenderTargetSDL.cpp @@ -78,7 +78,12 @@ namespace tgui return; // Store the current blend mode, in case we need to change it +#if SDL_MAJOR_VERSION >= 3 SDL_BlendMode oldBlendMode = SDL_GetRenderDrawBlendMode(m_renderer); +#else + SDL_BlendMode oldBlendMode = SDL_BLENDMODE_BLEND; + SDL_GetRenderDrawBlendMode(m_renderer, &oldBlendMode); +#endif // Store the current clipping settings, in case we need to change it SDL_Rect oldClipRect;