Add button that tells you how to save power

This commit is contained in:
Dennis Felsing 2022-12-08 23:10:02 +01:00
parent 7e848131aa
commit 7c46b5190b

View file

@ -191,8 +191,12 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
UI()->DoLabel(&Label, aBuf, 13.0f, TEXTALIGN_LEFT);
Left.HSplitTop(20.0f, &Button, &Left);
g_Config.m_ClRefreshRate = static_cast<int>(UI()->DoScrollbarH(&g_Config.m_ClRefreshRate, &Button, g_Config.m_ClRefreshRate / 10000.0f) * 10000.0f + 0.1f);
Left.HSplitTop(5.0f, 0, &Left);
Left.HSplitTop(20.0f, &Button, &Left);
int s_LowerRefreshRate;
if(DoButton_CheckBox(&s_LowerRefreshRate, Localize("Save power by lowering refresh rate (higher input latency)"), g_Config.m_ClRefreshRate <= 480 && g_Config.m_ClRefreshRate != 0, &Button))
g_Config.m_ClRefreshRate = g_Config.m_ClRefreshRate > 480 || g_Config.m_ClRefreshRate == 0 ? 480 : 0;
Left.HSplitTop(15.0f, 0, &Left);
CUIRect SettingsButton;
Left.HSplitBottom(25.0f, &Left, &SettingsButton);