mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-23 15:46:18 +00:00
Fixed: Crash when displaying configuration window
--HG-- branch : develop
This commit is contained in:
parent
5fc3c52df9
commit
e1b810ab85
1 changed files with 10 additions and 1 deletions
|
@ -953,7 +953,7 @@ void prelogInit()
|
|||
return;
|
||||
}
|
||||
|
||||
if (ClientCfg.Width <= 0 || ClientCfg.Height <= 0)
|
||||
if (ClientCfg.Width < 800 || ClientCfg.Height < 600)
|
||||
{
|
||||
UDriver::CMode mode;
|
||||
|
||||
|
@ -967,6 +967,15 @@ void prelogInit()
|
|||
ClientCfg.Width = 1024;
|
||||
ClientCfg.Height = 768;
|
||||
}
|
||||
|
||||
// update client.cfg with detected resolution
|
||||
CConfigFile::CVar *varPtr = ClientCfg.ConfigFile.getVarPtr("Width");
|
||||
if(varPtr)
|
||||
varPtr->forceAsInt(ClientCfg.Width);
|
||||
|
||||
varPtr = ClientCfg.ConfigFile.getVarPtr("Height");
|
||||
if(varPtr)
|
||||
varPtr->forceAsInt(ClientCfg.Height);
|
||||
}
|
||||
|
||||
CLoginProgressPostThread::getInstance().step(CLoginStep(LoginStep_VideoModeSetup, "login_step_video_mode_setup"));
|
||||
|
|
Loading…
Reference in a new issue