mirror of
https://git.citron-emu.org/citron/emulator
synced 2026-01-29 22:13:37 +00:00
input_common: joycon: Remove Magic numbers from common protocol
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user