1120: Allows low mousesens r=heinrich5991 a=ChillerDragon

Lower minimum mousesens value to avoid confusion. Responing to GG Kid's request:
https://forum.ddnet.tw/viewtopic.php?f=45&t=5807&p=58207&hilit=mousesens#p58207

I did some testing and found no bugs... but i wonder why it was set to 5. So maybe it had some reason i don't understand so please only merge if you know what you are doing ;p

Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
This commit is contained in:
bors[bot] 2018-05-01 19:15:33 +00:00
commit 00dd1be3bf
3 changed files with 4 additions and 4 deletions

View file

@ -128,7 +128,7 @@ MACRO_CONFIG_INT(GfxQuadAsTriangle, gfx_quad_as_triangle, 0, 0, 0, CFGFLAG_SAVE|
MACRO_CONFIG_INT(GfxQuadAsTriangle, gfx_quad_as_triangle, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Render quads as triangles (fixes quad coloring on some GPUs)")
#endif
MACRO_CONFIG_INT(InpMousesens, inp_mousesens, 200, 5, 100000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Mouse sensitivity")
MACRO_CONFIG_INT(InpMousesens, inp_mousesens, 200, 1, 100000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Mouse sensitivity")
MACRO_CONFIG_INT(InpMouseOld, inp_mouseold, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Use old mouse mode (warp mouse instead of raw input)")
MACRO_CONFIG_INT(InpIgnoredModifiers, inp_ignored_modifiers, 0, 0, 65536, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Ignored keyboard modifier mask")

View file

@ -798,7 +798,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("Mouse sens."), g_Config.m_InpMousesens);
UI()->DoLabel(&Label, aBuf, 14.0f*UI()->Scale(), -1);
Button.HMargin(2.0f, &Button);
int NewValue = (int)(DoScrollbarH(&g_Config.m_InpMousesens, &Button, (min(g_Config.m_InpMousesens, 500)-5)/500.0f)*500.0f)+5;
int NewValue = (int)(DoScrollbarH(&g_Config.m_InpMousesens, &Button, (min(g_Config.m_InpMousesens, 500)-1)/500.0f)*500.0f)+1;
if(g_Config.m_InpMousesens < 500 || NewValue < 500)
g_Config.m_InpMousesens = min(NewValue, 500);
MovementSettings.HSplitTop(20.0f, 0, &MovementSettings);
@ -811,7 +811,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("UI mouse s."), g_Config.m_UiMousesens);
UI()->DoLabel(&Label, aBuf, 14.0f*UI()->Scale(), -1);
Button.HMargin(2.0f, &Button);
int NewValue = (int)(DoScrollbarH(&g_Config.m_UiMousesens, &Button, (min(g_Config.m_UiMousesens, 500)-5)/500.0f)*500.0f)+5;
int NewValue = (int)(DoScrollbarH(&g_Config.m_UiMousesens, &Button, (min(g_Config.m_UiMousesens, 500)-1)/500.0f)*500.0f)+1;
if(g_Config.m_UiMousesens < 500 || NewValue < 500)
g_Config.m_UiMousesens = min(NewValue, 500);
MovementSettings.HSplitTop(20.0f, 0, &MovementSettings);

View file

@ -86,7 +86,7 @@ MACRO_CONFIG_INT(UiPage, ui_page, 9, 0, 11, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interf
MACRO_CONFIG_INT(UiToolboxPage, ui_toolbox_page, 0, 0, 2, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Toolbox page")
MACRO_CONFIG_STR(UiServerAddress, ui_server_address, 64, "localhost:8303", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface server address")
MACRO_CONFIG_INT(UiScale, ui_scale, 100, 50, 150, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface scale")
MACRO_CONFIG_INT(UiMousesens, ui_mousesens, 200, 5, 100000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Mouse sensitivity for menus/editor")
MACRO_CONFIG_INT(UiMousesens, ui_mousesens, 200, 1, 100000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Mouse sensitivity for menus/editor")
MACRO_CONFIG_INT(UiColorHue, ui_color_hue, 160, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color hue")
MACRO_CONFIG_INT(UiColorSat, ui_color_sat, 70, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color saturation")