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:
parent
4f35fd8184
commit
c3d9bc31bb
4 changed files with 10 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
2
extern/sdl4ogre/events.h
vendored
2
extern/sdl4ogre/events.h
vendored
|
@ -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) {}
|
||||
};
|
||||
|
||||
|
|
3
extern/sdl4ogre/sdlinputwrapper.cpp
vendored
3
extern/sdl4ogre/sdlinputwrapper.cpp
vendored
|
@ -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…
Reference in a new issue