summaryrefslogtreecommitdiff
path: root/apps/plugins/rockblox.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/rockblox.c')
-rw-r--r--apps/plugins/rockblox.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c
index f90ced2450..eac6563601 100644
--- a/apps/plugins/rockblox.c
+++ b/apps/plugins/rockblox.c
@@ -318,12 +318,15 @@ static void move_down(void)
318 318
319static int game_loop(void) 319static int game_loop(void)
320{ 320{
321 int button;
322
321 while(1) 323 while(1)
322 { 324 {
323 int count = 0; 325 int count = 0;
324 while(count * 300 < level_speeds[level]) 326 while(count * 300 < level_speeds[level])
325 { 327 {
326 switch(rb->button_get_w_tmo(HZ/10)) 328 button = rb->button_get_w_tmo(HZ/10);
329 switch(button)
327 { 330 {
328 case BUTTON_OFF: 331 case BUTTON_OFF:
329 return PLUGIN_OK; 332 return PLUGIN_OK;
@@ -348,9 +351,10 @@ static int game_loop(void)
348 move_down(); 351 move_down();
349 break; 352 break;
350 353
351 case SYS_USB_CONNECTED: 354 default:
352 rb->usb_screen(); 355 if (rb->default_event_handler(button) == SYS_USB_CONNECTED)
353 return PLUGIN_USB_CONNECTED; 356 return PLUGIN_USB_CONNECTED;
357 break;
354 } 358 }
355 359
356 count++; 360 count++;