Fixed love.app opening in the background instead of the foreground in OS X

This commit is contained in:
Alex Szpakowski
2013-07-29 01:48:36 -03:00
parent e19ade38ab
commit b090a91650
+9
View File
@@ -229,6 +229,15 @@ static void CustomApplicationMain (int argc, char **argv)
if (!CPSSetFrontProcess(&PSN)) if (!CPSSetFrontProcess(&PSN))
[SDLApplication sharedApplication]; [SDLApplication sharedApplication];
} }
#else
{
ProcessSerialNumber psn;
if (!GetCurrentProcess(&psn)) {
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
SetFrontProcess(&psn);
}
}
#endif /* SDL_USE_CPS */ #endif /* SDL_USE_CPS */
/* Set up the menubar */ /* Set up the menubar */