summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/apps/settings.c b/apps/settings.c
index f4bb2427a4..5c7ef7e645 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -144,6 +144,7 @@ Rest of config block, only saved to disk:
1440xF4 (int) Playlist first index 1440xF4 (int) Playlist first index
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)
147 148
148*************************************/ 149*************************************/
149 150
@@ -411,7 +412,9 @@ int settings_save( void )
411 memcpy(&config_block[0xF8], &global_settings.resume_seed, 4); 412 memcpy(&config_block[0xF8], &global_settings.resume_seed, 4);
412 413
413 strncpy(&config_block[0xFC], global_settings.resume_file, MAX_PATH); 414 strncpy(&config_block[0xFC], global_settings.resume_file, MAX_PATH);
414 415#ifdef HAVE_LCD_CHARCELLS
416 config_block[0xfd]=(unsigned char)global_settings.jump_scroll;
417#endif
415 DEBUGF( "+Resume file %s\n",global_settings.resume_file ); 418 DEBUGF( "+Resume file %s\n",global_settings.resume_file );
416 DEBUGF( "+Resume index %X offset %X\n", 419 DEBUGF( "+Resume index %X offset %X\n",
417 global_settings.resume_index, 420 global_settings.resume_index,
@@ -528,6 +531,8 @@ void settings_apply(void)
528 font_reset(); 531 font_reset();
529 532
530 lcd_scroll_step(global_settings.scroll_step); 533 lcd_scroll_step(global_settings.scroll_step);
534#else
535 lcd_jump_scroll(global_settings.jump_scroll);
531#endif 536#endif
532 lcd_bidir_scroll(global_settings.bidir_limit); 537 lcd_bidir_scroll(global_settings.bidir_limit);
533 lcd_scroll_delay(global_settings.scroll_delay * (HZ/10)); 538 lcd_scroll_delay(global_settings.scroll_delay * (HZ/10));
@@ -727,6 +732,10 @@ void settings_load(void)
727 strncpy(global_settings.lang_file, &config_block[0xcc], MAX_FILENAME); 732 strncpy(global_settings.lang_file, &config_block[0xcc], MAX_FILENAME);
728 strncpy(global_settings.font_file, &config_block[0xe0], MAX_FILENAME); 733 strncpy(global_settings.font_file, &config_block[0xe0], MAX_FILENAME);
729 strncpy(global_settings.resume_file, &config_block[0xFC], MAX_PATH); 734 strncpy(global_settings.resume_file, &config_block[0xFC], MAX_PATH);
735#ifdef HAVE_LCD_CHARSCELLS
736 if (config_block[0xfd] != 0xff)
737 global_settings.jump_scroll = config_block[0xfd];
738#endif
730 global_settings.resume_file[MAX_PATH]=0; 739 global_settings.resume_file[MAX_PATH]=0;
731 } 740 }
732 741
@@ -1217,6 +1226,8 @@ bool settings_save_config(void)
1217 1226
1218#ifdef HAVE_LCD_BITMAP 1227#ifdef HAVE_LCD_BITMAP
1219 fprintf(fd, "scroll step: %d\r\n", global_settings.scroll_step); 1228 fprintf(fd, "scroll step: %d\r\n", global_settings.scroll_step);
1229#else
1230 fprintf(fd, "jump scroll: %d\r\n", global_settings.jump_scroll);
1220#endif 1231#endif
1221 1232
1222 fprintf(fd, "bidir limit: %d\r\n", global_settings.bidir_limit); 1233 fprintf(fd, "bidir limit: %d\r\n", global_settings.bidir_limit);
@@ -1393,6 +1404,9 @@ void settings_reset(void) {
1393 global_settings.battery_type = 0; 1404 global_settings.battery_type = 0;
1394 global_settings.scroll_speed = 8; 1405 global_settings.scroll_speed = 8;
1395 global_settings.bidir_limit = 50; 1406 global_settings.bidir_limit = 50;
1407#ifdef HAVE_LCD_CHARCELLS
1408 global_settings.jump_scroll = 1;
1409#endif
1396 global_settings.scroll_delay = 100; 1410 global_settings.scroll_delay = 100;
1397 global_settings.scroll_step = 6; 1411 global_settings.scroll_step = 6;
1398 global_settings.ff_rewind_min_step = DEFAULT_FF_REWIND_MIN_STEP; 1412 global_settings.ff_rewind_min_step = DEFAULT_FF_REWIND_MIN_STEP;