From c06eadb572a7314fb42f59c33060c6b148fdef8a Mon Sep 17 00:00:00 2001 From: Martin Scarratt Date: Wed, 27 Sep 2006 21:28:47 +0000 Subject: If a directory is created in the recording screen, the dir browser needs refreshing git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11080 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'apps/settings.c') diff --git a/apps/settings.c b/apps/settings.c index ee7fa36d39..87d0724b48 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -74,6 +74,7 @@ #ifdef HAVE_LCD_COLOR #include "backdrop.h" #endif +#include "tree.h" #ifdef CONFIG_TUNER #include "radio.h" @@ -1013,6 +1014,11 @@ int settings_save( void ) MAX_FILENAME); i+= MAX_FILENAME; #endif +#ifdef HAVE_RECORDING + strncpy((char *)&config_block[i], (char *)global_settings.rec_path, + MAX_PATH); + i+= MAX_PATH; +#endif if(save_config_buffer()) { @@ -1409,6 +1415,11 @@ void settings_load(int which) strncpy((char *)global_settings.kbd_file, (char *)&config_block[i], MAX_FILENAME); i+= MAX_FILENAME; +#endif +#ifdef HAVE_RECORDING + strncpy((char *)global_settings.rec_path, (char *)&config_block[i], + MAX_PATH); + i+= MAX_PATH; #endif } } @@ -1769,6 +1780,11 @@ bool settings_save_config(void) global_settings.kbd_file); #endif +#ifdef HAVE_RECORDING + if (global_settings.rec_path[0] != 0) + fdprintf(fd, "recording path: %s\r\n", global_settings.rec_path); +#endif + /* here's the action: write values to file, specified via table */ save_cfg_table(rtc_bits, sizeof(rtc_bits)/sizeof(rtc_bits[0]), fd); save_cfg_table(hd_bits, sizeof(hd_bits)/sizeof(hd_bits[0]), fd); @@ -1862,6 +1878,9 @@ void settings_reset(void) { #endif #ifdef HAVE_LCD_BITMAP global_settings.kbd_file[0] = '\0'; +#endif +#ifdef HAVE_RECORDING + global_settings.rec_path[0] = '\0'; #endif global_settings.hold_lr_for_scroll_in_list = true; } @@ -2148,3 +2167,12 @@ void settings_apply_trigger(void) ); } #endif +#ifdef HAVE_RECORDING +void set_recpath(void) +{ + if(global_settings.rec_directory) + getcwd(global_settings.rec_path, MAX_PATH); + else + strncpy(global_settings.rec_path, rec_base_directory, MAX_PATH); +} +#endif -- cgit v1.2.3