diff options
| author | Franklin Wei <frankhwei536@gmail.com> | 2016-06-14 18:20:23 -0400 |
|---|---|---|
| committer | Franklin Wei <frankhwei536@gmail.com> | 2016-06-14 18:20:23 -0400 |
| commit | 8da4c695570fc43bc426fd593c570ee937068544 (patch) | |
| tree | cc6e6ac5d05fc89781c2d58e77465d5f814c0c3e /apps/plugins | |
| parent | 9674a1fbf289d81056c327ae367f7fd8f85dae64 (diff) | |
| download | rockbox-8da4c695570fc43bc426fd593c570ee937068544.zip rockbox-8da4c695570fc43bc426fd593c570ee937068544.tar.gz rockbox-8da4c695570fc43bc426fd593c570ee937068544.tar.bz2 rockbox-8da4c695570fc43bc426fd593c570ee937068544.tar.xz | |
Fix
Change-Id: I0def5ee506bc3c5fff97bcd8f6b3d228f2503822
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/otp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/plugins/otp.c b/apps/plugins/otp.c index b4c9d8f..ef4d7ca 100644 --- a/apps/plugins/otp.c +++ b/apps/plugins/otp.c @@ -1056,7 +1056,7 @@ static bool wait_for_usb(void) { /* wait for a USB connection */ - rb->splash(0, "Waiting for USB, hold any button to skip..."); + rb->splash(0, "Waiting for USB, hold any button to abort..."); int oldbutton = 0; int ticks_held = 0; @@ -1101,7 +1101,9 @@ static bool wait_for_usb(void) static void type_code(int acct) { - wait_for_usb(); + if(!wait_for_usb()) + return; + int code = next_code(acct); /* hackery to get around the lack of %*d support */ @@ -1130,7 +1132,7 @@ static void type_code(int acct) if(change_numlock) rb->usb_hid_send(HID_USAGE_PAGE_KEYBOARD_KEYPAD, HID_KEYPAD_NUM_LOCK_AND_CLEAR); - rb->splash(0, "Press any key to continue."); + rb->splash(0, "Done."); /* wait a while to prevent accidental code generation */ rb->sleep(HZ / 2); |