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
Sat, 21 May 2016 12:09:23 -0300
changeset 10177faa36f2de933
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
     1.1 --- a/src/video/cocoa/SDL_cocoaclipboard.m	Sat May 21 00:20:52 2016 -0300
     1.2 +++ b/src/video/cocoa/SDL_cocoaclipboard.m	Sat May 21 12:09:23 2016 -0300
     1.3 @@ -50,7 +50,7 @@
     1.4      char *text;
     1.5  
     1.6      pasteboard = [NSPasteboard generalPasteboard];
     1.7 -    available = [pasteboard availableTypeFromArray: [NSArray arrayWithObject:format]];
     1.8 +    available = [pasteboard availableTypeFromArray:[NSArray arrayWithObject:format]];
     1.9      if ([available isEqualToString:format]) {
    1.10          NSString* string;
    1.11          const char *utf8;
     2.1 --- a/src/video/cocoa/SDL_cocoakeyboard.m	Sat May 21 00:20:52 2016 -0300
     2.2 +++ b/src/video/cocoa/SDL_cocoakeyboard.m	Sat May 21 12:09:23 2016 -0300
     2.3 @@ -94,7 +94,7 @@
     2.4  
     2.5  - (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange;
     2.6  {
     2.7 -    if ([aString isKindOfClass: [NSAttributedString class]]) {
     2.8 +    if ([aString isKindOfClass:[NSAttributedString class]]) {
     2.9          aString = [aString string];
    2.10      }
    2.11  
    2.12 @@ -142,10 +142,10 @@
    2.13              aRange.location, aRange.length, windowHeight,
    2.14              NSStringFromRect(rect));
    2.15  
    2.16 -    if ([[self window] respondsToSelector:@selector(convertRectToScreen:)]) {
    2.17 -        rect = [[self window] convertRectToScreen:rect];
    2.18 +    if ([window respondsToSelector:@selector(convertRectToScreen:)]) {
    2.19 +        rect = [window convertRectToScreen:rect];
    2.20      } else {
    2.21 -        rect.origin = [[self window] convertBaseToScreen:rect.origin];
    2.22 +        rect.origin = [window convertBaseToScreen:rect.origin];
    2.23      }
    2.24  
    2.25      return rect;
     3.1 --- a/src/video/cocoa/SDL_cocoamousetap.m	Sat May 21 00:20:52 2016 -0300
     3.2 +++ b/src/video/cocoa/SDL_cocoamousetap.m	Sat May 21 12:09:23 2016 -0300
     3.3 @@ -202,7 +202,7 @@
     3.4  
     3.5      tapdata->runloopStartedSemaphore = SDL_CreateSemaphore(0);
     3.6      if (tapdata->runloopStartedSemaphore) {
     3.7 -        tapdata->thread = SDL_CreateThreadInternal(&Cocoa_MouseTapThread, "Event Tap Loop", 64 * 1024, tapdata);
     3.8 +        tapdata->thread = SDL_CreateThreadInternal(&Cocoa_MouseTapThread, "Event Tap Loop", 512 * 1024, tapdata);
     3.9          if (!tapdata->thread) {
    3.10              SDL_DestroySemaphore(tapdata->runloopStartedSemaphore);
    3.11          }