1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-11-22 18:06:40 +00:00

nyx: Remove delay on JC calibration

This does not help with drifting as the logged values are always changing drastically.
This commit is contained in:
CTCaer 2020-08-15 12:19:43 +03:00
parent 0652d6b3f1
commit db2da89f69

View file

@ -386,8 +386,6 @@ static bool _fts_touch_read(lv_indev_data_t *data)
static bool _jc_virt_mouse_read(lv_indev_data_t *data)
{
static u32 calib_timer = 0;
// Poll Joy-Con.
jc_gamepad_rpt_t *jc_pad = joycon_poll();
@ -409,12 +407,6 @@ static bool _jc_virt_mouse_read(lv_indev_data_t *data)
// Calibrate left stick.
if (!jc_drv_ctx.centering_done)
{
if (!calib_timer)
calib_timer = get_tmr_ms() + LV_INDEV_READ_PERIOD * 4;
if (calib_timer > get_tmr_ms())
return false;
if (jc_pad->conn_l
&& jc_pad->lstick_x > 0x400 && jc_pad->lstick_y > 0x400
&& jc_pad->lstick_x < 0xC00 && jc_pad->lstick_y < 0xC00)
@ -435,10 +427,7 @@ static bool _jc_virt_mouse_read(lv_indev_data_t *data)
// Re-calibrate on disconnection.
if (!jc_pad->conn_l)
{
calib_timer = 0;
jc_drv_ctx.centering_done = 0;
}
// Set button presses.
if (jc_pad->a || jc_pad->zl || jc_pad->zr)