mirror of
https://github.com/yawut/SDL.git
synced 2026-09-07 08:36:19 -05:00
Cocoa_ShowMessageBox() should call Cocoa_RegisterApp().
Otherwise, message boxes can fail if SDL_Init(SDL_INIT_VIDEO) wasn't completed.
This commit is contained in:
@@ -156,6 +156,7 @@ CreateApplicationMenus(void)
|
||||
void
|
||||
Cocoa_RegisterApp(void)
|
||||
{
|
||||
/* This can get called more than once! Be careful what you initialize! */
|
||||
ProcessSerialNumber psn;
|
||||
NSAutoreleasePool *pool;
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user