diff options
author | krzys-h <krzys_h@interia.pl> | 2014-10-25 18:34:29 +0200 |
---|---|---|
committer | krzys-h <krzys_h@interia.pl> | 2014-10-25 18:34:29 +0200 |
commit | 26376c652d59de271147027bb5c365b22c2765c2 (patch) | |
tree | 6a135bcd74cced6e7ed1384b00e991f11d6091c5 /src/app/app.cpp | |
parent | c9eb3ce5c57e48af52f0798bff0aa7c42448d154 (diff) | |
download | colobot-26376c652d59de271147027bb5c365b22c2765c2.tar.gz colobot-26376c652d59de271147027bb5c365b22c2765c2.tar.bz2 colobot-26376c652d59de271147027bb5c365b22c2765c2.zip |
Nothing else works, so restart the game on resolution change
Fixes #339 for now, but we'll need alternative solution later
Diffstat (limited to 'src/app/app.cpp')
-rw-r--r-- | src/app/app.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp index 1b53a28..ea54cf1 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -113,6 +113,7 @@ CApplication::CApplication() m_exitCode = 0; m_active = false; m_debugModes = 0; + m_restart = false; m_windowTitle = "COLOBOT: Gold Edition"; @@ -675,6 +676,17 @@ void CApplication::Destroy() SDL_Quit(); } +void CApplication::Restart() +{ + m_restart = true; + m_eventQueue->AddEvent(Event(EVENT_SYS_QUIT)); +} + +bool CApplication::IsRestarting() +{ + return m_restart; +} + bool CApplication::ChangeVideoConfig(const Gfx::GLDeviceConfig &newConfig) { static bool restore = false; |