Fixed resolution switch

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3956 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2009-08-29 20:31:46 +00:00
parent c42429b7d0
commit 79c34d17a5
2 changed files with 3 additions and 2 deletions

View File

@ -132,7 +132,6 @@ void reshowCurrentScreen()
// -----------------------------------------------------------------------------
Screen* getCurrentScreen()
{
assert(g_current_screen != NULL);
return g_current_screen;
}
// -----------------------------------------------------------------------------

View File

@ -415,7 +415,9 @@ void StateManager::eventCallback(Widget* widget, const std::string& name)
{
std::cout << "event!! " << name.c_str() << std::endl;
const std::string& screen_name = getCurrentScreen()->getName();
Screen* topScreen = getCurrentScreen();
if (topScreen == NULL) return;
const std::string& screen_name = topScreen->getName();
if( screen_name == "main.stkgui" )
menuEventMain(widget, name);