1
0
Fork 0
forked from len0rd/rockbox

The code police strikes back. * Simpler button wait.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9988 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2006-05-25 14:05:47 +00:00
parent 61903581bf
commit 2f922941b5

View file

@ -395,7 +395,7 @@ void minesweeper_putmines(int p, int x, int y){
/* A function that will uncover all the board, when the user wins or loses. /* A function that will uncover all the board, when the user wins or loses.
can easily be expanded, (just a call assigned to a button) as a solver. */ can easily be expanded, (just a call assigned to a button) as a solver. */
void mine_show(void){ void mine_show(void){
int i, j; int i, j, button;
for(i=c_height();i<c_height() + height;i++){ for(i=c_height();i<c_height() + height;i++){
for(j=c_width();j<c_width() + width;j++){ for(j=c_width();j<c_width() + width;j++){
@ -422,13 +422,9 @@ void mine_show(void){
} }
rb->lcd_update(); rb->lcd_update();
bool k = true; do
int button = BUTTON_NONE; button = rb->button_get(true);
while(k){ while ((button == BUTTON_NONE) || (button & (BUTTON_REL|BUTTON_REPEAT)));
button = rb->button_get_w_tmo(HZ/10);
if(button != BUTTON_NONE && !(button & BUTTON_REL) &&
!(button & BUTTON_REPEAT)) k = false;
}
} }
@ -438,7 +434,7 @@ int minesweeper(void)
int i,j; int i,j;
int button; int button;
int lastbutton = BUTTON_NONE; int lastbutton = BUTTON_NONE;
/* the cursor coordinates */ /* the cursor coordinates */
int x=0, y=0; int x=0, y=0;