diff options
| author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-11-29 18:23:52 -0500 |
|---|---|---|
| committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-11-29 19:21:51 -0500 |
| commit | 322339a5fd4ed78826ecea42e71bc179afb7b5a7 (patch) | |
| tree | f6b38e702674c524cc53a11f5c8705f6db0d415d /src/core/hle/service/hid/controllers/npad.h | |
| parent | bfac21fca10e1bc2f6888ce8592dc58bd9f2ffc3 (diff) | |
npad: Return NpadButton in GetAndResetPressState
We were previously truncating this to a u32 as there were no known buttons that used the full 64 bits of this type. Fix this now that we know they are used.
Diffstat (limited to 'src/core/hle/service/hid/controllers/npad.h')
| -rw-r--r-- | src/core/hle/service/hid/controllers/npad.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h index 9fa113bb6..de5fa5a64 100644 --- a/src/core/hle/service/hid/controllers/npad.h +++ b/src/core/hle/service/hid/controllers/npad.h @@ -179,7 +179,7 @@ public: // Logical OR for all buttons presses on all controllers // Specifically for cheat engine and other features. - u32 GetAndResetPressState(); + Core::HID::NpadButton GetAndResetPressState(); static bool IsNpadIdValid(Core::HID::NpadIdType npad_id); static bool IsDeviceHandleValid(const Core::HID::SixAxisSensorHandle& device_handle); @@ -503,7 +503,7 @@ private: NpadControllerData& GetControllerFromNpadIdType(Core::HID::NpadIdType npad_id); const NpadControllerData& GetControllerFromNpadIdType(Core::HID::NpadIdType npad_id) const; - std::atomic<u32> press_state{}; + std::atomic<u64> press_state{}; std::array<NpadControllerData, 10> controller_data{}; KernelHelpers::ServiceContext& service_context; |
