mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-26 10:49:21 +00:00
[patch from Kelvin Delbarre] If you move the mouse cursor in and out of the
SheepShaver window a number of times (somewhere around 30 or 40 times will do it), SheepShaver appears to lock up. This occurs because SDL posts application activate/deactivate events to its event queue when the mouse moves in/out of the SheepShaver window, but these events are never consumed, and as a result, the event queue fills up. Thereafter, no new events can be posted, and user inputs are ignored. The fix is to consume SDL_ACTIVEEVENT in handle_events().
This commit is contained in:
parent
682853da42
commit
150a577e4e
@ -136,7 +136,7 @@ static SDL_Cursor *sdl_cursor; // Copy of Mac cursor
|
||||
static volatile bool cursor_changed = false; // Flag: cursor changed, redraw_func must update the cursor
|
||||
static SDL_Color sdl_palette[256]; // Color palette to be used as CLUT and gamma table
|
||||
static bool sdl_palette_changed = false; // Flag: Palette changed, redraw thread must set new colors
|
||||
static const int sdl_eventmask = SDL_MOUSEBUTTONDOWNMASK | SDL_MOUSEBUTTONUPMASK | SDL_MOUSEMOTIONMASK | SDL_KEYUPMASK | SDL_KEYDOWNMASK | SDL_VIDEOEXPOSEMASK | SDL_QUITMASK;
|
||||
static const int sdl_eventmask = SDL_MOUSEEVENTMASK | SDL_KEYEVENTMASK | SDL_VIDEOEXPOSEMASK | SDL_QUITMASK | SDL_ACTIVEEVENTMASK;
|
||||
|
||||
// Mutex to protect SDL events
|
||||
static SDL_mutex *sdl_events_lock = NULL;
|
||||
@ -1858,6 +1858,10 @@ static void handle_events(void)
|
||||
ADBKeyDown(0x7f); // Power key
|
||||
ADBKeyUp(0x7f);
|
||||
break;
|
||||
|
||||
// Application activate/deactivate; consume the event but otherwise ignore it
|
||||
case SDL_ACTIVEEVENT:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user