mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-15 14:08:42 +00:00
Fixed: Update also Depth and Frequency with default resolution
This commit is contained in:
parent
cbd227baa3
commit
2f265295cc
1 changed files with 15 additions and 1 deletions
|
@ -948,14 +948,28 @@ void prelogInit()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// used to determine screen default resolution
|
||||||
if (ClientCfg.Width < 800 || ClientCfg.Height < 600)
|
if (ClientCfg.Width < 800 || ClientCfg.Height < 600)
|
||||||
{
|
{
|
||||||
UDriver::CMode mode;
|
UDriver::CMode mode;
|
||||||
|
|
||||||
|
CConfigFile::CVar *varPtr = NULL;
|
||||||
|
|
||||||
if (!ClientCfg.Windowed && Driver->getCurrentScreenMode(mode))
|
if (!ClientCfg.Windowed && Driver->getCurrentScreenMode(mode))
|
||||||
{
|
{
|
||||||
ClientCfg.Width = mode.Width;
|
ClientCfg.Width = mode.Width;
|
||||||
ClientCfg.Height = mode.Height;
|
ClientCfg.Height = mode.Height;
|
||||||
|
ClientCfg.Depth = mode.Depth;
|
||||||
|
ClientCfg.Frequency = mode.Frequency;
|
||||||
|
|
||||||
|
// update client.cfg with detected depth and frequency
|
||||||
|
varPtr = ClientCfg.ConfigFile.getVarPtr("Depth");
|
||||||
|
if(varPtr)
|
||||||
|
varPtr->forceAsInt(ClientCfg.Depth);
|
||||||
|
|
||||||
|
varPtr = ClientCfg.ConfigFile.getVarPtr("Frequency");
|
||||||
|
if(varPtr)
|
||||||
|
varPtr->forceAsInt(ClientCfg.Frequency);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -964,7 +978,7 @@ void prelogInit()
|
||||||
}
|
}
|
||||||
|
|
||||||
// update client.cfg with detected resolution
|
// update client.cfg with detected resolution
|
||||||
CConfigFile::CVar *varPtr = ClientCfg.ConfigFile.getVarPtr("Width");
|
varPtr = ClientCfg.ConfigFile.getVarPtr("Width");
|
||||||
if(varPtr)
|
if(varPtr)
|
||||||
varPtr->forceAsInt(ClientCfg.Width);
|
varPtr->forceAsInt(ClientCfg.Width);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue