From 02484ae3b788538486f09fd70c86bb709b57ab47 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Wed, 7 Jan 2026 00:20:10 +0200 Subject: [PATCH] nyx: always show console stats When main Joy-Con or all are disconnected, always show Joy-Con debug info. Additionally, always allow opening/closing console window with the secondary one, in the same conditions. --- nyx/nyx_gui/frontend/gui.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nyx/nyx_gui/frontend/gui.c b/nyx/nyx_gui/frontend/gui.c index 9ca24599..8f9547dd 100644 --- a/nyx/nyx_gui/frontend/gui.c +++ b/nyx/nyx_gui/frontend/gui.c @@ -440,7 +440,14 @@ static bool _jc_virt_mouse_read(lv_indev_data_t *data) if (jc_drv_ctx.calibration_step != JC_CAL_MAX_STEPS) { + if (jc_pad->plus || jc_pad->minus) + goto handle_console; + + if (console_enabled) + goto console; + data->state = LV_INDEV_STATE_REL; + return false; } } @@ -460,6 +467,7 @@ static bool _jc_virt_mouse_read(lv_indev_data_t *data) // Enable console. if (jc_pad->plus || jc_pad->minus) { +handle_console: if (((u32)get_tmr_ms() - jc_drv_ctx.console_timeout) > 1000) { if (!console_enabled) @@ -481,11 +489,13 @@ static bool _jc_virt_mouse_read(lv_indev_data_t *data) } data->state = LV_INDEV_STATE_REL; + return false; } if (console_enabled) { +console: // Print input debugging in console. gfx_con_getpos(&gfx_con.savedx, &gfx_con.savedy, &gfx_con.savedcol); gfx_con_setpos(32, 630, GFX_COL_AUTO); @@ -498,6 +508,7 @@ static bool _jc_virt_mouse_read(lv_indev_data_t *data) gfx_con.fntsz = 16; data->state = LV_INDEV_STATE_REL; + return false; }