pressing 'escape' in input sensing mode will now behave as expected instead of crashing

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3557 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2009-05-30 20:47:03 +00:00
parent e066360e79
commit 42b965a254

View File

@ -378,7 +378,13 @@ namespace StateManager
void escapePressed()
{
if(g_game_mode)
if(input_manager->isInMode(InputManager::INPUT_SENSE_PREFER_AXIS) ||
input_manager->isInMode(InputManager::INPUT_SENSE_PREFER_BUTTON) )
{
getCurrentScreen()->dismissModalDialog();
input_manager->setMode(InputManager::MENU);
}
else if(g_game_mode)
{
resetAndGoToMenu("main.stkgui");
}