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:
parent
4e64de0f90
commit
cda44453d0
1 changed files with 14 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue