Mac: Fix a crash when SDL is compiled with SDL_MAC_NO_SANDBOX enabled, by increasing the stack size of the mouse tap thread back to OS X' default of 512 KB.
authorAlex Szpakowski <slime73@gmail.com>
Sat, 21 May 2016 12:09:23 -0300
changeset 10177 faa36f2de933
parent 10176 3115d38204aa
child 10179 7cbfd97f1430
Mac: Fix a crash when SDL is compiled with SDL_MAC_NO_SANDBOX enabled, by increasing the stack size of the mouse tap thread back to OS X' default of 512 KB.
src/video/cocoa/SDL_cocoaclipboard.m
src/video/cocoa/SDL_cocoakeyboard.m
src/video/cocoa/SDL_cocoamousetap.m
--- a/src/video/cocoa/SDL_cocoaclipboard.m	Sat May 21 00:20:52 2016 -0300
+++ b/src/video/cocoa/SDL_cocoaclipboard.m	Sat May 21 12:09:23 2016 -0300
@@ -50,7 +50,7 @@
     char *text;
 
     pasteboard = [NSPasteboard generalPasteboard];
-    available = [pasteboard availableTypeFromArray: [NSArray arrayWithObject:format]];
+    available = [pasteboard availableTypeFromArray:[NSArray arrayWithObject:format]];
     if ([available isEqualToString:format]) {
         NSString* string;
         const char *utf8;
--- a/src/video/cocoa/SDL_cocoakeyboard.m	Sat May 21 00:20:52 2016 -0300
+++ b/src/video/cocoa/SDL_cocoakeyboard.m	Sat May 21 12:09:23 2016 -0300
@@ -94,7 +94,7 @@
 
 - (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange;
 {
-    if ([aString isKindOfClass: [NSAttributedString class]]) {
+    if ([aString isKindOfClass:[NSAttributedString class]]) {
         aString = [aString string];
     }
 
@@ -142,10 +142,10 @@
             aRange.location, aRange.length, windowHeight,
             NSStringFromRect(rect));
 
-    if ([[self window] respondsToSelector:@selector(convertRectToScreen:)]) {
-        rect = [[self window] convertRectToScreen:rect];
+    if ([window respondsToSelector:@selector(convertRectToScreen:)]) {
+        rect = [window convertRectToScreen:rect];
     } else {
-        rect.origin = [[self window] convertBaseToScreen:rect.origin];
+        rect.origin = [window convertBaseToScreen:rect.origin];
     }
 
     return rect;
--- a/src/video/cocoa/SDL_cocoamousetap.m	Sat May 21 00:20:52 2016 -0300
+++ b/src/video/cocoa/SDL_cocoamousetap.m	Sat May 21 12:09:23 2016 -0300
@@ -202,7 +202,7 @@
 
     tapdata->runloopStartedSemaphore = SDL_CreateSemaphore(0);
     if (tapdata->runloopStartedSemaphore) {
-        tapdata->thread = SDL_CreateThreadInternal(&Cocoa_MouseTapThread, "Event Tap Loop", 64 * 1024, tapdata);
+        tapdata->thread = SDL_CreateThreadInternal(&Cocoa_MouseTapThread, "Event Tap Loop", 512 * 1024, tapdata);
         if (!tapdata->thread) {
             SDL_DestroySemaphore(tapdata->runloopStartedSemaphore);
         }