Fix exiting OpenMW via the window close button (regression)

actorid
scrawl 11 years ago
parent 4f35fd8184
commit c3d9bc31bb

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

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

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

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

Loading…
Cancel
Save