1
0
Fork 0
forked from len0rd/rockbox

Fixed USB handling, and brought back the special mode

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5025 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2004-08-30 17:21:15 +00:00
parent b9062aef7c
commit 56fd6f9316

View file

@ -238,9 +238,13 @@ static int scrollit(void)
b = rb->button_get_w_tmo(HZ/10);
if ( b == (BUTTON_OFF|BUTTON_REL) )
return 0;
else if ( b == (BUTTON_ON|BUTTON_REL) )
if ( b == (BUTTON_ON|BUTTON_REL) )
return 1;
if ( rb->default_event_handler(b) == SYS_USB_CONNECTED )
return -1;
rb->lcd_clear_display();
for(i=0, yy=y, xx=x; i< LETTERS_ON_SCREEN; i++) {
@ -290,13 +294,16 @@ static int loopit(void)
{
b = rb->button_get_w_tmo(HZ/10);
if ( b == (BUTTON_OFF|BUTTON_REL) )
return PLUGIN_OK;
else if(b != BUTTON_NONE)
timeout=20;
return 0;
if ( rb->default_event_handler(b) == SYS_USB_CONNECTED) {
return PLUGIN_USB_CONNECTED;
}
if ( b == (BUTTON_ON|BUTTON_REL) )
return 1;
if ( rb->default_event_handler(b) == SYS_USB_CONNECTED )
return -1;
if ( b != BUTTON_NONE )
timeout=20;
y+= speed[ysanke&15] + values[NUM_YADD].num;
x+= speed[xsanke&15] + values[NUM_XADD].num;
@ -389,13 +396,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
do {
h = loopit();
if(h)
if (h > 0)
h = scrollit();
} while(h);
} while(h > 0);
rb->lcd_setfont(FONT_UI);
return false;
return h = 0 ? PLUGIN_OK : PLUGIN_USB_CONNECTED;
}
#endif