summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorKjell Ericson <kjell@haxx.se>2003-05-27 12:54:11 +0000
committerKjell Ericson <kjell@haxx.se>2003-05-27 12:54:11 +0000
commit6143eeb22bac4306031bd96307f3428483c09273 (patch)
treec6d568a5902668ded5cc4b2774f09a578fc98600 /apps
parent6f2a1a6127194c92f04b346630cc7e5f2b5436d5 (diff)
downloadrockbox-6143eeb22bac4306031bd96307f3428483c09273.tar.gz
rockbox-6143eeb22bac4306031bd96307f3428483c09273.zip
Added "jump scroll delay" (for player).
Added that you can set how many times the jump scroll shall occur (max 5 times) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3697 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/lang/english.lang5
-rw-r--r--apps/settings.c7
-rw-r--r--apps/settings.h1
-rw-r--r--apps/settings_menu.c22
4 files changed, 31 insertions, 4 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index 604a77bd2e..a35db446ec 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -1532,3 +1532,8 @@ id: LANG_ALWAYS
1532desc: (player) the jump scroll shall be done "always" 1532desc: (player) the jump scroll shall be done "always"
1533eng: "Always" 1533eng: "Always"
1534new: 1534new:
1535
1536id: LANG_JUMP_SCROLL_DELAY
1537desc: (player) Delay before making a jump scroll
1538eng: "Jump Scroll Delay"
1539new:
diff --git a/apps/settings.c b/apps/settings.c
index 5c7ef7e645..5c12422056 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -145,6 +145,7 @@ Rest of config block, only saved to disk:
1450xF8 (int) Playlist shuffle seed 1450xF8 (int) Playlist shuffle seed
1460xFC (char[260]) Resume playlist (path/to/dir or path/to/playlist.m3u) 1460xFC (char[260]) Resume playlist (path/to/dir or path/to/playlist.m3u)
1470xFD (char)jump scroll mode (only for player) 1470xFD (char)jump scroll mode (only for player)
1480xFE (char)jump scroll delay (only for player)
148 149
149*************************************/ 150*************************************/
150 151
@@ -414,6 +415,7 @@ int settings_save( void )
414 strncpy(&config_block[0xFC], global_settings.resume_file, MAX_PATH); 415 strncpy(&config_block[0xFC], global_settings.resume_file, MAX_PATH);
415#ifdef HAVE_LCD_CHARCELLS 416#ifdef HAVE_LCD_CHARCELLS
416 config_block[0xfd]=(unsigned char)global_settings.jump_scroll; 417 config_block[0xfd]=(unsigned char)global_settings.jump_scroll;
418 config_block[0xfe]=(unsigned char)global_settings.jump_scroll_delay;
417#endif 419#endif
418 DEBUGF( "+Resume file %s\n",global_settings.resume_file ); 420 DEBUGF( "+Resume file %s\n",global_settings.resume_file );
419 DEBUGF( "+Resume index %X offset %X\n", 421 DEBUGF( "+Resume index %X offset %X\n",
@@ -533,6 +535,7 @@ void settings_apply(void)
533 lcd_scroll_step(global_settings.scroll_step); 535 lcd_scroll_step(global_settings.scroll_step);
534#else 536#else
535 lcd_jump_scroll(global_settings.jump_scroll); 537 lcd_jump_scroll(global_settings.jump_scroll);
538 lcd_jump_scroll_delay(global_settings.jump_scroll_delay);
536#endif 539#endif
537 lcd_bidir_scroll(global_settings.bidir_limit); 540 lcd_bidir_scroll(global_settings.bidir_limit);
538 lcd_scroll_delay(global_settings.scroll_delay * (HZ/10)); 541 lcd_scroll_delay(global_settings.scroll_delay * (HZ/10));
@@ -735,6 +738,8 @@ void settings_load(void)
735#ifdef HAVE_LCD_CHARSCELLS 738#ifdef HAVE_LCD_CHARSCELLS
736 if (config_block[0xfd] != 0xff) 739 if (config_block[0xfd] != 0xff)
737 global_settings.jump_scroll = config_block[0xfd]; 740 global_settings.jump_scroll = config_block[0xfd];
741 if (config_block[0xfe] != 0xff)
742 global_settings.jump_scroll_delay = config_block[0xfe];
738#endif 743#endif
739 global_settings.resume_file[MAX_PATH]=0; 744 global_settings.resume_file[MAX_PATH]=0;
740 } 745 }
@@ -1228,6 +1233,7 @@ bool settings_save_config(void)
1228 fprintf(fd, "scroll step: %d\r\n", global_settings.scroll_step); 1233 fprintf(fd, "scroll step: %d\r\n", global_settings.scroll_step);
1229#else 1234#else
1230 fprintf(fd, "jump scroll: %d\r\n", global_settings.jump_scroll); 1235 fprintf(fd, "jump scroll: %d\r\n", global_settings.jump_scroll);
1236 fprintf(fd, "jump scroll delay: %d\r\n", global_settings.jump_scroll_delay);
1231#endif 1237#endif
1232 1238
1233 fprintf(fd, "bidir limit: %d\r\n", global_settings.bidir_limit); 1239 fprintf(fd, "bidir limit: %d\r\n", global_settings.bidir_limit);
@@ -1406,6 +1412,7 @@ void settings_reset(void) {
1406 global_settings.bidir_limit = 50; 1412 global_settings.bidir_limit = 50;
1407#ifdef HAVE_LCD_CHARCELLS 1413#ifdef HAVE_LCD_CHARCELLS
1408 global_settings.jump_scroll = 1; 1414 global_settings.jump_scroll = 1;
1415 global_settings.jump_scroll_delay = 50;
1409#endif 1416#endif
1410 global_settings.scroll_delay = 100; 1417 global_settings.scroll_delay = 100;
1411 global_settings.scroll_step = 6; 1418 global_settings.scroll_step = 6;
diff --git a/apps/settings.h b/apps/settings.h
index 2d4d9fac2f..56bba8878d 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -153,6 +153,7 @@ struct user_settings
153 int scroll_step; /* pixels to advance per update */ 153 int scroll_step; /* pixels to advance per update */
154#ifdef HAVE_LCD_CHARCELLS 154#ifdef HAVE_LCD_CHARCELLS
155 int jump_scroll; /* Fast jump when scrolling */ 155 int jump_scroll; /* Fast jump when scrolling */
156 int jump_scroll_delay; /* Delay between jump scroll screens */
156#endif 157#endif
157 bool fade_on_stop; /* fade on pause/unpause/stop */ 158 bool fade_on_stop; /* fade on pause/unpause/stop */
158 bool caption_backlight; /* turn on backlight at end and start of track */ 159 bool caption_backlight; /* turn on backlight at end and start of track */
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index 52b8d86aac..db6499a313 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -459,10 +459,23 @@ static bool bidir_limit(void)
459#ifdef HAVE_LCD_CHARCELLS 459#ifdef HAVE_LCD_CHARCELLS
460static bool jump_scroll(void) 460static bool jump_scroll(void)
461{ 461{
462 char* names[] = { str(LANG_OFF), str(LANG_ONE_TIME), str(LANG_ALWAYS)}; 462 char* names[] = { str(LANG_OFF), str(LANG_ONE_TIME), "2",
463 463 "3", "4", str(LANG_ALWAYS)};
464 return set_option(str(LANG_JUMP_SCROLL), &global_settings.jump_scroll, 464 bool ret;
465 names, 3, lcd_jump_scroll); 465 ret=set_option(str(LANG_JUMP_SCROLL), &global_settings.jump_scroll,
466 names, 6, lcd_jump_scroll);
467 if (!ret && global_settings.jump_scroll>=JUMP_SCROLL_ALWAYS) {
468 global_settings.jump_scroll=254; /* Nice future "safe" value */
469 }
470 return ret;
471}
472static bool jump_scroll_delay(void)
473{
474 int dummy = global_settings.jump_scroll_delay * (HZ/10);
475 int rc = set_int(str(LANG_JUMP_SCROLL_DELAY), "ms", &dummy,
476 &lcd_jump_scroll_delay, 100, 0, 2500 );
477 global_settings.jump_scroll_delay = dummy / (HZ/10);
478 return rc;
466} 479}
467#endif 480#endif
468 481
@@ -761,6 +774,7 @@ static bool scroll_settings_menu(void)
761 { str(LANG_BIDIR_SCROLL), bidir_limit }, 774 { str(LANG_BIDIR_SCROLL), bidir_limit },
762#ifdef HAVE_LCD_CHARCELLS 775#ifdef HAVE_LCD_CHARCELLS
763 { str(LANG_JUMP_SCROLL), jump_scroll }, 776 { str(LANG_JUMP_SCROLL), jump_scroll },
777 { str(LANG_JUMP_SCROLL_DELAY), jump_scroll_delay },
764#endif 778#endif
765 }; 779 };
766 780