diff options
author | chai <chaifix@163.com> | 2019-01-31 18:38:35 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-01-31 18:38:35 +0800 |
commit | 2ec55fd974a63b705a4777c256d2222c874fa043 (patch) | |
tree | 48f1fea59ee9fc713a28a9aac3f05b98dc5ae66f /Source/3rdParty/SDL2/src/video/cocoa/SDL_cocoavideo.m | |
parent | c581dfbf1e849f393861d15e82aa6446c0c1c310 (diff) |
*SDL project
Diffstat (limited to 'Source/3rdParty/SDL2/src/video/cocoa/SDL_cocoavideo.m')
-rw-r--r-- | Source/3rdParty/SDL2/src/video/cocoa/SDL_cocoavideo.m | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/3rdParty/SDL2/src/video/cocoa/SDL_cocoavideo.m b/Source/3rdParty/SDL2/src/video/cocoa/SDL_cocoavideo.m index 545dc1e..20bdfa7 100644 --- a/Source/3rdParty/SDL2/src/video/cocoa/SDL_cocoavideo.m +++ b/Source/3rdParty/SDL2/src/video/cocoa/SDL_cocoavideo.m @@ -105,6 +105,7 @@ Cocoa_CreateDevice(int devindex) device->DestroyWindow = Cocoa_DestroyWindow; device->GetWindowWMInfo = Cocoa_GetWindowWMInfo; device->SetWindowHitTest = Cocoa_SetWindowHitTest; + device->AcceptDragAndDrop = Cocoa_AcceptDragAndDrop; device->shape_driver.CreateShaper = Cocoa_CreateShaper; device->shape_driver.SetWindowShape = Cocoa_SetWindowShape; @@ -174,15 +175,23 @@ Cocoa_VideoInit(_THIS) /* The IOPM assertion API can disable the screensaver as of 10.7. */ data->screensaver_use_iopm = floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6; + data->swaplock = SDL_CreateMutex(); + if (!data->swaplock) { + return -1; + } + return 0; } void Cocoa_VideoQuit(_THIS) { + SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; Cocoa_QuitModes(_this); Cocoa_QuitKeyboard(_this); Cocoa_QuitMouse(_this); + SDL_DestroyMutex(data->swaplock); + data->swaplock = NULL; } /* This function assumes that it's called from within an autorelease pool */ |