increased sleep time when tw is minimized and made it adjustable via cputhrottle otherwise

This commit is contained in:
oy 2013-02-20 15:51:46 +01:00
parent 73386fdf0f
commit 07c97822bb
2 changed files with 4 additions and 4 deletions

View file

@ -1945,10 +1945,10 @@ void CClient::Run()
break;
// beNice
if(g_Config.m_DbgStress)
if(g_Config.m_ClCpuThrottle)
thread_sleep(g_Config.m_ClCpuThrottle);
else if(g_Config.m_DbgStress || !m_pGraphics->WindowActive())
thread_sleep(5);
else if(g_Config.m_ClCpuThrottle || !m_pGraphics->WindowActive())
thread_sleep(1);
if(g_Config.m_DbgHitch)
{

View file

@ -15,7 +15,7 @@ MACRO_CONFIG_STR(Password, password, 32, "", CFGFLAG_CLIENT|CFGFLAG_SERVER, "Pas
MACRO_CONFIG_STR(Logfile, logfile, 128, "", CFGFLAG_SAVE|CFGFLAG_CLIENT|CFGFLAG_SERVER, "Filename to log all output to")
MACRO_CONFIG_INT(ConsoleOutputLevel, console_output_level, 0, 0, 2, CFGFLAG_CLIENT|CFGFLAG_SERVER, "Adjusts the amount of information in the console")
MACRO_CONFIG_INT(ClCpuThrottle, cl_cpu_throttle, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")
MACRO_CONFIG_INT(ClCpuThrottle, cl_cpu_throttle, 0, 0, 100, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")
MACRO_CONFIG_INT(ClEditor, cl_editor, 0, 0, 1, CFGFLAG_CLIENT, "")
MACRO_CONFIG_INT(ClLoadCountryFlags, cl_load_country_flags, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Load and show country flags")