diff options
| author | 2014-12-03 19:33:54 -0500 | |
|---|---|---|
| committer | 2014-12-03 19:33:54 -0500 | |
| commit | 7ff8f0d916ae020ed736122a91d91f190afcc95c (patch) | |
| tree | 421562017647dbe50710016d12d4fe1b7c05f6f9 /src | |
| parent | Merge pull request #236 from rohit-n/sign-compare (diff) | |
| download | yuzu-7ff8f0d916ae020ed736122a91d91f190afcc95c.tar.gz yuzu-7ff8f0d916ae020ed736122a91d91f190afcc95c.tar.xz yuzu-7ff8f0d916ae020ed736122a91d91f190afcc95c.zip | |
hid_user: Pass by reference with PadButtonPress/PadButtonRelease
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/hid_user.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/hid_user.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/service/hid_user.cpp b/src/core/hle/service/hid_user.cpp index d29de1a52..2abaf0f2f 100644 --- a/src/core/hle/service/hid_user.cpp +++ b/src/core/hle/service/hid_user.cpp | |||
| @@ -55,7 +55,7 @@ static void UpdateNextCirclePadState() { | |||
| 55 | /** | 55 | /** |
| 56 | * Sets a Pad state (button or button combo) as pressed | 56 | * Sets a Pad state (button or button combo) as pressed |
| 57 | */ | 57 | */ |
| 58 | void PadButtonPress(PadState pad_state) { | 58 | void PadButtonPress(const PadState& pad_state) { |
| 59 | next_state.hex |= pad_state.hex; | 59 | next_state.hex |= pad_state.hex; |
| 60 | UpdateNextCirclePadState(); | 60 | UpdateNextCirclePadState(); |
| 61 | } | 61 | } |
| @@ -63,7 +63,7 @@ void PadButtonPress(PadState pad_state) { | |||
| 63 | /** | 63 | /** |
| 64 | * Sets a Pad state (button or button combo) as released | 64 | * Sets a Pad state (button or button combo) as released |
| 65 | */ | 65 | */ |
| 66 | void PadButtonRelease(PadState pad_state) { | 66 | void PadButtonRelease(const PadState& pad_state) { |
| 67 | next_state.hex &= ~pad_state.hex; | 67 | next_state.hex &= ~pad_state.hex; |
| 68 | UpdateNextCirclePadState(); | 68 | UpdateNextCirclePadState(); |
| 69 | } | 69 | } |
diff --git a/src/core/hle/service/hid_user.h b/src/core/hle/service/hid_user.h index 5ed97085d..8f53befdb 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}}; | |||
| 93 | const PadState PAD_CIRCLE_DOWN = {{1u << 31}}; | 93 | const PadState PAD_CIRCLE_DOWN = {{1u << 31}}; |
| 94 | 94 | ||
| 95 | // Methods for updating the HID module's state | 95 | // Methods for updating the HID module's state |
| 96 | void PadButtonPress(PadState pad_state); | 96 | void PadButtonPress(const PadState& pad_state); |
| 97 | void PadButtonRelease(PadState pad_state); | 97 | void PadButtonRelease(const PadState& pad_state); |
| 98 | void PadUpdateComplete(); | 98 | void PadUpdateComplete(); |
| 99 | 99 | ||
| 100 | /** | 100 | /** |