|
Rockbox mail archiveSubject: Simple parameter display patch.Simple parameter display patch.
From: Mats Lidell <matsl_at_contactor.se>
Date: Thu, 08 Aug 2002 14:44:58 +0200 Hi, This patch (for the player) changes the parameter setting menu to use a bar off '#' on line two to show the parameter setting. Index: sound_menu.c =================================================================== RCS file: /cvsroot/rockbox/apps/sound_menu.c,v retrieving revision 1.18 diff -u -u -r1.18 sound_menu.c --- sound_menu.c 27 Jul 2002 22:45:29 -0000 1.18 +++ sound_menu.c 8 Aug 2002 12:29:24 -0000 _at__at_ -45,14 +45,13 _at__at_ char* unit; char str[32]; + int numval, i; + unit = mpeg_sound_unit(setting); numdec = mpeg_sound_numdecimals(setting); min = mpeg_sound_min(setting); max = mpeg_sound_max(setting); - lcd_clear_display(); - lcd_puts_scroll(0,0,string); - while (!done) { val = mpeg_val2phys(setting, *variable); if(numdec) _at__at_ -63,9 +62,16 _at__at_ } else { - snprintf(str,sizeof str,"%d %s ", val, unit); + snprintf(str,sizeof str,"%6s%3d%s ", string, val, unit); } - lcd_puts(0,1,str); + lcd_clear_display(); + lcd_puts(0,0,str); + + numval = ((*variable - min) * 11) / (max - min); + for (i = 0; i < numval; ++i) str[i] = '#'; + str[i] = '\0'; + lcd_puts(0, 1, str); + lcd_update(); switch( button_get(true) ) { _at__at_ -109,12 +115,12 _at__at_ static void volume(void) { - set_sound("Volume", &global_settings.volume, SOUND_VOLUME); + set_sound("Volume ", &global_settings.volume, SOUND_VOLUME); } static void bass(void) { - set_sound("Bass", &global_settings.bass, SOUND_BASS); + set_sound("Bass ", &global_settings.bass, SOUND_BASS); }; static void treble(void) -- %% MatsReceived on 2002-08-08 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |