Hi, are there equivalent MacOSX API calls to GetActiveWindow and GetForegroundWindow?
On PC, I use GetActiveWindow as soon as my game's graphics window is created to obtain a Window handle that I then use with other API calls such as GetForegroundWindow.
I use GetForegroundWindow to detect if the App has been suspended so that I can pause it. I normally use PeekEvent to capture EVENT_APPSUSPEND however, this doesn't work if a game is loading and the user clicks on some other app or the desktop meanwhile. When the game finishes loading, there is no EVENT_APPSUSPEND to process which I why I'm checking it with an API call to GetForegroundWindow.
If anyone can help with these I'd be very grateful, thanks!
On PC, I use GetActiveWindow as soon as my game's graphics window is created to obtain a Window handle that I then use with other API calls such as GetForegroundWindow.
I use GetForegroundWindow to detect if the App has been suspended so that I can pause it. I normally use PeekEvent to capture EVENT_APPSUSPEND however, this doesn't work if a game is loading and the user clicks on some other app or the desktop meanwhile. When the game finishes loading, there is no EVENT_APPSUSPEND to process which I why I'm checking it with an API call to GetForegroundWindow.
If anyone can help with these I'd be very grateful, thanks!