From 0595fd498f394139ecf57b3bcaecd327baadcb71 Mon Sep 17 00:00:00 2001 From: spycrab Date: Wed, 2 May 2018 18:29:05 +0200 Subject: [PATCH] Qt/MappingButton: Fix bad range default --- Source/Core/DolphinQt2/Config/Mapping/MappingButton.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt2/Config/Mapping/MappingButton.cpp b/Source/Core/DolphinQt2/Config/Mapping/MappingButton.cpp index f77f81cb6c..a0df4d0f2b 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/MappingButton.cpp +++ b/Source/Core/DolphinQt2/Config/Mapping/MappingButton.cpp @@ -23,6 +23,8 @@ #include "InputCommon/ControllerInterface/ControllerInterface.h" #include "InputCommon/ControllerInterface/Device.h" +constexpr int SLIDER_TICK_COUNT = 100; + static QString EscapeAmpersand(QString&& string) { return string.replace(QStringLiteral("&"), QStringLiteral("&&")); @@ -130,7 +132,7 @@ void MappingButton::OnButtonTimeout() void MappingButton::Clear() { m_reference->SetExpression(""); - m_reference->range = 100; + m_reference->range = 100.0 / SLIDER_TICK_COUNT; m_parent->SaveSettings(); Update(); }