forked from mirror/openmw-tes3mp
Merge remote-tracking branch 'scrawl/windowclosefix'
This commit is contained in:
commit
245d7b0ae4
4 changed files with 10 additions and 1 deletions
|
@ -641,6 +641,11 @@ namespace MWInput
|
||||||
mOgre.windowResized(x,y);
|
mOgre.windowResized(x,y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InputManager::windowClosed()
|
||||||
|
{
|
||||||
|
MWBase::Environment::setRequestExit();
|
||||||
|
}
|
||||||
|
|
||||||
void InputManager::toggleMainMenu()
|
void InputManager::toggleMainMenu()
|
||||||
{
|
{
|
||||||
if (MyGUI::InputManager::getInstance ().isModalAny())
|
if (MyGUI::InputManager::getInstance ().isModalAny())
|
||||||
|
|
|
@ -97,6 +97,7 @@ namespace MWInput
|
||||||
virtual void windowVisibilityChange( bool visible );
|
virtual void windowVisibilityChange( bool visible );
|
||||||
virtual void windowFocusChange( bool have_focus );
|
virtual void windowFocusChange( bool have_focus );
|
||||||
virtual void windowResized (int x, int y);
|
virtual void windowResized (int x, int y);
|
||||||
|
virtual void windowClosed ();
|
||||||
|
|
||||||
virtual void channelChanged(ICS::Channel* channel, float currentValue, float previousValue);
|
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 */
|
/** @remarks The window got / lost input focus */
|
||||||
virtual void windowFocusChange( bool have_focus ) {}
|
virtual void windowFocusChange( bool have_focus ) {}
|
||||||
|
|
||||||
|
virtual void windowClosed () {}
|
||||||
|
|
||||||
virtual void windowResized (int x, int y) {}
|
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);
|
handleWindowEvent(evt);
|
||||||
break;
|
break;
|
||||||
case SDL_QUIT:
|
case SDL_QUIT:
|
||||||
Ogre::Root::getSingleton().queueEndRendering();
|
if (mWindowListener)
|
||||||
|
mWindowListener->windowClosed();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
std::cerr << "Unhandled SDL event of type " << evt.type << std::endl;
|
std::cerr << "Unhandled SDL event of type " << evt.type << std::endl;
|
||||||
|
|
Loading…
Reference in a new issue