mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Mac: Fixed crash when returning from a fullscreen Space on shutdown.
This commit is contained in:
parent
70cebc7d43
commit
39bad809c3
@ -565,6 +565,10 @@ void
|
|||||||
Cocoa_HandleKeyEvent(_THIS, NSEvent *event)
|
Cocoa_HandleKeyEvent(_THIS, NSEvent *event)
|
||||||
{
|
{
|
||||||
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
|
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
|
||||||
|
if (!data) {
|
||||||
|
return; /* can happen when returning from fullscreen Space on shutdown */
|
||||||
|
}
|
||||||
|
|
||||||
unsigned short scancode = [event keyCode];
|
unsigned short scancode = [event keyCode];
|
||||||
SDL_Scancode code;
|
SDL_Scancode code;
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -349,8 +349,11 @@ Cocoa_HandleMouseEvent(_THIS, NSEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SDL_Mouse *mouse = SDL_GetMouse();
|
SDL_Mouse *mouse = SDL_GetMouse();
|
||||||
|
|
||||||
SDL_MouseData *driverdata = (SDL_MouseData*)mouse->driverdata;
|
SDL_MouseData *driverdata = (SDL_MouseData*)mouse->driverdata;
|
||||||
|
if (!driverdata) {
|
||||||
|
return; /* can happen when returning from fullscreen Space on shutdown */
|
||||||
|
}
|
||||||
|
|
||||||
const SDL_bool seenWarp = driverdata->seenWarp;
|
const SDL_bool seenWarp = driverdata->seenWarp;
|
||||||
driverdata->seenWarp = NO;
|
driverdata->seenWarp = NO;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user