diff options
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 28 |
1 files changed, 28 insertions, 0 deletions
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 @@ | |||
74 | #ifdef HAVE_LCD_COLOR | 74 | #ifdef HAVE_LCD_COLOR |
75 | #include "backdrop.h" | 75 | #include "backdrop.h" |
76 | #endif | 76 | #endif |
77 | #include "tree.h" | ||
77 | 78 | ||
78 | #ifdef CONFIG_TUNER | 79 | #ifdef CONFIG_TUNER |
79 | #include "radio.h" | 80 | #include "radio.h" |
@@ -1013,6 +1014,11 @@ int settings_save( void ) | |||
1013 | MAX_FILENAME); | 1014 | MAX_FILENAME); |
1014 | i+= MAX_FILENAME; | 1015 | i+= MAX_FILENAME; |
1015 | #endif | 1016 | #endif |
1017 | #ifdef HAVE_RECORDING | ||
1018 | strncpy((char *)&config_block[i], (char *)global_settings.rec_path, | ||
1019 | MAX_PATH); | ||
1020 | i+= MAX_PATH; | ||
1021 | #endif | ||
1016 | 1022 | ||
1017 | if(save_config_buffer()) | 1023 | if(save_config_buffer()) |
1018 | { | 1024 | { |
@@ -1410,6 +1416,11 @@ void settings_load(int which) | |||
1410 | MAX_FILENAME); | 1416 | MAX_FILENAME); |
1411 | i+= MAX_FILENAME; | 1417 | i+= MAX_FILENAME; |
1412 | #endif | 1418 | #endif |
1419 | #ifdef HAVE_RECORDING | ||
1420 | strncpy((char *)global_settings.rec_path, (char *)&config_block[i], | ||
1421 | MAX_PATH); | ||
1422 | i+= MAX_PATH; | ||
1423 | #endif | ||
1413 | } | 1424 | } |
1414 | } | 1425 | } |
1415 | 1426 | ||
@@ -1769,6 +1780,11 @@ bool settings_save_config(void) | |||
1769 | global_settings.kbd_file); | 1780 | global_settings.kbd_file); |
1770 | #endif | 1781 | #endif |
1771 | 1782 | ||
1783 | #ifdef HAVE_RECORDING | ||
1784 | if (global_settings.rec_path[0] != 0) | ||
1785 | fdprintf(fd, "recording path: %s\r\n", global_settings.rec_path); | ||
1786 | #endif | ||
1787 | |||
1772 | /* here's the action: write values to file, specified via table */ | 1788 | /* here's the action: write values to file, specified via table */ |
1773 | save_cfg_table(rtc_bits, sizeof(rtc_bits)/sizeof(rtc_bits[0]), fd); | 1789 | save_cfg_table(rtc_bits, sizeof(rtc_bits)/sizeof(rtc_bits[0]), fd); |
1774 | save_cfg_table(hd_bits, sizeof(hd_bits)/sizeof(hd_bits[0]), fd); | 1790 | save_cfg_table(hd_bits, sizeof(hd_bits)/sizeof(hd_bits[0]), fd); |
@@ -1863,6 +1879,9 @@ void settings_reset(void) { | |||
1863 | #ifdef HAVE_LCD_BITMAP | 1879 | #ifdef HAVE_LCD_BITMAP |
1864 | global_settings.kbd_file[0] = '\0'; | 1880 | global_settings.kbd_file[0] = '\0'; |
1865 | #endif | 1881 | #endif |
1882 | #ifdef HAVE_RECORDING | ||
1883 | global_settings.rec_path[0] = '\0'; | ||
1884 | #endif | ||
1866 | global_settings.hold_lr_for_scroll_in_list = true; | 1885 | global_settings.hold_lr_for_scroll_in_list = true; |
1867 | } | 1886 | } |
1868 | 1887 | ||
@@ -2148,3 +2167,12 @@ void settings_apply_trigger(void) | |||
2148 | ); | 2167 | ); |
2149 | } | 2168 | } |
2150 | #endif | 2169 | #endif |
2170 | #ifdef HAVE_RECORDING | ||
2171 | void set_recpath(void) | ||
2172 | { | ||
2173 | if(global_settings.rec_directory) | ||
2174 | getcwd(global_settings.rec_path, MAX_PATH); | ||
2175 | else | ||
2176 | strncpy(global_settings.rec_path, rec_base_directory, MAX_PATH); | ||
2177 | } | ||
2178 | #endif | ||