Fixed map turning gray after resizing window
parent
c0ac60e4fa
commit
97b7c0cab1
|
@ -725,6 +725,7 @@ bool CApplication::ChangeVideoConfig(const Gfx::GLDeviceConfig &newConfig)
|
||||||
( static_cast<Gfx::CGLDevice*>(m_device) )->ConfigChanged(m_deviceConfig);
|
( static_cast<Gfx::CGLDevice*>(m_device) )->ConfigChanged(m_deviceConfig);
|
||||||
|
|
||||||
m_engine->ResetAfterDeviceChanged();
|
m_engine->ResetAfterDeviceChanged();
|
||||||
|
m_robotMain->ResetAfterDeviceChanged();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -320,7 +320,7 @@ void CEngine::Destroy()
|
||||||
|
|
||||||
void CEngine::ResetAfterDeviceChanged()
|
void CEngine::ResetAfterDeviceChanged()
|
||||||
{
|
{
|
||||||
m_size = m_app->GetVideoConfig().size;;
|
m_size = m_app->GetVideoConfig().size;
|
||||||
|
|
||||||
m_text->FlushCache();
|
m_text->FlushCache();
|
||||||
|
|
||||||
|
|
|
@ -959,6 +959,20 @@ void CRobotMain::LoadSceneOnStart(const std::string& name, int rank)
|
||||||
ChangePhase(PHASE_LOADING);
|
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
|
//! Creates the file colobot.ini at the first time
|
||||||
void CRobotMain::CreateIni()
|
void CRobotMain::CreateIni()
|
||||||
|
|
|
@ -211,6 +211,8 @@ public:
|
||||||
|
|
||||||
void CreateIni();
|
void CreateIni();
|
||||||
|
|
||||||
|
void ResetAfterDeviceChanged();
|
||||||
|
|
||||||
//! Sets the default input bindings (key and axes)
|
//! Sets the default input bindings (key and axes)
|
||||||
void SetDefaultInputBindings();
|
void SetDefaultInputBindings();
|
||||||
|
|
||||||
|
|
|
@ -4713,13 +4713,6 @@ void CMainDialog::ChangeDisplay()
|
||||||
config.size = modes[m_setupSelMode];
|
config.size = modes[m_setupSelMode];
|
||||||
config.fullScreen = bFull;
|
config.fullScreen = bFull;
|
||||||
m_app->ChangeVideoConfig(config);
|
m_app->ChangeVideoConfig(config);
|
||||||
|
|
||||||
|
|
||||||
if ( m_bSimulSetup )
|
|
||||||
{
|
|
||||||
m_main->ChangeColor();
|
|
||||||
m_main->UpdateMap();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue