mirror of
https://github.com/ndeadly/MissionControl
synced 2024-11-26 14:20:21 +00:00
btdrv-mitm: handle home button according to reported data format
This commit is contained in:
parent
db59fa7bec
commit
60284e9c01
2 changed files with 12 additions and 3 deletions
|
@ -51,6 +51,9 @@ namespace ams::controller {
|
|||
void GemboxController::HandleInputReport0x02(const GemboxReportData *src, SwitchReportData *dst) {
|
||||
dst->input0x30.buttons.minus = src->input0x02.back;
|
||||
|
||||
dst->input0x30.buttons.home = src->input0x02.buttons == 0;
|
||||
|
||||
|
||||
this->PackStickData(&dst->input0x30.left_stick, STICK_ZERO, STICK_ZERO);
|
||||
this->PackStickData(&dst->input0x30.right_stick, STICK_ZERO, STICK_ZERO);
|
||||
}
|
||||
|
|
|
@ -55,9 +55,15 @@ namespace ams::controller {
|
|||
} __attribute__ ((__packed__));
|
||||
|
||||
struct GemboxInputReport0x02 {
|
||||
uint8_t : 2;
|
||||
union {
|
||||
struct {
|
||||
uint8_t : 6;
|
||||
uint8_t back : 1;
|
||||
uint8_t : 0;
|
||||
};
|
||||
|
||||
uint8_t buttons;
|
||||
};
|
||||
} __attribute__((packed));
|
||||
|
||||
struct GemboxInputReport0x07 {
|
||||
|
|
Loading…
Reference in a new issue