summaryrefslogtreecommitdiff
path: root/src/input_common/helpers/joycon_protocol/generic_functions.cpp
diff options
context:
space:
mode:
authorGravatar Narr the Reg2023-01-27 22:30:44 -0600
committerGravatar german772023-01-29 20:12:58 -0600
commitc318a4c80b4b6eef9f8020f452573ef5c80f6716 (patch)
treeea031039eb63ef385ceeb0a5c0694baa9e8da8be /src/input_common/helpers/joycon_protocol/generic_functions.cpp
parentinput_common: joycon: Fill missing enum data (diff)
downloadyuzu-c318a4c80b4b6eef9f8020f452573ef5c80f6716.tar.gz
yuzu-c318a4c80b4b6eef9f8020f452573ef5c80f6716.tar.xz
yuzu-c318a4c80b4b6eef9f8020f452573ef5c80f6716.zip
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 f3fefd5b6..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() + 15, sizeof(DeviceInfo)); 41 device_info = output.device_info;
42 } 42 }
43 43
44 return result; 44 return result;