diff --git a/code_templates/nsp_dumper_usb.c b/code_templates/nsp_dumper_usb.c index cb7fbb5..3d80d22 100644 --- a/code_templates/nsp_dumper_usb.c +++ b/code_templates/nsp_dumper_usb.c @@ -809,7 +809,8 @@ static void nspDump(TitleInfo *title_info) Thread dump_thread = {0}; time_t start = 0, btn_cancel_start_tmr = 0, btn_cancel_end_tmr = 0; - bool usb_conn = false, btn_cancel_cur_state = false, btn_cancel_prev_state = false; + bool btn_cancel_cur_state = false, btn_cancel_prev_state = false; + u8 usb_host_speed = UsbHostSpeed_None; u64 prev_size = 0; u8 prev_time = 0, percent = 0; @@ -849,13 +850,13 @@ static void nspDump(TitleInfo *title_info) consolePrint("%lu ", now - start); consoleRefresh(); - if ((usb_conn = usbIsReady())) break; + if ((usb_host_speed = usbIsReady())) break; utilsSleep(1); } consolePrint("\n"); - if (!usb_conn) + if (!usb_host_speed) { consolePrint("usb connection failed\n"); return; diff --git a/code_templates/usb_romfs_dumper.c b/code_templates/usb_romfs_dumper.c index bea47bc..0ae7567 100644 --- a/code_templates/usb_romfs_dumper.c +++ b/code_templates/usb_romfs_dumper.c @@ -561,7 +561,7 @@ int main(int argc, char *argv[]) consolePrint("waiting for usb connection... "); time_t start = time(NULL); - bool usb_conn = false; + u8 usb_host_speed = UsbHostSpeed_None; while(true) { @@ -569,13 +569,13 @@ int main(int argc, char *argv[]) if ((now - start) >= 10) break; consolePrint("%lu ", now - start); - if ((usb_conn = usbIsReady())) break; + if ((usb_host_speed = usbIsReady())) break; utilsSleep(1); } consolePrint("\n"); - if (!usb_conn) + if (!usb_host_speed) { consolePrint("usb connection failed\n"); goto out2;