diff options
author | Ameer <aj662@drexel.edu> | 2020-07-04 00:40:48 -0400 |
---|---|---|
committer | Ameer <aj662@drexel.edu> | 2020-07-04 00:40:48 -0400 |
commit | d00972fce1fe5f2eb13c7e5d7e4e56036cb6bc91 (patch) | |
tree | 3fd2a2bc5f6cc3ac29eef23759cc93d342152372 /src/input_common/gcadapter/gc_adapter.h | |
parent | e69d715e3d42aaa5e99ebe8e578e64242d049a8c (diff) |
Fix for always firing triggers on some controllers, trigger threshold more universal
Diffstat (limited to 'src/input_common/gcadapter/gc_adapter.h')
-rw-r--r-- | src/input_common/gcadapter/gc_adapter.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/input_common/gcadapter/gc_adapter.h b/src/input_common/gcadapter/gc_adapter.h index 161d522ac..0ea6263eb 100644 --- a/src/input_common/gcadapter/gc_adapter.h +++ b/src/input_common/gcadapter/gc_adapter.h @@ -63,9 +63,11 @@ struct GCPadStatus { static constexpr u8 C_STICK_CENTER_X = 0x80; static constexpr u8 C_STICK_CENTER_Y = 0x80; static constexpr u8 C_STICK_RADIUS = 0x7f; - static constexpr u8 TRIGGER_CENTER = 20; static constexpr u8 THRESHOLD = 10; + // 256/4, at least a quarter press to count as a press. For polling mostly + static constexpr u8 TRIGGER_THRESHOLD = 64; + u8 port{}; PadAxes axis{PadAxes::Undefined}; u8 axis_value{255}; |