From 2465c878441961e5d84e224436ad92c2b4b4da91 Mon Sep 17 00:00:00 2001 From: "C.W. Betts" Date: Mon, 23 Sep 2013 01:12:36 -0600 Subject: [PATCH 1/2] Fix overreleasing in Cocoa code --- BBGE/Cocoa.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BBGE/Cocoa.mm b/BBGE/Cocoa.mm index 102b2bc..6a90e74 100644 --- a/BBGE/Cocoa.mm +++ b/BBGE/Cocoa.mm @@ -11,10 +11,10 @@ void cocoaMessageBox(const std::string &title, const std::string &msg) { + @autoreleasepool { NSString *nstitle = [NSString stringWithUTF8String:title.c_str()]; NSString *nsmsg = [NSString stringWithUTF8String:msg.c_str()]; - NSRunAlertPanel(nstitle, nsmsg, @"OK", nil, nil); - [nsmsg release]; - [nstitle release]; + NSRunAlertPanel(nstitle, nsmsg, nil, nil, nil); + } } From e3063475777d2839c10769efefc21b9c1ba05e1c Mon Sep 17 00:00:00 2001 From: "C.W. Betts" Date: Mon, 23 Sep 2013 01:12:36 -0600 Subject: [PATCH 2/2] The released version of SDL2 (According to the OS X framework) replaced KMOD_META with KMOD_GUI. --- BBGE/Core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BBGE/Core.cpp b/BBGE/Core.cpp index 6afaf99..798dfdf 100644 --- a/BBGE/Core.cpp +++ b/BBGE/Core.cpp @@ -3558,7 +3558,7 @@ void Core::pollEvents() case SDL_KEYDOWN: { #if __APPLE__ - if ((event.key.keysym.sym == SDLK_q) && (event.key.keysym.mod & KMOD_META)) + if ((event.key.keysym.sym == SDLK_q) && (event.key.keysym.mod & KMOD_GUI)) #else if ((event.key.keysym.sym == SDLK_F4) && (event.key.keysym.mod & KMOD_ALT)) #endif