mirror of
https://github.com/libretro/scummvm.git
synced 2024-11-27 19:30:41 +00:00
Check if game engine is already paused before pausing it again to show virtual keyboard. Fixes #2912148
svn-id: r47231
This commit is contained in:
parent
27957570bf
commit
09a2694f6f
@ -139,10 +139,14 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
|
||||
if (_vk->isDisplaying()) {
|
||||
_vk->close(true);
|
||||
} else {
|
||||
if (g_engine)
|
||||
// Check if the engine is already paused before pausing it again
|
||||
// Fixes #2912148. Where opening the GMM and then the virtual keyboard
|
||||
// and then closing them left the game mute.
|
||||
bool enginePaused = g_engine ? g_engine->isPaused() : true;
|
||||
if (!enginePaused)
|
||||
g_engine->pauseEngine(true);
|
||||
_vk->show();
|
||||
if (g_engine)
|
||||
if (!enginePaused)
|
||||
g_engine->pauseEngine(false);
|
||||
result = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user