From 9cd2e9ec8fc0127393dfce9c0359d500c8c238be Mon Sep 17 00:00:00 2001
From: Edward Rudd <urkle@outoforder.cc>
Date: Tue, 09 Apr 2019 02:22:50 +0000
Subject: [PATCH] updae source to 2.0.9 source
---
source/src/video/cocoa/SDL_cocoavideo.m | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/source/src/video/cocoa/SDL_cocoavideo.m b/source/src/video/cocoa/SDL_cocoavideo.m
index 545dc1e..20bdfa7 100644
--- a/source/src/video/cocoa/SDL_cocoavideo.m
+++ b/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 */
--
Gitblit v1.9.3