summaryrefslogtreecommitdiffstats
path: root/src/input_common/helpers/joycon_protocol/generic_functions.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-01-30 15:02:12 +0100
committerGitHub <noreply@github.com>2023-01-30 15:02:12 +0100
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
yuzu-e74660673b68e7226b7e934efe5eac620f7a98e6.tar.gz
yuzu-e74660673b68e7226b7e934efe5eac620f7a98e6.tar.bz2
yuzu-e74660673b68e7226b7e934efe5eac620f7a98e6.tar.lz
yuzu-e74660673b68e7226b7e934efe5eac620f7a98e6.tar.xz
yuzu-e74660673b68e7226b7e934efe5eac620f7a98e6.tar.zst
yuzu-e74660673b68e7226b7e934efe5eac620f7a98e6.zip
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() {
DriverResult GenericProtocol::GetDeviceInfo(DeviceInfo& device_info) {
ScopedSetBlocking sb(this);
- std::vector<u8> output;
+ SubCommandResponse output{};
const auto result = SendSubCommand(SubCommand::REQ_DEV_INFO, {}, output);
device_info = {};
if (result == DriverResult::Success) {
- memcpy(&device_info, output.data(), sizeof(DeviceInfo));
+ device_info = output.device_info;
}
return result;