forked from len0rd/rockbox
Fixes: (1) metronome didn't yield() at all, (2) possible race condition, (3) complete cleanup when detecting USB connection, (4) removed TAB chars
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5022 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bf955a8b6b
commit
0df29b2157
1 changed files with 75 additions and 73 deletions
|
@ -199,15 +199,15 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter){
|
|||
/* main loop */
|
||||
while (true){
|
||||
|
||||
switch (rb->button_get(false)) {
|
||||
switch (rb->button_get(true)) {
|
||||
#ifdef HAVE_RECORDER_KEYPAD
|
||||
case BUTTON_OFF:
|
||||
#else
|
||||
case BUTTON_STOP:
|
||||
#endif
|
||||
/* get out of here */
|
||||
rb->mp3_play_stop(); /* stop audio ISR */
|
||||
rb->plugin_unregister_timer();
|
||||
rb->mp3_play_stop(); /* stop audio ISR */
|
||||
led(0);
|
||||
return PLUGIN_OK;
|
||||
|
||||
|
@ -272,6 +272,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter){
|
|||
|
||||
case SYS_USB_CONNECTED:
|
||||
rb->plugin_unregister_timer();
|
||||
rb->mp3_play_stop(); /* stop audio ISR */
|
||||
led(0);
|
||||
rb->usb_screen();
|
||||
return PLUGIN_USB_CONNECTED;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue