1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-26 20:22:17 +00:00

Update PoCs to reflect the changes made to usbIsReady().

This commit is contained in:
Pablo Curiel 2021-06-25 17:05:02 -04:00
parent b23af8c131
commit 41ce1f23b2
2 changed files with 7 additions and 6 deletions

View file

@ -809,7 +809,8 @@ static void nspDump(TitleInfo *title_info)
Thread dump_thread = {0}; Thread dump_thread = {0};
time_t start = 0, btn_cancel_start_tmr = 0, btn_cancel_end_tmr = 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; u64 prev_size = 0;
u8 prev_time = 0, percent = 0; u8 prev_time = 0, percent = 0;
@ -849,13 +850,13 @@ static void nspDump(TitleInfo *title_info)
consolePrint("%lu ", now - start); consolePrint("%lu ", now - start);
consoleRefresh(); consoleRefresh();
if ((usb_conn = usbIsReady())) break; if ((usb_host_speed = usbIsReady())) break;
utilsSleep(1); utilsSleep(1);
} }
consolePrint("\n"); consolePrint("\n");
if (!usb_conn) if (!usb_host_speed)
{ {
consolePrint("usb connection failed\n"); consolePrint("usb connection failed\n");
return; return;

View file

@ -561,7 +561,7 @@ int main(int argc, char *argv[])
consolePrint("waiting for usb connection... "); consolePrint("waiting for usb connection... ");
time_t start = time(NULL); time_t start = time(NULL);
bool usb_conn = false; u8 usb_host_speed = UsbHostSpeed_None;
while(true) while(true)
{ {
@ -569,13 +569,13 @@ int main(int argc, char *argv[])
if ((now - start) >= 10) break; if ((now - start) >= 10) break;
consolePrint("%lu ", now - start); consolePrint("%lu ", now - start);
if ((usb_conn = usbIsReady())) break; if ((usb_host_speed = usbIsReady())) break;
utilsSleep(1); utilsSleep(1);
} }
consolePrint("\n"); consolePrint("\n");
if (!usb_conn) if (!usb_host_speed)
{ {
consolePrint("usb connection failed\n"); consolePrint("usb connection failed\n");
goto out2; goto out2;