diff --git a/src/sdlscreen.c b/src/sdlscreen.c index 92ac7e12..7ded3758 100644 --- a/src/sdlscreen.c +++ b/src/sdlscreen.c @@ -96,11 +96,19 @@ void Set_mode_SDL(int *width, int *height, int fullscreen) // Trick borrowed to Barrage (http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg737265.html) : // Showing the cursor but setting it to fully transparent allows us to get absolute mouse coordinates, // this means we can use tablet in fullscreen mode. - SDL_ShowCursor(1); // Hide the SDL mouse cursor, we use our own SDL_FreeCursor(cur); cur = SDL_CreateCursor(&cursorData, &cursorData, 1,1,0,0); - SDL_SetCursor(cur); + if (cur != NULL) + { + SDL_SetCursor(cur); + SDL_ShowCursor(SDL_ENABLE); // show the SDL 1 pixel transparent cursor + } + else + { + // failed to create the 1 pixel transparent cursor + SDL_ShowCursor(SDL_DISABLE); // Hide the SDL mouse cursor, we use our own internal one + } } #if (UPDATE_METHOD == UPDATE_METHOD_CUMULATED)