mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix cl_cpu_throttle_inactive
This commit is contained in:
parent
7a9f316dd1
commit
6d81f1f188
|
@ -2886,11 +2886,11 @@ void CClient::Run()
|
|||
#endif
|
||||
|
||||
// beNice
|
||||
if(g_Config.m_ClCpuThrottle)
|
||||
if(g_Config.m_DbgStress || (g_Config.m_ClCpuThrottleInactive && !m_pGraphics->WindowActive()))
|
||||
thread_sleep(g_Config.m_ClCpuThrottleInactive);
|
||||
else if(g_Config.m_ClCpuThrottle)
|
||||
net_socket_read_wait(m_NetClient[0].m_Socket, g_Config.m_ClCpuThrottle * 1000);
|
||||
//thread_sleep(g_Config.m_ClCpuThrottle);
|
||||
else if(g_Config.m_DbgStress || (g_Config.m_ClCpuThrottleInactive && !m_pGraphics->WindowActive()))
|
||||
thread_sleep(5);
|
||||
|
||||
if(g_Config.m_DbgHitch)
|
||||
{
|
||||
|
|
|
@ -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(ClCpuThrottle, cl_cpu_throttle, 0, 0, 100, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")
|
||||
MACRO_CONFIG_INT(ClCpuThrottleInactive, cl_cpu_throttle_inactive, 1, 0, 100, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")
|
||||
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")
|
||||
|
|
Loading…
Reference in a new issue