mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #6109
6109: Add button that tells you how to save power r=heinrich5991 a=def- ![Screenshot 2022-12-08 at 23 09 20](https://user-images.githubusercontent.com/2335377/206578008-d4e9be56-4aab-40eb-bb55-6b087f930888.png) ## Checklist - [x] Tested the change ingame - [x] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Dennis Felsing <dennis@felsin9.de>
This commit is contained in:
commit
f8330950ef
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue