Some plugins need to yield under heavy user input especially with a scrollwheel.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19416 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2008-12-13 07:36:44 +00:00
parent 93572e2a9e
commit 6340a4c9ed
5 changed files with 15 additions and 1 deletions

View file

@ -1096,6 +1096,8 @@ int game_menu(int when)
return 3;
break;
}
rb->yield();
}
}
@ -1244,6 +1246,8 @@ int help(int when)
return 1;
break;
}
rb->yield();
}
return 0;
}

View file

@ -339,6 +339,8 @@ static void roll_credits(void)
}
rb->lcd_update();
rb->yield();
/* wait for user action */
action = rb->get_action(CONTEXT_LIST, TIMEOUT_BLOCK);
if(ACTION_STD_CANCEL == action)

View file

@ -1468,6 +1468,8 @@ static int jewels_main(struct game_context* bj) {
rb->lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT-8, str);
rb->lcd_update();
rb->yield();
switch(res) {
case MRES_NEW:
startgame = true;
@ -1510,6 +1512,7 @@ static int jewels_main(struct game_context* bj) {
while(true) {
button = rb->button_get(true);
if(button != BUTTON_NONE && !(button&BUTTON_REL)) break;
rb->yield();
}
rb->lcd_clear_display();
continue;
@ -1785,6 +1788,7 @@ static int jewels_main(struct game_context* bj) {
}
/* handle game button presses */
rb->yield();
button = rb->button_get(true);
switch(button){
case JEWELS_LEFT: /* move cursor left */

View file

@ -315,7 +315,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
rb->lcd_update();
rb->sleep(sleep);
}
button = rb->button_get(false);
button = rb->button_get(frozen);
switch(button) {
case MATRIX_PAUSE:
frozen = !frozen;

View file

@ -709,6 +709,8 @@ enum help solitaire_help( void )
}
if( button != BUTTON_NONE )
lastbutton = button;
rb->yield();
}
}
@ -1871,6 +1873,8 @@ int solitaire( int skipmenu )
if( cur_card == NOT_A_CARD
&& find_last_card( cur_col ) != NOT_A_CARD )
cur_card = find_last_card( cur_col );
rb->yield();
}
}