diff options
| author | Sebastian Leonhardt <sebastian.leonhardt@web.de> | 2015-07-13 00:30:14 +0200 |
|---|---|---|
| committer | Gerrit Rockbox <gerrit@rockbox.org> | 2015-09-25 10:23:37 +0200 |
| commit | 072d3cb268efc79a1945109bc3d9eefaf437e6c0 (patch) | |
| tree | 0bfe51886f6414858dcef48c68f1c6e5a417a9c5 /apps/plugins | |
| parent | d552ff264833f8ee4885bb89e068615107e6d473 (diff) | |
| download | rockbox-072d3cb268efc79a1945109bc3d9eefaf437e6c0.zip rockbox-072d3cb268efc79a1945109bc3d9eefaf437e6c0.tar.gz rockbox-072d3cb268efc79a1945109bc3d9eefaf437e6c0.tar.bz2 rockbox-072d3cb268efc79a1945109bc3d9eefaf437e6c0.tar.xz | |
Fix Pong button handling
* allow button combos for QUIT (fixes MPIO_HD300)
* allow quitting during PAUSE mode
Change-Id: Iaf8ffc65cdcfe6c1d25bfbad3e38764eea2664cc
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/pong.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c index 4ec62e0..e72584f 100644 --- a/apps/plugins/pong.c +++ b/apps/plugins/pong.c @@ -631,9 +631,9 @@ static int keys(struct pong *p) return 2; /* Pause game */ #endif - if(key & PONG_QUIT + if(key == PONG_QUIT #ifdef PONG_RC_QUIT - || key & PONG_RC_QUIT + || key == PONG_RC_QUIT #endif ) return 0; /* exit game NOW */ @@ -719,13 +719,6 @@ enum plugin_status plugin_start(const void* parameter) /* go go go */ while(game > 0) { - if (game == 2) { /* Game Paused */ - rb->splash(0, "PAUSED"); - while(game == 2) - game = keys(&pong); /* short circuit */ - rb->lcd_clear_display(); - } - if( pong.player[0].iscpu && pong.player[1].iscpu ) { if(blink_timer<blink_rate) { ++blink_timer; @@ -751,6 +744,13 @@ enum plugin_status plugin_start(const void* parameter) rb->lcd_update(); game = keys(&pong); /* deal with keys */ + + if (game == 2) { /* Game Paused */ + rb->splash(0, "PAUSED"); + while(game == 2) + game = keys(&pong); /* short circuit */ + rb->lcd_clear_display(); + } } /* Turn on backlight timeout (revert to settings) */ |