forked from len0rd/rockbox
Plugin rework 5: (all) Now using the default event handler, standard placement is in switch() default case. (splitedit,star,vu_meter) Compile-time keyboard configuration, for Ondio adaption. (splitedit) Timing kludge for MMC. (star) Completed USB support.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5321 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3a931c113f
commit
2afdf95401
7 changed files with 285 additions and 106 deletions
|
@ -118,8 +118,10 @@ static void display_first_line(int x)
|
|||
}
|
||||
|
||||
/* Call when the program end */
|
||||
static void nim_exit(void)
|
||||
static void nim_exit(void *parameter)
|
||||
{
|
||||
(void)parameter;
|
||||
|
||||
/*Restore the old pattern*/
|
||||
rb->lcd_unlock_pattern(h1);
|
||||
rb->lcd_unlock_pattern(h2);
|
||||
|
@ -194,7 +196,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
{
|
||||
case BUTTON_STOP|BUTTON_REL:
|
||||
go = true;
|
||||
nim_exit();
|
||||
nim_exit(NULL);
|
||||
return PLUGIN_OK;
|
||||
break;
|
||||
|
||||
|
@ -214,10 +216,11 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
y++;
|
||||
break;
|
||||
|
||||
case SYS_USB_CONNECTED:
|
||||
rb->usb_screen();
|
||||
nim_exit();
|
||||
return PLUGIN_USB_CONNECTED;
|
||||
default:
|
||||
if (rb->default_event_handler_ex(button, nim_exit,
|
||||
NULL) == SYS_USB_CONNECTED)
|
||||
return PLUGIN_USB_CONNECTED;
|
||||
break;
|
||||
}
|
||||
display_first_line(x);
|
||||
rb->snprintf(str,sizeof(str),"[%d..%d]?=%d",min,v,y);
|
||||
|
@ -289,7 +292,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
min=1;
|
||||
}
|
||||
}
|
||||
nim_exit();
|
||||
nim_exit(NULL);
|
||||
return PLUGIN_OK;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue