From e5ee9a25c56a9e4134a4b2123c417e434a364c01 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sat, 22 Jul 2006 13:47:11 +0000 Subject: Patch by Alexander Spyridakis - Add forgotten remote_bidir_scroll setting. Don't forget to save your settings before upgrading. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10283 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.c | 4 +++- apps/settings.h | 1 + apps/settings_menu.c | 11 ++++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/settings.c b/apps/settings.c index fb2b369cd7..e065e78c81 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -94,7 +94,7 @@ const char rec_base_directory[] = REC_BASE_DIR; #include "dsp.h" #endif -#define CONFIG_BLOCK_VERSION 45 +#define CONFIG_BLOCK_VERSION 46 #define CONFIG_BLOCK_SIZE 512 #define RTC_BLOCK_SIZE 44 @@ -364,6 +364,7 @@ static const struct bit_entry hd_bits[] = {4, S_O(remote_scroll_speed), 9, "remote scroll speed", NULL }, /* 0...15 */ {8, S_O(remote_scroll_step), 6, "remote scroll step", NULL }, /* 1...160 */ {8, S_O(remote_scroll_delay), 100, "remote scroll delay", NULL }, /* 0...250 */ + {8, S_O(remote_bidir_limit), 50, "remote bidir limit", NULL }, /* 0...200 */ #endif #ifdef HAVE_LCD_BITMAP @@ -1018,6 +1019,7 @@ void settings_apply(void) lcd_remote_scroll_speed(global_settings.remote_scroll_speed); lcd_remote_scroll_step(global_settings.remote_scroll_step); lcd_remote_scroll_delay(global_settings.remote_scroll_delay * (HZ/10)); + lcd_remote_bidir_scroll(global_settings.remote_bidir_limit); #ifdef HAVE_REMOTE_LCD_TICKING lcd_remote_emireduce(global_settings.remote_reduce_ticking); #endif diff --git a/apps/settings.h b/apps/settings.h index dc9e4f84d5..4809c18575 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -353,6 +353,7 @@ struct user_settings int remote_scroll_speed; /* long texts scrolling speed: 1-30 */ int remote_scroll_delay; /* delay (in 1/10s) before starting scroll */ int remote_scroll_step; /* pixels to advance per update */ + int remote_bidir_limit; /* bidir scroll length limit */ #endif #ifdef HAVE_LCD_BITMAP diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 8417e77341..3e02727f9e 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c @@ -880,6 +880,14 @@ static bool remote_scroll_delay(void) global_settings.remote_scroll_delay = dummy / (HZ/10); return rc; } + +static bool remote_bidir_limit(void) +{ + return set_int(str(LANG_BIDIR_SCROLL), "%", UNIT_PERCENT, + &global_settings.remote_bidir_limit, + &lcd_remote_bidir_scroll, 25, 0, 200, NULL ); +} + #endif #ifdef HAVE_LCD_BITMAP @@ -1708,6 +1716,7 @@ static bool remote_scroll_sets(void) { ID2P(LANG_SCROLL_SPEED), remote_scroll_speed }, { ID2P(LANG_SCROLL_DELAY), remote_scroll_delay }, { ID2P(LANG_SCROLL_STEP), remote_scroll_step }, + { ID2P(LANG_BIDIR_SCROLL), remote_bidir_limit }, }; m=menu_init( items, sizeof(items) / sizeof(*items), NULL, @@ -1729,10 +1738,10 @@ static bool scroll_settings_menu(void) #ifdef HAVE_LCD_BITMAP { ID2P(LANG_SCROLL_STEP), scroll_step }, #endif + { ID2P(LANG_BIDIR_SCROLL), bidir_limit }, #ifdef HAVE_REMOTE_LCD { ID2P(LANG_REMOTE_SCROLL_SETS), remote_scroll_sets }, #endif - { ID2P(LANG_BIDIR_SCROLL), bidir_limit }, #ifdef HAVE_LCD_CHARCELLS { ID2P(LANG_JUMP_SCROLL), jump_scroll }, { ID2P(LANG_JUMP_SCROLL_DELAY), jump_scroll_delay }, -- cgit v1.2.3