VERY experimental Nintendo Switch 2 emulator
C++
hid_user: Pass by reference with PadButtonPress/PadButtonRelease
Lioncash7ff8f0d916ae
diff --git a/src/core/hle/service/hid_user.cpp b/src/core/hle/service/hid_user.cppindex d29de1a529..2abaf0f2fc 100644--- a/src/core/hle/service/hid_user.cpp+++ b/src/core/hle/service/hid_user.cpp@@ -55,7 +55,7 @@ static void UpdateNextCirclePadState() {/*** Sets a Pad state (button or button combo) as pressed*/-void PadButtonPress(PadState pad_state) {+void PadButtonPress(const PadState& pad_state) {next_state.hex |= pad_state.hex;UpdateNextCirclePadState();}@@ -63,7 +63,7 @@ void PadButtonPress(PadState pad_state) {/*** Sets a Pad state (button or button combo) as released*/-void PadButtonRelease(PadState pad_state) {+void PadButtonRelease(const PadState& pad_state) {next_state.hex &= ~pad_state.hex;UpdateNextCirclePadState();}diff --git a/src/core/hle/service/hid_user.h b/src/core/hle/service/hid_user.hindex 5ed97085da..8f53befdbf 100644--- a/src/core/hle/service/hid_user.h+++ b/src/core/hle/service/hid_user.h@@ -93,8 +93,8 @@ const PadState PAD_CIRCLE_UP = {{1u << 30}};const PadState PAD_CIRCLE_DOWN = {{1u << 31}};// Methods for updating the HID module's state-void PadButtonPress(PadState pad_state);-void PadButtonRelease(PadState pad_state);+void PadButtonPress(const PadState& pad_state);+void PadButtonRelease(const PadState& pad_state);void PadUpdateComplete();/**