From 796207a41be3558560191e6e6b0922c716fe6240 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Mon, 16 May 2022 13:12:45 +0300 Subject: [PATCH] nyx: do not allow joycon pairing info dump on Hoag --- nyx/nyx_gui/frontend/gui_options.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nyx/nyx_gui/frontend/gui_options.c b/nyx/nyx_gui/frontend/gui_options.c index 10391da..1749312 100644 --- a/nyx/nyx_gui/frontend/gui_options.c +++ b/nyx/nyx_gui/frontend/gui_options.c @@ -777,12 +777,13 @@ static lv_res_t _joycon_info_dump_action(lv_obj_t * btn) int error; bool is_l_hos = false; bool is_r_hos = false; + bool nx_hoag = fuse_read_hw_type() == FUSE_NX_HW_TYPE_HOAG; jc_gamepad_rpt_t *jc_pad = jc_get_bt_pairing_info(&is_l_hos, &is_r_hos); char *data = (char *)malloc(SZ_16K); char *txt_buf = (char *)malloc(SZ_4K); - if (!jc_pad) + if (!jc_pad || nx_hoag) { error = 255; goto disabled; @@ -891,7 +892,12 @@ disabled:; "#FFDD00 and that you paired them in HOS!#"); } else - s_printf(txt_buf, "#FFDD00 Failed to dump Joy-Con pairing info!#\n#FFDD00 Error: %d#", error); + { + if (!nx_hoag) + s_printf(txt_buf, "#FFDD00 Failed to dump Joy-Con pairing info!#\n#FFDD00 Error: %d#", error); + else + s_printf(txt_buf, "#FFDD00 Not supported on Switch Lite!#\n"); + } lv_mbox_set_text(mbox, txt_buf);