summaryrefslogtreecommitdiffstats
path: root/src/input_common/helpers/joycon_protocol/generic_functions.cpp
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2023-01-28 05:30:44 +0100
committergerman77 <juangerman-13@hotmail.com>2023-01-30 03:12:58 +0100
commitc318a4c80b4b6eef9f8020f452573ef5c80f6716 (patch)
treeea031039eb63ef385ceeb0a5c0694baa9e8da8be /src/input_common/helpers/joycon_protocol/generic_functions.cpp
parentinput_common: joycon: Fill missing enum data (diff)
downloadyuzu-c318a4c80b4b6eef9f8020f452573ef5c80f6716.tar
yuzu-c318a4c80b4b6eef9f8020f452573ef5c80f6716.tar.gz
yuzu-c318a4c80b4b6eef9f8020f452573ef5c80f6716.tar.bz2
yuzu-c318a4c80b4b6eef9f8020f452573ef5c80f6716.tar.lz
yuzu-c318a4c80b4b6eef9f8020f452573ef5c80f6716.tar.xz
yuzu-c318a4c80b4b6eef9f8020f452573ef5c80f6716.tar.zst
yuzu-c318a4c80b4b6eef9f8020f452573ef5c80f6716.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 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() {
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() + 15, sizeof(DeviceInfo));
+ device_info = output.device_info;
}
return result;