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

[PATCH] make set_option() wrap

From: Lee Marlow <lmarlow_at_yahoo.com>
Date: Fri, 13 Sep 2002 22:46:00 -0700 (PDT)

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
_at__at_ -707,6 +707,8 _at__at_
 #endif
                 if ( *variable < (numoptions-1) )
                     (*variable)++;
+ else
+ (*variable) -= (numoptions-1);
                 break;
 
 #ifdef HAVE_RECORDER_KEYPAD
_at__at_ -718,6 +720,8 _at__at_
 #endif
                 if ( *variable > 0 )
                     (*variable)--;
+ else
+ (*variable) += (numoptions-1);
                 break;
 
 #ifdef HAVE_RECORDER_KEYPAD
Received on 2002-09-14

Page was last modified "Mon Nov 16 10:57:21 2020" The Rockbox Crew -- Privacy Policy