From 01bdec16630954796f4f8c544683f397f865c1c5 Mon Sep 17 00:00:00 2001 From: SiliconExarch Date: Fri, 27 Aug 2021 10:03:29 +0100 Subject: [PATCH] Fix build with SDL <=2.0.3 SDL_GetGlobalMouseState was introduced in 2.0.4 --- neo/sys/glimp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neo/sys/glimp.cpp b/neo/sys/glimp.cpp index 95501dd3..a60ecf26 100644 --- a/neo/sys/glimp.cpp +++ b/neo/sys/glimp.cpp @@ -249,7 +249,11 @@ bool GLimp_Init(glimpParms_t parms) { // try to put the window on the display the mousecursor currently is on { int x, y; +#if SDL_VERSION_ATLEAST(2, 0, 4) SDL_GetGlobalMouseState(&x, &y); +#else + x = y = 0; +#endif int numDisplays = SDL_GetNumVideoDisplays(); for ( int j=0; j