SDL: Make non-Mac fullscreen cursor visible

Issue: https://github.com/cebix/macemu/issues/26

On non-Mac platforms, driver_fullscreen constructor sets up software cursor,
but switch_to_current_mode() ask for a hardware cursor, possibly due to a typo.
Neither one ends up being drawn, so the cursor goes invisible.

This change makes them agree to use a software cursor. We should eventually
move to just one place deciding which cursor to use, so they don't have to be
kept in sync.
This commit is contained in:
Dave Vasilevsky 2013-04-22 01:58:05 -04:00
parent 2fb9487933
commit 02d844c6a7

View File

@ -1537,13 +1537,13 @@ void SDL_monitor_desc::switch_to_current_mode(void)
#ifdef SHEEPSHAVER #ifdef SHEEPSHAVER
bool video_can_change_cursor(void) bool video_can_change_cursor(void)
{ {
if (display_type != DISPLAY_WINDOW)
return false;
#if defined(__APPLE__) #if defined(__APPLE__)
static char driver[] = "Quartz?"; static char driver[] = "Quartz?";
static int quartzok = -1; static int quartzok = -1;
if (display_type != DISPLAY_WINDOW)
return false;
if (quartzok < 0) { if (quartzok < 0) {
if (SDL_VideoDriverName(driver, sizeof driver) == NULL || strncmp(driver, "Quartz", sizeof driver)) if (SDL_VideoDriverName(driver, sizeof driver) == NULL || strncmp(driver, "Quartz", sizeof driver))
quartzok = true; quartzok = true;