Fix flashing window not working with newer SDL versions

Minimum SDL version 2.0.16 is required for `SDL_FlashWindow`. The SDL version schema changes after version 2.0.22 to 2.24.0 etc. (minor version is used instead of patchlevel) which was causing the condition that checks for minimum version 2.0.16 to not work correctly with newer SDL versions.

Closes #6687.
This commit is contained in:
Robert Müller 2023-05-29 19:36:33 +02:00
parent 6c7f6a4494
commit d0333f10b0

View file

@ -1603,7 +1603,8 @@ void CGraphicsBackend_SDL_GL::GetViewportSize(int &w, int &h)
void CGraphicsBackend_SDL_GL::NotifyWindow()
{
#if SDL_MAJOR_VERSION > 2 || (SDL_MAJOR_VERSION == 2 && SDL_PATCHLEVEL >= 16)
// Minimum version 2.0.16, after version 2.0.22 the naming is changed to 2.24.0 etc.
#if SDL_MAJOR_VERSION > 2 || (SDL_MAJOR_VERSION == 2 && SDL_MINOR_VERSION == 0 && SDL_PATCHLEVEL >= 16) || (SDL_MAJOR_VERSION == 2 && SDL_MINOR_VERSION > 0)
if(SDL_FlashWindow(m_pWindow, SDL_FlashOperation::SDL_FLASH_UNTIL_FOCUSED) != 0)
{
// fails if SDL hasn't implemented it