From: <au...@us...> - 2010-01-02 16:29:01
|
Revision: 4384 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4384&view=rev Author: auria Date: 2010-01-02 16:28:55 +0000 (Sat, 02 Jan 2010) Log Message: ----------- Gracefully exit when closing window Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-01-02 02:11:15 UTC (rev 4383) +++ main/trunk/src/graphics/irr_driver.cpp 2010-01-02 16:28:55 UTC (rev 4384) @@ -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::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)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |