Experimental use of the evil SDL_ShowCursor on windowed-Mac,

...hoping to solve the problem of invisible color cursor outside of
the window with this OS. This SDL function is buggy with Linux and
Windows, specially with fullscreen. So Mac users must check if it
solve the bug without causing others (check mouse speed, switch
fullscreen/color cursors)
This commit is contained in:
Ali El Gariani 2007-07-21 20:09:44 +00:00
parent 4e64de0f90
commit cda44453d0

View file

@ -168,6 +168,20 @@ void set(CURSOR_TYPE type)
const CURSOR_TYPE new_cursor = use_colour_cursors() && colour_ready ? cursor::NO_CURSOR : current_cursor;
#ifdef __APPLE__
// we use the evil SDL_ShowCursor because, on this OS,
// the transparent cursor trick works outside the
// window too, but this is not wanted since our color
// cursors can't work there
bool show = new_cursor != cursor::NO_CURSOR || preferences::fullscreen();
if (show != SDL_ShowCursor(SDL_QUERY))
SDL_ShowCursor(show);
if (!show)
return;
#endif
SDL_Cursor * cursor_image = get_cursor(new_cursor);
// cause problem on mac: