Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: [PATCH] make set_option() wrap
From: Lee Marlow (lmarlow_at_yahoo.com)
Date: 2002-09-14


This patch allows you to cycle through setting values
using just one button. I only changed set_option(),
because I wasn't sure if we want the behavior for
set_sound() and set_int().

Strike another one off the TODO list!

-Lee

__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

Index: settings.c
===================================================================
RCS file: /cvsroot/rockbox/apps/settings.c,v
retrieving revision 1.54
diff -u -b -r1.54 settings.c
--- settings.c 12 Sep 2002 13:33:57 -0000 1.54
+++ settings.c 14 Sep 2002 05:26:04 -0000
@@ -707,6 +707,8 @@
 #endif
                 if ( *variable < (numoptions-1) )
                     (*variable)++;
+ else
+ (*variable) -= (numoptions-1);
                 break;
 
 #ifdef HAVE_RECORDER_KEYPAD
@@ -718,6 +720,8 @@
 #endif
                 if ( *variable > 0 )
                     (*variable)--;
+ else
+ (*variable) += (numoptions-1);
                 break;
 
 #ifdef HAVE_RECORDER_KEYPAD



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa