Fix build with SDL <=2.0.3

SDL_GetGlobalMouseState was introduced in 2.0.4
This commit is contained in:
SiliconExarch 2021-08-27 10:03:29 +01:00
parent 23a04633e4
commit 01bdec1663

View file

@ -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<numDisplays; ++j ) {