summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/skin_engine/skin_parser.c1
-rw-r--r--apps/radio/presets.c15
2 files changed, 9 insertions, 7 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index 80f3800ade..7f3f4d62e1 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -61,6 +61,7 @@
61#include "skin_engine.h" 61#include "skin_engine.h"
62#include "settings.h" 62#include "settings.h"
63#include "settings_list.h" 63#include "settings_list.h"
64#include "rbpaths.h"
64#if CONFIG_TUNER 65#if CONFIG_TUNER
65#include "radio.h" 66#include "radio.h"
66#include "tuner.h" 67#include "tuner.h"
diff --git a/apps/radio/presets.c b/apps/radio/presets.c
index f7531d8754..51bdabdfce 100644
--- a/apps/radio/presets.c
+++ b/apps/radio/presets.c
@@ -23,6 +23,7 @@
23#include <stdio.h> 23#include <stdio.h>
24#include <stdbool.h> 24#include <stdbool.h>
25#include <stdlib.h> 25#include <stdlib.h>
26#include "settings.h"
26#include "rbpaths.h" 27#include "rbpaths.h"
27#include "general.h" 28#include "general.h"
28#include "radio.h" 29#include "radio.h"
@@ -110,7 +111,7 @@ static int find_closest_preset(int freq, int direction)
110 int f = presets[i].frequency; 111 int f = presets[i].frequency;
111 if (f == freq) 112 if (f == freq)
112 return i; /* Exact match = stop */ 113 return i; /* Exact match = stop */
113 114
114 /* remember the highest and lowest presets for wraparound */ 115 /* remember the highest and lowest presets for wraparound */
115 if (f < presets[lowpreset].frequency) 116 if (f < presets[lowpreset].frequency)
116 lowpreset = i; 117 lowpreset = i;
@@ -223,7 +224,7 @@ void radio_load_presets(char *filename)
223 return; 224 return;
224 } 225 }
225 /* Temporary preset, loaded until player shuts down. */ 226 /* Temporary preset, loaded until player shuts down. */
226 else if(filename[0] == '/') 227 else if(filename[0] == '/')
227 strlcpy(filepreset, filename, sizeof(filepreset)); 228 strlcpy(filepreset, filename, sizeof(filepreset));
228 /* Preset from default directory. */ 229 /* Preset from default directory. */
229 else 230 else
@@ -361,7 +362,7 @@ int preset_list_load(void)
361int preset_list_save(void) 362int preset_list_save(void)
362{ 363{
363 if(num_presets > 0) 364 if(num_presets > 0)
364 { 365 {
365 bool bad_file_name = true; 366 bool bad_file_name = true;
366 367
367 if(!dir_exists(FMPRESET_PATH)) /* Check if there is preset folder */ 368 if(!dir_exists(FMPRESET_PATH)) /* Check if there is preset folder */
@@ -426,11 +427,11 @@ int preset_list_clear(void)
426 return true; 427 return true;
427} 428}
428 429
429MENUITEM_FUNCTION(radio_edit_preset_item, MENU_FUNC_CHECK_RETVAL, 430MENUITEM_FUNCTION(radio_edit_preset_item, MENU_FUNC_CHECK_RETVAL,
430 ID2P(LANG_FM_EDIT_PRESET), 431 ID2P(LANG_FM_EDIT_PRESET),
431 radio_edit_preset, NULL, NULL, Icon_NOICON); 432 radio_edit_preset, NULL, NULL, Icon_NOICON);
432MENUITEM_FUNCTION(radio_delete_preset_item, MENU_FUNC_CHECK_RETVAL, 433MENUITEM_FUNCTION(radio_delete_preset_item, MENU_FUNC_CHECK_RETVAL,
433 ID2P(LANG_FM_DELETE_PRESET), 434 ID2P(LANG_FM_DELETE_PRESET),
434 radio_delete_preset, NULL, NULL, Icon_NOICON); 435 radio_delete_preset, NULL, NULL, Icon_NOICON);
435static int radio_preset_callback(int action, 436static int radio_preset_callback(int action,
436 const struct menu_item_ex *this_item, 437 const struct menu_item_ex *this_item,
@@ -443,7 +444,7 @@ static int radio_preset_callback(int action,
443 (void)this_list; 444 (void)this_list;
444} 445}
445MAKE_MENU(handle_radio_preset_menu, ID2P(LANG_PRESET), 446MAKE_MENU(handle_radio_preset_menu, ID2P(LANG_PRESET),
446 radio_preset_callback, Icon_NOICON, &radio_edit_preset_item, 447 radio_preset_callback, Icon_NOICON, &radio_edit_preset_item,
447 &radio_delete_preset_item); 448 &radio_delete_preset_item);
448/* present a list of preset stations */ 449/* present a list of preset stations */
449static const char* presets_get_name(int selected_item, void *data, 450static const char* presets_get_name(int selected_item, void *data,