summaryrefslogtreecommitdiffstats
path: root/apps/plugins/snow.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2004-10-16 00:07:43 +0000
committerJens Arnold <amiconn@rockbox.org>2004-10-16 00:07:43 +0000
commitcc8cff2ec02caf29b7d0cf565e1f9e2ebd9b0e99 (patch)
treea5427744a2aa55546f3d5982e15bed2a8d5e5f49 /apps/plugins/snow.c
parent4a5df8e8d178702d603bd7cd185525c7ff6a3064 (diff)
downloadrockbox-cc8cff2ec02caf29b7d0cf565e1f9e2ebd9b0e99.tar.gz
rockbox-cc8cff2ec02caf29b7d0cf565e1f9e2ebd9b0e99.tar.bz2
rockbox-cc8cff2ec02caf29b7d0cf565e1f9e2ebd9b0e99.zip
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
Diffstat (limited to 'apps/plugins/snow.c')
-rw-r--r--apps/plugins/snow.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c
index df9966eb38..77ec350654 100644
--- a/apps/plugins/snow.c
+++ b/apps/plugins/snow.c
@@ -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;
}
}