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.

This commit is contained in:
Alex Szpakowski 2016-05-21 12:09:23 -03:00
parent 4a468739f8
commit 0a4085a048
3 changed files with 6 additions and 6 deletions

View file

@ -50,7 +50,7 @@ Cocoa_GetClipboardText(_THIS)
char *text; char *text;
pasteboard = [NSPasteboard generalPasteboard]; pasteboard = [NSPasteboard generalPasteboard];
available = [pasteboard availableTypeFromArray: [NSArray arrayWithObject:format]]; available = [pasteboard availableTypeFromArray:[NSArray arrayWithObject:format]];
if ([available isEqualToString:format]) { if ([available isEqualToString:format]) {
NSString* string; NSString* string;
const char *utf8; const char *utf8;

View file

@ -94,7 +94,7 @@
- (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange; - (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange;
{ {
if ([aString isKindOfClass: [NSAttributedString class]]) { if ([aString isKindOfClass:[NSAttributedString class]]) {
aString = [aString string]; aString = [aString string];
} }
@ -142,10 +142,10 @@
aRange.location, aRange.length, windowHeight, aRange.location, aRange.length, windowHeight,
NSStringFromRect(rect)); NSStringFromRect(rect));
if ([[self window] respondsToSelector:@selector(convertRectToScreen:)]) { if ([window respondsToSelector:@selector(convertRectToScreen:)]) {
rect = [[self window] convertRectToScreen:rect]; rect = [window convertRectToScreen:rect];
} else { } else {
rect.origin = [[self window] convertBaseToScreen:rect.origin]; rect.origin = [window convertBaseToScreen:rect.origin];
} }
return rect; return rect;

View file

@ -202,7 +202,7 @@ Cocoa_InitMouseEventTap(SDL_MouseData* driverdata)
tapdata->runloopStartedSemaphore = SDL_CreateSemaphore(0); tapdata->runloopStartedSemaphore = SDL_CreateSemaphore(0);
if (tapdata->runloopStartedSemaphore) { 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) { if (!tapdata->thread) {
SDL_DestroySemaphore(tapdata->runloopStartedSemaphore); SDL_DestroySemaphore(tapdata->runloopStartedSemaphore);
} }