Cocoa_ShowMessageBox() should call Cocoa_RegisterApp().
Otherwise, message boxes can fail if SDL_Init(SDL_INIT_VIDEO) wasn't completed.
--- a/src/video/cocoa/SDL_cocoaevents.m Fri Nov 02 15:22:37 2012 -0400
+++ b/src/video/cocoa/SDL_cocoaevents.m Fri Nov 02 16:48:47 2012 -0400
@@ -156,6 +156,7 @@
void
Cocoa_RegisterApp(void)
{
+ /* This can get called more than once! Be careful what you initialize! */
ProcessSerialNumber psn;
NSAutoreleasePool *pool;
--- a/src/video/cocoa/SDL_cocoamessagebox.m Fri Nov 02 15:22:37 2012 -0400
+++ b/src/video/cocoa/SDL_cocoamessagebox.m Fri Nov 02 16:48:47 2012 -0400
@@ -37,6 +37,8 @@
int
Cocoa_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
{
+ Cocoa_RegisterApp();
+
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSAlert* alert = [[NSAlert alloc] init];