summaryrefslogtreecommitdiff
path: root/src/input_common/helpers/joycon_protocol/generic_functions.cpp
diff options
context:
space:
mode:
authorGravatar liamwhite2023-01-30 09:02:12 -0500
committerGravatar GitHub2023-01-30 09:02:12 -0500
commite74660673b68e7226b7e934efe5eac620f7a98e6 (patch)
tree355def233607668733581b2b5194d0e54e1b7995 /src/input_common/helpers/joycon_protocol/generic_functions.cpp
parentMerge pull request #9631 from vonchenplus/vulkan_clear (diff)
parentinput_common: joycon: Remove Magic numbers from common protocol (diff)
downloadyuzu-e74660673b68e7226b7e934efe5eac620f7a98e6.tar.gz
yuzu-e74660673b68e7226b7e934efe5eac620f7a98e6.tar.xz
yuzu-e74660673b68e7226b7e934efe5eac620f7a98e6.zip
Merge pull request #9701 from german77/common_protocol
input_common: joycon: Remove Magic numbers from common protocol
Diffstat (limited to 'src/input_common/helpers/joycon_protocol/generic_functions.cpp')
-rw-r--r--src/input_common/helpers/joycon_protocol/generic_functions.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input_common/helpers/joycon_protocol/generic_functions.cpp b/src/input_common/helpers/joycon_protocol/generic_functions.cpp
index 484c208e6..548a4b9e3 100644
--- a/src/input_common/helpers/joycon_protocol/generic_functions.cpp
+++ b/src/input_common/helpers/joycon_protocol/generic_functions.cpp
@@ -32,13 +32,13 @@ DriverResult GenericProtocol::TriggersElapsed() {
32 32
33DriverResult GenericProtocol::GetDeviceInfo(DeviceInfo& device_info) { 33DriverResult GenericProtocol::GetDeviceInfo(DeviceInfo& device_info) {
34 ScopedSetBlocking sb(this); 34 ScopedSetBlocking sb(this);
35 std::vector<u8> output; 35 SubCommandResponse output{};
36 36
37 const auto result = SendSubCommand(SubCommand::REQ_DEV_INFO, {}, output); 37 const auto result = SendSubCommand(SubCommand::REQ_DEV_INFO, {}, output);
38 38
39 device_info = {}; 39 device_info = {};
40 if (result == DriverResult::Success) { 40 if (result == DriverResult::Success) {
41 memcpy(&device_info, output.data(), sizeof(DeviceInfo)); 41 device_info = output.device_info;
42 } 42 }
43 43
44 return result; 44 return result;