Mac and Linux SDL2 binary snapshots
Edward Rudd
2019-04-09 9cd2e9ec8fc0127393dfce9c0359d500c8c238be
source/src/video/cocoa/SDL_cocoavideo.m
@@ -105,6 +105,7 @@
    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 @@
    /* 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 */