diff options
Diffstat (limited to 'backends/events/default/default-events.cpp')
-rw-r--r-- | backends/events/default/default-events.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp index 8b3fe5cdc4..ee3cfe7ce9 100644 --- a/backends/events/default/default-events.cpp +++ b/backends/events/default/default-events.cpp @@ -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; } |