mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 07:23:05 +00:00
KEYMAPPER: Make sure GuiManager only pops gui keymaps
This commit is contained in:
parent
a5082ffa5d
commit
56b5c0ea9f
@ -133,7 +133,15 @@ void GuiManager::pushKeymap() {
|
||||
}
|
||||
|
||||
void GuiManager::popKeymap() {
|
||||
_system->getEventManager()->getKeymapper()->popKeymap();
|
||||
Common::Keymapper *keymapper = _system->getEventManager()->getKeymapper();
|
||||
if (!keymapper->getActiveStack().empty()) {
|
||||
Common::Keymapper::MapRecord topKeymap = keymapper->getActiveStack().top();
|
||||
// TODO: Don't use the keymap name as a way to discriminate GUI maps
|
||||
if(topKeymap.keymap->getName().equals(Common::kGuiKeymapName))
|
||||
keymapper->popKeymap();
|
||||
else
|
||||
warning("An attempt to pop non-gui keymap %s was blocked", topKeymap.keymap->getName().c_str());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user