From 2d3b6e1a39537389e92b803cac3996ef74f29a3d 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 c859fb27..29183be8 100644 --- a/nyx/nyx_gui/frontend/gui.c +++ b/nyx/nyx_gui/frontend/gui.c @@ -441,7 +441,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; } } @@ -461,6 +468,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) @@ -482,11 +490,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); @@ -499,6 +509,7 @@ static bool _jc_virt_mouse_read(lv_indev_data_t *data) gfx_con.fntsz = 16; data->state = LV_INDEV_STATE_REL; + return false; }