summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Boot <rotator@gmail.com>2006-04-23 16:01:34 +0000
committerAdam Boot <rotator@gmail.com>2006-04-23 16:01:34 +0000
commitbc3f2466e6e345824e6ab06e484b2259d1f6c6c8 (patch)
treedc6deb417699aa66b7e09e05d132a3371cacd85f
parent920516c3e9fe6081a634056aea7b90428b60e3ef (diff)
downloadrockbox-bc3f2466e6e345824e6ab06e484b2259d1f6c6c8.tar.gz
rockbox-bc3f2466e6e345824e6ab06e484b2259d1f6c6c8.tar.bz2
rockbox-bc3f2466e6e345824e6ab06e484b2259d1f6c6c8.zip
Jewels: simplify and standardize plugin exit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9773 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/jewels.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c
index 5b88650d8c..fae2583e04 100644
--- a/apps/plugins/jewels.c
+++ b/apps/plugins/jewels.c
@@ -26,7 +26,7 @@
PLUGIN_HEADER
-/* button definitions, every keypad must only have directions & select */
+/* button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define JEWELS_UP BUTTON_UP
#define JEWELS_DOWN BUTTON_DOWN
@@ -60,6 +60,7 @@ PLUGIN_HEADER
#define JEWELS_PREV BUTTON_SCROLL_BACK
#define JEWELS_NEXT BUTTON_SCROLL_FWD
#define JEWELS_SELECT BUTTON_SELECT
+#define JEWELS_CANCEL BUTTON_SELECT|BUTTON_MENU
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
#define JEWELS_UP BUTTON_UP
@@ -1406,12 +1407,9 @@ static int jewels_main(struct game_context* bj) {
if(!inmenu) inmenu = true;
break;
-#ifdef JEWELS_CANCEL
- case JEWELS_CANCEL: /* toggle menu */
- inmenu = !inmenu;
- selected = false;
+ case JEWELS_CANCEL: /* end game */
+ return BJ_END;
break;
-#endif
default:
if(rb->default_event_handler_ex(button, jewels_callback,