diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-05-25 14:05:47 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-05-25 14:05:47 +0000 |
commit | 2f922941b532198557729a5724ab8f622e72ba56 (patch) | |
tree | 89b3dc49bcb145d65d37188b32dae20f7f558c49 /apps/plugins | |
parent | 61903581bf722b13929da80c6438af9d245c24ed (diff) |
The code police strikes back. * Simpler button wait.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9988 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/minesweeper.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c index 0eea0a4bde..bdb6fd70f5 100644 --- a/apps/plugins/minesweeper.c +++ b/apps/plugins/minesweeper.c @@ -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. can easily be expanded, (just a call assigned to a button) as a solver. */ void mine_show(void){ - int i, j; + int i, j, button; for(i=c_height();i<c_height() + height;i++){ for(j=c_width();j<c_width() + width;j++){ @@ -422,13 +422,9 @@ void mine_show(void){ } rb->lcd_update(); - bool k = true; - int button = BUTTON_NONE; - while(k){ - button = rb->button_get_w_tmo(HZ/10); - if(button != BUTTON_NONE && !(button & BUTTON_REL) && - !(button & BUTTON_REPEAT)) k = false; - } + do + button = rb->button_get(true); + while ((button == BUTTON_NONE) || (button & (BUTTON_REL|BUTTON_REPEAT))); } @@ -438,7 +434,7 @@ int minesweeper(void) int i,j; int button; int lastbutton = BUTTON_NONE; - + /* the cursor coordinates */ int x=0, y=0; |