diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 50988a953..068f0d0b3 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -2915,9 +2915,9 @@ void CClient::Run() #ifdef CONF_DEBUG g_Config.m_DbgStress || #endif - (g_Config.m_ClRefreshRateInactive && !m_pGraphics->WindowActive())) + (g_Config.m_ClCpuThrottleInactive && !m_pGraphics->WindowActive())) { - thread_sleep(max(1000000 * (LastTime + time_freq() / g_Config.m_ClRefreshRateInactive - Now) / time_freq(), (int64)0)); + thread_sleep(g_Config.m_ClCpuThrottleInactive); } else if(g_Config.m_ClRefreshRate) { diff --git a/src/engine/shared/config_variables.h b/src/engine/shared/config_variables.h index 9b0505f90..54aeabc5d 100644 --- a/src/engine/shared/config_variables.h +++ b/src/engine/shared/config_variables.h @@ -16,7 +16,7 @@ MACRO_CONFIG_INT(ConsoleOutputLevel, console_output_level, 0, 0, 2, CFGFLAG_CLIE MACRO_CONFIG_INT(ClSaveSettings, cl_save_settings, 1, 0, 1, CFGFLAG_CLIENT, "Write the settings file on exit") MACRO_CONFIG_INT(ClRefreshRate, cl_refresh_rate, 480, 0, 10000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Refresh rate for updating the game (in Hz)") -MACRO_CONFIG_INT(ClRefreshRateInactive, cl_refresh_rate_inactive, 120, 0, 10000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Refresh rate for updating the game when the window is inactive (in Hz)") +MACRO_CONFIG_INT(ClCpuThrottleInactive, cl_cpu_throttle_inactive, 5, 0, 100, CFGFLAG_SAVE|CFGFLAG_CLIENT, "") MACRO_CONFIG_INT(ClEditor, cl_editor, 0, 0, 1, CFGFLAG_CLIENT, "") MACRO_CONFIG_INT(ClEditorUndo, cl_editorundo, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Undo function in editor") MACRO_CONFIG_INT(ClLoadCountryFlags, cl_load_country_flags, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Load and show country flags")