From db2da89f69d7b2d93702323ea3f98719f52648e4 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Sat, 15 Aug 2020 12:19:43 +0300 Subject: [PATCH] nyx: Remove delay on JC calibration This does not help with drifting as the logged values are always changing drastically. --- nyx/nyx_gui/frontend/gui.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/nyx/nyx_gui/frontend/gui.c b/nyx/nyx_gui/frontend/gui.c index 28df37c..c5fd770 100644 --- a/nyx/nyx_gui/frontend/gui.c +++ b/nyx/nyx_gui/frontend/gui.c @@ -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)