summaryrefslogtreecommitdiffstats
path: root/src/object
diff options
context:
space:
mode:
authorkrzys-h <krzys_h@interia.pl>2014-10-20 21:54:52 +0200
committerkrzys-h <krzys_h@interia.pl>2014-10-20 21:54:52 +0200
commit97b7c0cab173bd5556c831ad60adc146911416d0 (patch)
tree50d58e310b7550ee28b95c60e77bad235d30c41b /src/object
parentc0ac60e4facfc9d7a588dd2a23fe548b7212975b (diff)
downloadcolobot-97b7c0cab173bd5556c831ad60adc146911416d0.tar.gz
colobot-97b7c0cab173bd5556c831ad60adc146911416d0.tar.bz2
colobot-97b7c0cab173bd5556c831ad60adc146911416d0.zip
Fixed map turning gray after resizing window
Diffstat (limited to 'src/object')
-rw-r--r--src/object/robotmain.cpp14
-rw-r--r--src/object/robotmain.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index 6ca1da1..1ad3c6d 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -959,6 +959,20 @@ void CRobotMain::LoadSceneOnStart(const std::string& name, int rank)
ChangePhase(PHASE_LOADING);
}
+void CRobotMain::ResetAfterDeviceChanged()
+{
+ if(m_phase == PHASE_SETUPds ||
+ m_phase == PHASE_SETUPgs ||
+ m_phase == PHASE_SETUPps ||
+ m_phase == PHASE_SETUPcs ||
+ m_phase == PHASE_SETUPss ||
+ m_phase == PHASE_SIMUL ||
+ m_phase == PHASE_WIN ||
+ m_phase == PHASE_LOST)
+ ChangeColor();
+ UpdateMap();
+}
+
//! Creates the file colobot.ini at the first time
void CRobotMain::CreateIni()
diff --git a/src/object/robotmain.h b/src/object/robotmain.h
index a55318d..2c819cc 100644
--- a/src/object/robotmain.h
+++ b/src/object/robotmain.h
@@ -210,6 +210,8 @@ public:
void LoadSceneOnStart(const std::string& name, int rank);
void CreateIni();
+
+ void ResetAfterDeviceChanged();
//! Sets the default input bindings (key and axes)
void SetDefaultInputBindings();