diff options
Diffstat (limited to 'apps/plugins/minesweeper.c')
-rw-r--r-- | apps/plugins/minesweeper.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c index 982bb8b67c..6250cb180b 100644 --- a/apps/plugins/minesweeper.c +++ b/apps/plugins/minesweeper.c | |||
@@ -247,16 +247,27 @@ CONFIG_KEYPAD == ONDAVX777_PAD || \ | |||
247 | CONFIG_KEYPAD == MROBE500_PAD | 247 | CONFIG_KEYPAD == MROBE500_PAD |
248 | # define MINESWP_QUIT BUTTON_POWER | 248 | # define MINESWP_QUIT BUTTON_POWER |
249 | 249 | ||
250 | #elif (CONFIG_KEYPAD == SAMSUNG_YH820_PAD) || \ | 250 | #elif (CONFIG_KEYPAD == SAMSUNG_YH820_PAD) |
251 | (CONFIG_KEYPAD == SAMSUNG_YH920_PAD) | ||
252 | # define MINESWP_LEFT BUTTON_LEFT | 251 | # define MINESWP_LEFT BUTTON_LEFT |
253 | # define MINESWP_RIGHT BUTTON_RIGHT | 252 | # define MINESWP_RIGHT BUTTON_RIGHT |
254 | # define MINESWP_UP BUTTON_UP | 253 | # define MINESWP_UP BUTTON_UP |
255 | # define MINESWP_DOWN BUTTON_DOWN | 254 | # define MINESWP_DOWN BUTTON_DOWN |
256 | # define MINESWP_QUIT BUTTON_REC | 255 | # define MINESWP_QUIT (BUTTON_REW|BUTTON_REPEAT) |
257 | # define MINESWP_TOGGLE BUTTON_PLAY | 256 | # define MINESWP_TOGGLE BUTTON_PLAY |
258 | # define MINESWP_DISCOVER BUTTON_REW | 257 | # define MINESWP_DISCOVER BUTTON_FFWD |
259 | # define MINESWP_INFO BUTTON_FFWD | 258 | # define MINESWP_INFO BUTTON_REC |
259 | |||
260 | #elif (CONFIG_KEYPAD == SAMSUNG_YH920_PAD) | ||
261 | # define MINESWP_LEFT BUTTON_LEFT | ||
262 | # define MINESWP_RIGHT BUTTON_RIGHT | ||
263 | # define MINESWP_UP BUTTON_UP | ||
264 | # define MINESWP_DOWN BUTTON_DOWN | ||
265 | # define MINESWP_QUIT (BUTTON_REW|BUTTON_REPEAT) | ||
266 | # define MINESWP_TOGGLE (BUTTON_PLAY|BUTTON_REL) | ||
267 | # define MINESWP_TOGGLE_PRE BUTTON_PLAY | ||
268 | # define MINESWP_DISCOVER BUTTON_FFWD | ||
269 | # define MINESWP_INFO (BUTTON_PLAY|BUTTON_REPEAT) | ||
270 | # define MINESWP_INFO_PRE BUTTON_PLAY | ||
260 | 271 | ||
261 | #elif (CONFIG_KEYPAD == PBELL_VIBE500_PAD) | 272 | #elif (CONFIG_KEYPAD == PBELL_VIBE500_PAD) |
262 | # define MINESWP_LEFT BUTTON_PREV | 273 | # define MINESWP_LEFT BUTTON_PREV |
@@ -788,7 +799,7 @@ static enum minesweeper_status minesweeper( void ) | |||
788 | { | 799 | { |
789 | int i, j; | 800 | int i, j; |
790 | int button; | 801 | int button; |
791 | #if defined(HAVE_TOUCHSCREEN) || defined(MINESWP_TOGGLE_PRE) | 802 | #if defined(HAVE_TOUCHSCREEN) || defined(MINESWP_TOGGLE_PRE) || defined(MINESWP_INFO_PRE) |
792 | int lastbutton = BUTTON_NONE; | 803 | int lastbutton = BUTTON_NONE; |
793 | #endif | 804 | #endif |
794 | 805 | ||
@@ -977,6 +988,10 @@ static enum minesweeper_status minesweeper( void ) | |||
977 | /* show how many mines you think you have found and how many | 988 | /* show how many mines you think you have found and how many |
978 | * there really are on the game */ | 989 | * there really are on the game */ |
979 | case MINESWP_INFO: | 990 | case MINESWP_INFO: |
991 | #ifdef MINESWP_INFO_PRE | ||
992 | if( lastbutton != MINESWP_INFO_PRE ) | ||
993 | break; | ||
994 | #endif | ||
980 | if( no_mines ) | 995 | if( no_mines ) |
981 | break; | 996 | break; |
982 | int flags_used = count_flags(); | 997 | int flags_used = count_flags(); |
@@ -996,7 +1011,7 @@ static enum minesweeper_status minesweeper( void ) | |||
996 | return MINESWEEPER_USB; | 1011 | return MINESWEEPER_USB; |
997 | break; | 1012 | break; |
998 | } | 1013 | } |
999 | #if defined(HAVE_TOUCHSCREEN) || defined(MINESWP_TOGGLE_PRE) | 1014 | #if defined(HAVE_TOUCHSCREEN) || defined(MINESWP_TOGGLE_PRE) || defined(MINESWP_INFO_PRE) |
1000 | if( button != BUTTON_NONE ) | 1015 | if( button != BUTTON_NONE ) |
1001 | lastbutton = button; | 1016 | lastbutton = button; |
1002 | #endif | 1017 | #endif |