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
|
|
@ -318,12 +318,15 @@ static void move_down(void)
|
|||
|
||||
static int game_loop(void)
|
||||
{
|
||||
int button;
|
||||
|
||||
while(1)
|
||||
{
|
||||
int count = 0;
|
||||
while(count * 300 < level_speeds[level])
|
||||
{
|
||||
switch(rb->button_get_w_tmo(HZ/10))
|
||||
button = rb->button_get_w_tmo(HZ/10);
|
||||
switch(button)
|
||||
{
|
||||
case BUTTON_OFF:
|
||||
return PLUGIN_OK;
|
||||
|
|
@ -348,9 +351,10 @@ static int game_loop(void)
|
|||
move_down();
|
||||
break;
|
||||
|
||||
case SYS_USB_CONNECTED:
|
||||
rb->usb_screen();
|
||||
return PLUGIN_USB_CONNECTED;
|
||||
default:
|
||||
if (rb->default_event_handler(button) == SYS_USB_CONNECTED)
|
||||
return PLUGIN_USB_CONNECTED;
|
||||
break;
|
||||
}
|
||||
|
||||
count++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue