mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Replaced deprecated functions on OS X 10.9
This commit is contained in:
parent
b9f5f19f7c
commit
e33e061e96
@ -207,13 +207,12 @@ void WindowImplCocoa::setUpProcess(void)
|
|||||||
// Do it only once !
|
// Do it only once !
|
||||||
isTheProcessSetAsApplication = true;
|
isTheProcessSetAsApplication = true;
|
||||||
|
|
||||||
// Set the process as a normal application so it can get focus.
|
// Make sure NSApp is properly initialized
|
||||||
ProcessSerialNumber psn;
|
[SFApplication sharedApplication];
|
||||||
if (!GetCurrentProcess(&psn))
|
|
||||||
{
|
// Set the process as a normal application so it can get focus
|
||||||
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
|
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
|
||||||
SetFrontProcess(&psn);
|
[NSApp activateIgnoringOtherApps:YES];
|
||||||
}
|
|
||||||
|
|
||||||
// Register an application delegate if there is none
|
// Register an application delegate if there is none
|
||||||
if (![[SFApplication sharedApplication] delegate])
|
if (![[SFApplication sharedApplication] delegate])
|
||||||
|
Loading…
Reference in New Issue
Block a user