1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 15:29:55 +00:00

Fix exiting OpenMW via the window close button (regression)

This commit is contained in:
scrawl 2013-11-05 03:02:28 +01:00
parent 4f35fd8184
commit c3d9bc31bb
4 changed files with 10 additions and 1 deletions

View file

@ -641,6 +641,11 @@ namespace MWInput
mOgre.windowResized(x,y);
}
void InputManager::windowClosed()
{
MWBase::Environment::setRequestExit();
}
void InputManager::toggleMainMenu()
{
if (MyGUI::InputManager::getInstance ().isModalAny())

View file

@ -97,6 +97,7 @@ namespace MWInput
virtual void windowVisibilityChange( bool visible );
virtual void windowFocusChange( bool have_focus );
virtual void windowResized (int x, int y);
virtual void windowClosed ();
virtual void channelChanged(ICS::Channel* channel, float currentValue, float previousValue);

View file

@ -70,6 +70,8 @@ public:
/** @remarks The window got / lost input focus */
virtual void windowFocusChange( bool have_focus ) {}
virtual void windowClosed () {}
virtual void windowResized (int x, int y) {}
};

View file

@ -103,7 +103,8 @@ namespace SFO
handleWindowEvent(evt);
break;
case SDL_QUIT:
Ogre::Root::getSingleton().queueEndRendering();
if (mWindowListener)
mWindowListener->windowClosed();
break;
default:
std::cerr << "Unhandled SDL event of type " << evt.type << std::endl;