diff options
author | Fabio Battaglia | 2010-01-10 17:49:05 +0000 |
---|---|---|
committer | Fabio Battaglia | 2010-01-10 17:49:05 +0000 |
commit | 09a2694f6f197c4f54a7cb08ab2b4cfe6c677847 (patch) | |
tree | c729a5ffcff6b2d75acab85b8b8fd4f3f3c34118 /backends/events | |
parent | 27957570bf36283df8218e519009a85765bf090a (diff) | |
download | scummvm-rg350-09a2694f6f197c4f54a7cb08ab2b4cfe6c677847.tar.gz scummvm-rg350-09a2694f6f197c4f54a7cb08ab2b4cfe6c677847.tar.bz2 scummvm-rg350-09a2694f6f197c4f54a7cb08ab2b4cfe6c677847.zip |
Check if game engine is already paused before pausing it again to show virtual keyboard. Fixes #2912148
svn-id: r47231
Diffstat (limited to 'backends/events')
-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; } |