Fix warning and slight clean up.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12061 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Tom Ross 2007-01-18 02:28:57 +00:00
parent f21122dff7
commit 10dfc06163

View file

@ -387,7 +387,6 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
{ {
enum tidy_system system = TIDY_BOTH; enum tidy_system system = TIDY_BOTH;
enum tidy_return status; enum tidy_return status;
int button;
(void)parameter; (void)parameter;
@ -410,9 +409,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
system = TIDY_BOTH; system = TIDY_BOTH;
} }
while (rb->button_get(false) != TIDY_STOP) while (true)
{ {
status = tidy_do(system); status = tidy_do(system);
switch (status) switch (status)
@ -428,10 +426,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
} }
} }
if (button == TIDY_STOP) if (rb->default_event_handler(rb->button_get(false)) == SYS_USB_CONNECTED)
return PLUGIN_OK;
if (rb->default_event_handler(button) == SYS_USB_CONNECTED)
return PLUGIN_USB_CONNECTED; return PLUGIN_USB_CONNECTED;
rb->yield(); rb->yield();