diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2009-02-15 14:22:55 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2009-02-15 14:22:55 +0000 |
| commit | c2ba5b4c07f19bb77cfcc192b7eb1f1e5c235d16 (patch) | |
| tree | a6ff2a2f563f5f87018a7e2630177b14307a6504 /apps/plugins | |
| parent | 281227321e198f027524ce6c7ece5c96f8ff6536 (diff) | |
| download | rockbox-c2ba5b4c07f19bb77cfcc192b7eb1f1e5c235d16.zip rockbox-c2ba5b4c07f19bb77cfcc192b7eb1f1e5c235d16.tar.gz rockbox-c2ba5b4c07f19bb77cfcc192b7eb1f1e5c235d16.tar.bz2 rockbox-c2ba5b4c07f19bb77cfcc192b7eb1f1e5c235d16.tar.xz | |
Define a specific exit button. Stops the plugin from exiting prematurely, e.g. due to a button release event.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20010 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/test_greylib_bitmap_scale.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/plugins/test_greylib_bitmap_scale.c b/apps/plugins/test_greylib_bitmap_scale.c index 1c4089b..3e82c23 100644 --- a/apps/plugins/test_greylib_bitmap_scale.c +++ b/apps/plugins/test_greylib_bitmap_scale.c @@ -23,6 +23,17 @@ #include "lib/grey.h" #include "lib/pluginlib_bmp.h" +#if (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \ + (CONFIG_KEYPAD == IPOD_1G2G_PAD) +#define GBS_QUIT BUTTON_MENU +#elif CONFIG_KEYPAD == IAUDIO_M3_PAD +#define GBS_QUIT BUTTON_RC_REC +#elif defined(BUTTON_OFF) +#define GBS_QUIT BUTTON_OFF +#else +#define GBS_QUIT BUTTON_POWER +#endif + #if LCD_DEPTH == 1 #define BMP_LOAD read_bmp_file #else @@ -74,7 +85,8 @@ enum plugin_status plugin_start(const void* parameter) grey_ub_gray_bitmap(grey_bm_buf, x, y, grey_bm.width, grey_bm.height); grey_show(true); - rb->button_get(true); + /* wait until user closes plugin */ + while (rb->button_get(true) != GBS_QUIT); grey_release(); |