mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 19:31:12 +00:00
bdk: joycon: fixup hori pads
For Hori game pads: - Restore the no power down fix - Revert RTS signal back to active high
This commit is contained in:
parent
fe7fd6370e
commit
b787053c2d
1 changed files with 5 additions and 2 deletions
|
@ -633,7 +633,8 @@ static void _jc_parse_wired_hid(joycon_ctxt_t *jc, const u8* packet, u32 size)
|
||||||
jc_gamepad.conn_l = jc_l.connected;
|
jc_gamepad.conn_l = jc_l.connected;
|
||||||
jc_gamepad.conn_r = jc_r.connected;
|
jc_gamepad.conn_r = jc_r.connected;
|
||||||
|
|
||||||
_jc_charging_decider(hid_pkt->batt_info, jc->uart);
|
if (hid_pkt->cmd == JC_HID_INPUT_RPT)
|
||||||
|
_jc_charging_decider(hid_pkt->batt_info, jc->uart);
|
||||||
break;
|
break;
|
||||||
case JC_HID_SUBMCD_RPT:
|
case JC_HID_SUBMCD_RPT:
|
||||||
if (hid_pkt->subcmd == JC_HID_SUBCMD_SPI_READ)
|
if (hid_pkt->subcmd == JC_HID_SUBCMD_SPI_READ)
|
||||||
|
@ -1088,6 +1089,8 @@ static void _jc_init_conn(joycon_ctxt_t *jc)
|
||||||
msleep(2);
|
msleep(2);
|
||||||
_jc_rcv_pkt(jc);
|
_jc_rcv_pkt(jc);
|
||||||
}
|
}
|
||||||
|
else // Hori. Unset RTS inversion.
|
||||||
|
uart_invert(jc->uart, false, UART_INVERT_RTS);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1127,7 +1130,7 @@ static void _jc_init_conn(joycon_ctxt_t *jc)
|
||||||
out:
|
out:
|
||||||
jc->last_received_time = get_tmr_ms();
|
jc->last_received_time = get_tmr_ms();
|
||||||
|
|
||||||
if (!jc->sio_mode && jc->connected)
|
if (!jc->sio_mode && jc->connected && !(jc->type & JC_ID_HORI))
|
||||||
_jc_power_supply(jc->uart, false);
|
_jc_power_supply(jc->uart, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue