| | |
| | | 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; |
| | |
| | | /* 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 */ |