Gracefully exit when closing window

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4384 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-01-02 16:28:55 +00:00
parent d38d7f905f
commit 5c432893f3

View File

@ -33,14 +33,15 @@
#include "guiengine/engine.hpp"
#include "guiengine/modaldialog.hpp"
#include "guiengine/screen.hpp"
#include "states_screens/state_manager.hpp"
#include "io/file_manager.hpp"
#include "items/item_manager.hpp"
#include "items/powerup_manager.hpp"
#include "items/attachment_manager.hpp"
#include "items/projectile_manager.hpp"
#include "karts/kart_properties_manager.hpp"
#include "main_loop.hpp"
#include "modes/world.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/constants.hpp"
using namespace irr::core;
@ -687,7 +688,10 @@ void IrrDriver::displayFPS()
*/
void IrrDriver::update(float dt)
{
if(!m_device->run()) return;
if (!m_device->run())
{
main_loop->abort();
}
m_device->getVideoDriver()->beginScene(false, true, video::SColor(255,100,101,140));