From b090a91650e192b4b8c3f0613005e0e392d6dcb0 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Mon, 29 Jul 2013 01:48:36 -0300 Subject: [PATCH] Fixed love.app opening in the background instead of the foreground in OS X --- platform/macosx/SDLMain.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/platform/macosx/SDLMain.m b/platform/macosx/SDLMain.m index a714f85ea..4adae7219 100644 --- a/platform/macosx/SDLMain.m +++ b/platform/macosx/SDLMain.m @@ -229,6 +229,15 @@ static void CustomApplicationMain (int argc, char **argv) if (!CPSSetFrontProcess(&PSN)) [SDLApplication sharedApplication]; } +#else + { + ProcessSerialNumber psn; + + if (!GetCurrentProcess(&psn)) { + TransformProcessType(&psn, kProcessTransformToForegroundApplication); + SetFrontProcess(&psn); + } + } #endif /* SDL_USE_CPS */ /* Set up the menubar */