From 0a4085a048ab896ea834bc72090b0545dd1c7fda Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sat, 21 May 2016 12:09:23 -0300 Subject: [PATCH] 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 | 2 +- src/video/cocoa/SDL_cocoakeyboard.m | 8 ++++---- src/video/cocoa/SDL_cocoamousetap.m | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/video/cocoa/SDL_cocoaclipboard.m b/src/video/cocoa/SDL_cocoaclipboard.m index f97dd2827..fd8680925 100644 --- a/src/video/cocoa/SDL_cocoaclipboard.m +++ b/src/video/cocoa/SDL_cocoaclipboard.m @@ -50,7 +50,7 @@ Cocoa_GetClipboardText(_THIS) 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; diff --git a/src/video/cocoa/SDL_cocoakeyboard.m b/src/video/cocoa/SDL_cocoakeyboard.m index 8c6f177d3..520aac153 100644 --- a/src/video/cocoa/SDL_cocoakeyboard.m +++ b/src/video/cocoa/SDL_cocoakeyboard.m @@ -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; diff --git a/src/video/cocoa/SDL_cocoamousetap.m b/src/video/cocoa/SDL_cocoamousetap.m index 2075e2c0f..48abbca9c 100644 --- a/src/video/cocoa/SDL_cocoamousetap.m +++ b/src/video/cocoa/SDL_cocoamousetap.m @@ -202,7 +202,7 @@ Cocoa_InitMouseEventTap(SDL_MouseData* driverdata) 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); }