diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2008-05-03 14:55:34 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2008-05-03 14:55:34 +0000 |
commit | d4027744b6d06919bcc33ba540c7d0e3fb9014b0 (patch) | |
tree | ccc4ec19424f4a3dca6b4e088b9e4b7acfd803d2 /apps | |
parent | ed5f1ed3e21e44cf052834c7d6fd70abfd1a6196 (diff) |
Flashlight plugin: make color sets wrap around in both directions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17325 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/flashlight.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/plugins/flashlight.c b/apps/plugins/flashlight.c index e502d0e227..b732545ea6 100644 --- a/apps/plugins/flashlight.c +++ b/apps/plugins/flashlight.c @@ -139,7 +139,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) #ifdef HAVE_LCD_COLOR do { - if((cs < 0) || (cs >= NUM_COLORSETS)) + if(cs < 0) + cs = NUM_COLORSETS-1; + if(cs >= NUM_COLORSETS) cs = 0; rb->lcd_set_background( LCD_RGBPACK( colorset[cs][0], colorset[cs][1], |