summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/controllers/npad.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-11-30 00:23:52 +0100
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-11-30 01:21:51 +0100
commit322339a5fd4ed78826ecea42e71bc179afb7b5a7 (patch)
treef6b38e702674c524cc53a11f5c8705f6db0d415d /src/core/hle/service/hid/controllers/npad.cpp
parentcore: hid: hid_types: Add "All" to NpadButton (diff)
downloadyuzu-322339a5fd4ed78826ecea42e71bc179afb7b5a7.tar
yuzu-322339a5fd4ed78826ecea42e71bc179afb7b5a7.tar.gz
yuzu-322339a5fd4ed78826ecea42e71bc179afb7b5a7.tar.bz2
yuzu-322339a5fd4ed78826ecea42e71bc179afb7b5a7.tar.lz
yuzu-322339a5fd4ed78826ecea42e71bc179afb7b5a7.tar.xz
yuzu-322339a5fd4ed78826ecea42e71bc179afb7b5a7.tar.zst
yuzu-322339a5fd4ed78826ecea42e71bc179afb7b5a7.zip
Diffstat (limited to 'src/core/hle/service/hid/controllers/npad.cpp')
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index 35dbf12df..6916930f7 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -510,7 +510,7 @@ void Controller_NPad::OnUpdate(const Core::Timing::CoreTiming& core_timing, u8*
libnx_state.r_stick = pad_state.r_stick;
npad.system_ext_lifo.WriteNextEntry(pad_state);
- press_state |= static_cast<u32>(pad_state.npad_buttons.raw);
+ press_state |= static_cast<u64>(pad_state.npad_buttons.raw);
std::memcpy(data + NPAD_OFFSET + (i * sizeof(NpadInternalState)),
&controller.shared_memory_entry, sizeof(NpadInternalState));
@@ -1149,8 +1149,8 @@ void Controller_NPad::ClearAllControllers() {
}
}
-u32 Controller_NPad::GetAndResetPressState() {
- return press_state.exchange(0);
+Core::HID::NpadButton Controller_NPad::GetAndResetPressState() {
+ return static_cast<Core::HID::NpadButton>(press_state.exchange(0));
}
bool Controller_NPad::IsControllerSupported(Core::HID::NpadStyleIndex controller) const {