forked from eden-emu/eden
input_common: joycon: Remove Magic numbers from common protocol
This commit is contained in:
parent
954f7206a6
commit
3fcf573751
9 changed files with 216 additions and 149 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue