Просмотр исходного кода

input_common: Fix directional deadzone values

The hardware tested value is 0.5 which translates to SHRT_MAX / 2
Morph 6 лет назад
Родитель
Сommit
de79897f04
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      src/input_common/gcadapter/gc_poller.cpp
  2. 1 1
      src/input_common/sdl/sdl_impl.cpp

+ 1 - 1
src/input_common/gcadapter/gc_poller.cpp

@@ -191,7 +191,7 @@ public:
 
     bool GetAnalogDirectionStatus(Input::AnalogDirection direction) const override {
         const auto [x, y] = GetStatus();
-        const float directional_deadzone = 0.4f;
+        const float directional_deadzone = 0.5f;
         switch (direction) {
         case Input::AnalogDirection::RIGHT:
             return x > directional_deadzone;

+ 1 - 1
src/input_common/sdl/sdl_impl.cpp

@@ -363,7 +363,7 @@ public:
 
     bool GetAnalogDirectionStatus(Input::AnalogDirection direction) const override {
         const auto [x, y] = GetStatus();
-        const float directional_deadzone = 0.4f;
+        const float directional_deadzone = 0.5f;
         switch (direction) {
         case Input::AnalogDirection::RIGHT:
             return x > directional_deadzone;