mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 16:15:39 +00:00
Fixed an issue where the screensaver would start immediately after returning from a game.
This commit is contained in:
parent
5e5da8c52f
commit
fb38cf9248
|
@ -545,15 +545,23 @@ void FileData::launchGame(Window* window)
|
||||||
Utils::String::toUpper(std::to_string(returnValue) + ")"), 6000);
|
Utils::String::toUpper(std::to_string(returnValue) + ")"), 6000);
|
||||||
window->setInfoPopup(s);
|
window->setInfoPopup(s);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
// This code is only needed for Windows, where we may need to keep ES running while
|
// This code is only needed for Windows, where we may need to keep ES running while
|
||||||
// the game/emulator is in use. It's basically used to pause any playing game video
|
// the game/emulator is in use. It's basically used to pause any playing game video
|
||||||
// and to keep the screensaver from activating.
|
// and to keep the screensaver from activating.
|
||||||
else {
|
|
||||||
if (Settings::getInstance()->getBool("RunInBackground"))
|
if (Settings::getInstance()->getBool("RunInBackground"))
|
||||||
window->setLaunchedGame();
|
window->setLaunchedGame();
|
||||||
}
|
else
|
||||||
|
// Normalize deltaTime so that the screensaver does not start immediately
|
||||||
|
// when returning from the game.
|
||||||
|
window->normalizeNextUpdate();
|
||||||
|
#else
|
||||||
|
// Normalize deltaTime so that the screensaver does not start immediately
|
||||||
|
// when returning from the game.
|
||||||
|
window->normalizeNextUpdate();
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
Scripting::fireEvent("game-end");
|
Scripting::fireEvent("game-end");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue