forked from len0rd/rockbox
Plugin rework 1: (most) Compile-time keyboard configuration, for Ondio adaption. (all) Now using the default event handler, standard placement is now in switch() default case. (snow) Made USB aware. (video) Added contrast setting to Ondio version.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5291 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4a5df8e8d1
commit
cc8cff2ec0
9 changed files with 258 additions and 220 deletions
|
@ -93,6 +93,7 @@ static void snow_init(void)
|
|||
|
||||
enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||
{
|
||||
int button;
|
||||
TEST_PLUGIN_API(api);
|
||||
(void)(parameter);
|
||||
rb = api;
|
||||
|
@ -103,8 +104,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
rb->lcd_update();
|
||||
rb->sleep(HZ/20);
|
||||
|
||||
if (rb->button_get(false) == BUTTON_OFF)
|
||||
button = rb->button_get(false);
|
||||
|
||||
if (button == BUTTON_OFF)
|
||||
return false;
|
||||
else
|
||||
if (rb->default_event_handler(button) == SYS_USB_CONNECTED)
|
||||
return PLUGIN_USB_CONNECTED;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue