summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/minesweeper.c14
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){
395/* A function that will uncover all the board, when the user wins or loses. 395/* A function that will uncover all the board, when the user wins or loses.
396 can easily be expanded, (just a call assigned to a button) as a solver. */ 396 can easily be expanded, (just a call assigned to a button) as a solver. */
397void mine_show(void){ 397void mine_show(void){
398 int i, j; 398 int i, j, button;
399 399
400 for(i=c_height();i<c_height() + height;i++){ 400 for(i=c_height();i<c_height() + height;i++){
401 for(j=c_width();j<c_width() + width;j++){ 401 for(j=c_width();j<c_width() + width;j++){
@@ -422,13 +422,9 @@ void mine_show(void){
422 } 422 }
423 rb->lcd_update(); 423 rb->lcd_update();
424 424
425 bool k = true; 425 do
426 int button = BUTTON_NONE; 426 button = rb->button_get(true);
427 while(k){ 427 while ((button == BUTTON_NONE) || (button & (BUTTON_REL|BUTTON_REPEAT)));
428 button = rb->button_get_w_tmo(HZ/10);
429 if(button != BUTTON_NONE && !(button & BUTTON_REL) &&
430 !(button & BUTTON_REPEAT)) k = false;
431 }
432} 428}
433 429
434 430
@@ -438,7 +434,7 @@ int minesweeper(void)
438 int i,j; 434 int i,j;
439 int button; 435 int button;
440 int lastbutton = BUTTON_NONE; 436 int lastbutton = BUTTON_NONE;
441 437
442 /* the cursor coordinates */ 438 /* the cursor coordinates */
443 int x=0, y=0; 439 int x=0, y=0;
444 440