diff options
author | Kevin Ferrare <kevin@rockbox.org> | 2006-06-30 16:43:47 +0000 |
---|---|---|
committer | Kevin Ferrare <kevin@rockbox.org> | 2006-06-30 16:43:47 +0000 |
commit | 0e027bd90c4f0c2aa42c087a1957b42a58e93270 (patch) | |
tree | d21b7009fb818c907fcfc2268f1b9a12fd9263de /apps/plugins/pong.c | |
parent | 7bbf53eae502417e6e0fbb204e319310f28f33ad (diff) | |
download | rockbox-0e027bd90c4f0c2aa42c087a1957b42a58e93270.tar.gz rockbox-0e027bd90c4f0c2aa42c087a1957b42a58e93270.zip |
To avoid having to use the main unit when accidentally launching a plugin from the remote, plugins now support remote quit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10157 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pong.c')
-rw-r--r-- | apps/plugins/pong.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c index adba3f5379..421ae0295c 100644 --- a/apps/plugins/pong.c +++ b/apps/plugins/pong.c | |||
@@ -57,6 +57,7 @@ PLUGIN_HEADER | |||
57 | #define PONG_LEFT_DOWN BUTTON_DOWN | 57 | #define PONG_LEFT_DOWN BUTTON_DOWN |
58 | #define PONG_RIGHT_UP BUTTON_ON | 58 | #define PONG_RIGHT_UP BUTTON_ON |
59 | #define PONG_RIGHT_DOWN BUTTON_MODE | 59 | #define PONG_RIGHT_DOWN BUTTON_MODE |
60 | #define PONG_RC_QUIT BUTTON_RC_STOP | ||
60 | 61 | ||
61 | #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \ | 62 | #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \ |
62 | (CONFIG_KEYPAD == IPOD_3G_PAD) | 63 | (CONFIG_KEYPAD == IPOD_3G_PAD) |
@@ -298,7 +299,11 @@ int keys(struct pong *p) | |||
298 | while(end > *rb->current_tick) { | 299 | while(end > *rb->current_tick) { |
299 | key = rb->button_get_w_tmo(end - *rb->current_tick); | 300 | key = rb->button_get_w_tmo(end - *rb->current_tick); |
300 | 301 | ||
301 | if(key & PONG_QUIT) | 302 | if(key & PONG_QUIT |
303 | #ifdef PONG_RC_QUIT | ||
304 | || key & PONG_RC_QUIT | ||
305 | #endif | ||
306 | ) | ||
302 | return 0; /* exit game NOW */ | 307 | return 0; /* exit game NOW */ |
303 | 308 | ||
304 | if(key & PONG_LEFT_DOWN) /* player left goes down */ | 309 | if(key & PONG_LEFT_DOWN) /* player left goes down */ |