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:
Fabio Battaglia 2010-01-10 17:49:05 +00:00
parent 27957570bf
commit 09a2694f6f

View File

@ -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;
}