mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
(RPi) Fixed an issue where the window focus would sometimes get lost when returning from a game.
This commit is contained in:
parent
ea0d129e6d
commit
977ab5e683
|
@ -100,6 +100,14 @@ int launchGameUnix(const std::string& cmd_utf8, bool runInBackground)
|
|||
}
|
||||
|
||||
returnValue = pclose(commandPipe);
|
||||
|
||||
#if defined(_RPI_)
|
||||
// Hack to avoid that the application window occasionally loses focus when returning from
|
||||
// a game, which only seems to happen on the Raspberry Pi.
|
||||
SDL_Delay(50);
|
||||
SDL_SetWindowInputFocus(Renderer::getSDLWindow());
|
||||
#endif
|
||||
|
||||
// We need to shift the return value as it contains some flags (which we don't need).
|
||||
returnValue >>= 8;
|
||||
|
||||
|
|
Loading…
Reference in a new issue