mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
A bit mroe wps/skin engine cleanup so that the structs the wps uses can be static:
-add wrappers wps_data_load() and wps_data_init() so that other code doesn't need the structs for that -change (and rename) gui_sync_wps_uses_albumart() to take points to be filled as parameter to get the AA size of a wps git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22139 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0dc5cc8002
commit
3b75c86d74
11 changed files with 82 additions and 57 deletions
|
|
@ -51,7 +51,7 @@
|
||||||
#if CONFIG_TUNER
|
#if CONFIG_TUNER
|
||||||
#include "radio.h"
|
#include "radio.h"
|
||||||
#endif
|
#endif
|
||||||
#include "skin_engine/skin_engine.h"
|
#include "wps.h"
|
||||||
#include "backdrop.h"
|
#include "backdrop.h"
|
||||||
|
|
||||||
static int compare_sort_dir; /* qsort key for sorting directories */
|
static int compare_sort_dir; /* qsort key for sorting directories */
|
||||||
|
|
@ -484,7 +484,7 @@ int ft_enter(struct tree_context* c)
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
unload_wps_backdrop();
|
unload_wps_backdrop();
|
||||||
#endif
|
#endif
|
||||||
skin_data_load(gui_wps[0].data, &screens[0], buf, true);
|
wps_data_load(SCREEN_MAIN, buf, true);
|
||||||
set_file(buf, (char *)global_settings.wps_file,
|
set_file(buf, (char *)global_settings.wps_file,
|
||||||
MAX_FILENAME);
|
MAX_FILENAME);
|
||||||
break;
|
break;
|
||||||
|
|
@ -496,7 +496,7 @@ int ft_enter(struct tree_context* c)
|
||||||
#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
|
#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
|
||||||
unload_remote_wps_backdrop();
|
unload_remote_wps_backdrop();
|
||||||
#endif
|
#endif
|
||||||
skin_data_load(gui_wps[1].data, &screens[1], buf, true);
|
wps_data_load(SCREEN_REMOTE, buf, true);
|
||||||
set_file(buf, (char *)global_settings.rwps_file,
|
set_file(buf, (char *)global_settings.rwps_file,
|
||||||
MAX_FILENAME);
|
MAX_FILENAME);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,6 @@
|
||||||
int wps_get_touchaction(struct wps_data *data);
|
int wps_get_touchaction(struct wps_data *data);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_ALBUMART
|
|
||||||
/* gives back if WPS contains an albumart tag */
|
|
||||||
bool gui_sync_wps_uses_albumart(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* setup and display a WPS for the first time */
|
/* setup and display a WPS for the first time */
|
||||||
bool gui_wps_display(struct gui_wps *gwps);
|
bool gui_wps_display(struct gui_wps *gwps);
|
||||||
|
|
||||||
|
|
@ -52,8 +47,6 @@ void skin_data_load(struct wps_data *wps_data,
|
||||||
bool isfile);
|
bool isfile);
|
||||||
|
|
||||||
|
|
||||||
|
/* initial setup of wps_data */
|
||||||
|
void skin_data_init(struct wps_data *wps_data);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -470,9 +470,6 @@ struct wps_data
|
||||||
unsigned int button_time_volume;
|
unsigned int button_time_volume;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* initial setup of wps_data */
|
|
||||||
void wps_data_init(struct wps_data *wps_data);
|
|
||||||
|
|
||||||
|
|
||||||
/* Redraw statusbars if necessary */
|
/* Redraw statusbars if necessary */
|
||||||
void gwps_draw_statusbars(void);
|
void gwps_draw_statusbars(void);
|
||||||
|
|
@ -536,10 +533,6 @@ struct gui_wps
|
||||||
/* gui_wps end */
|
/* gui_wps end */
|
||||||
|
|
||||||
|
|
||||||
/* currently only on wps_state is needed */
|
|
||||||
extern struct wps_state wps_state;
|
|
||||||
extern struct gui_wps gui_wps[NB_SCREENS];
|
|
||||||
|
|
||||||
/***** wps_tokens.c ******/
|
/***** wps_tokens.c ******/
|
||||||
|
|
||||||
const char *get_token_value(struct gui_wps *gwps,
|
const char *get_token_value(struct gui_wps *gwps,
|
||||||
|
|
|
||||||
|
|
@ -1552,7 +1552,7 @@ static void wps_images_clear(struct wps_data *data)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* initial setup of wps_data */
|
/* initial setup of wps_data */
|
||||||
void wps_data_init(struct wps_data *wps_data)
|
void skin_data_init(struct wps_data *wps_data)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
wps_images_clear(wps_data);
|
wps_images_clear(wps_data);
|
||||||
|
|
@ -1581,7 +1581,7 @@ static void wps_reset(struct wps_data *data)
|
||||||
bool rwps = data->remote_wps; /* remember whether the data is for a RWPS */
|
bool rwps = data->remote_wps; /* remember whether the data is for a RWPS */
|
||||||
#endif
|
#endif
|
||||||
memset(data, 0, sizeof(*data));
|
memset(data, 0, sizeof(*data));
|
||||||
wps_data_init(data);
|
skin_data_init(data);
|
||||||
#ifdef HAVE_REMOTE_LCD
|
#ifdef HAVE_REMOTE_LCD
|
||||||
data->remote_wps = rwps;
|
data->remote_wps = rwps;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1666,7 +1666,7 @@ static bool load_wps_bitmaps(struct wps_data *wps_data, char *bmpdir)
|
||||||
|
|
||||||
/* to setup up the wps-data from a format-buffer (isfile = false)
|
/* to setup up the wps-data from a format-buffer (isfile = false)
|
||||||
from a (wps-)file (isfile = true)*/
|
from a (wps-)file (isfile = true)*/
|
||||||
static bool wps_data_load(struct wps_data *wps_data,
|
static bool _skin_data_load(struct wps_data *wps_data,
|
||||||
struct screen *display,
|
struct screen *display,
|
||||||
const char *buf,
|
const char *buf,
|
||||||
bool isfile)
|
bool isfile)
|
||||||
|
|
@ -1820,7 +1820,7 @@ void skin_data_load(struct wps_data *wps_data,
|
||||||
const char *buf,
|
const char *buf,
|
||||||
bool isfile)
|
bool isfile)
|
||||||
{
|
{
|
||||||
bool loaded_ok = buf && wps_data_load(wps_data, display, buf, isfile);
|
bool loaded_ok = buf && _skin_data_load(wps_data, display, buf, isfile);
|
||||||
if (!loaded_ok) /* load the hardcoded default */
|
if (!loaded_ok) /* load the hardcoded default */
|
||||||
{
|
{
|
||||||
/* set the default wps for the main-screen */
|
/* set the default wps for the main-screen */
|
||||||
|
|
@ -1829,7 +1829,7 @@ void skin_data_load(struct wps_data *wps_data,
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
unload_wps_backdrop();
|
unload_wps_backdrop();
|
||||||
#endif
|
#endif
|
||||||
wps_data_load(wps_data,
|
_skin_data_load(wps_data,
|
||||||
display,
|
display,
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
"%s%?it<%?in<%in. |>%it|%fn>\n"
|
"%s%?it<%?in<%in. |>%it|%fn>\n"
|
||||||
|
|
@ -1852,7 +1852,7 @@ void skin_data_load(struct wps_data *wps_data,
|
||||||
#if LCD_REMOTE_DEPTH > 1
|
#if LCD_REMOTE_DEPTH > 1
|
||||||
unload_remote_wps_backdrop();
|
unload_remote_wps_backdrop();
|
||||||
#endif
|
#endif
|
||||||
wps_data_load(wps_data,
|
_skin_data_load(wps_data,
|
||||||
display,
|
display,
|
||||||
"%s%?ia<%ia|%?d2<%d2|(root)>>\n"
|
"%s%?ia<%ia|%?d2<%d2|(root)>>\n"
|
||||||
"%s%?it<%?in<%in. |>%it|%fn>\n"
|
"%s%?it<%?in<%in. |>%it|%fn>\n"
|
||||||
|
|
|
||||||
|
|
@ -75,8 +75,8 @@
|
||||||
|
|
||||||
static int wpsbars;
|
static int wpsbars;
|
||||||
/* currently only one wps_state is needed */
|
/* currently only one wps_state is needed */
|
||||||
struct wps_state wps_state;
|
static struct wps_state wps_state;
|
||||||
struct gui_wps gui_wps[NB_SCREENS];
|
static struct gui_wps gui_wps[NB_SCREENS];
|
||||||
static struct wps_data wps_datas[NB_SCREENS];
|
static struct wps_data wps_datas[NB_SCREENS];
|
||||||
|
|
||||||
/* initial setup of wps_data */
|
/* initial setup of wps_data */
|
||||||
|
|
@ -90,6 +90,19 @@ static void nextid3available_callback(void* param);
|
||||||
/* 3% of 30min file == 54s step size */
|
/* 3% of 30min file == 54s step size */
|
||||||
#define MIN_FF_REWIND_STEP 500
|
#define MIN_FF_REWIND_STEP 500
|
||||||
|
|
||||||
|
void wps_data_load(enum screen_type screen, const char *buf, bool is_file)
|
||||||
|
{
|
||||||
|
skin_data_load(gui_wps[screen].data, &screens[screen], buf, is_file);
|
||||||
|
#ifdef HAVE_REMOVE_LCD
|
||||||
|
gui_wps[screen].data->remote_wps = !(screen == SCREEN_MAIN);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void wps_data_init(enum screen_type screen)
|
||||||
|
{
|
||||||
|
skin_data_init(gui_wps[screen].data);
|
||||||
|
}
|
||||||
|
|
||||||
bool wps_fading_out = false;
|
bool wps_fading_out = false;
|
||||||
void fade(bool fade_in, bool updatewps)
|
void fade(bool fade_in, bool updatewps)
|
||||||
{
|
{
|
||||||
|
|
@ -165,6 +178,7 @@ bool update_onvol_change(struct gui_wps * gwps)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ffwd_rew(int button)
|
bool ffwd_rew(int button)
|
||||||
{
|
{
|
||||||
unsigned int step = 0; /* current ff/rewind step */
|
unsigned int step = 0; /* current ff/rewind step */
|
||||||
|
|
@ -1176,7 +1190,7 @@ void gui_sync_wps_init(void)
|
||||||
int i;
|
int i;
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
wps_data_init(&wps_datas[i]);
|
skin_data_init(&wps_datas[i]);
|
||||||
#ifdef HAVE_ALBUMART
|
#ifdef HAVE_ALBUMART
|
||||||
wps_datas[i].wps_uses_albumart = 0;
|
wps_datas[i].wps_uses_albumart = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1201,16 +1215,20 @@ void gui_sync_wps_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_ALBUMART
|
#ifdef HAVE_ALBUMART
|
||||||
/* Returns true if at least one of the gui_wps screens has an album art
|
bool wps_uses_albumart(int *width, int *height)
|
||||||
tag in its wps structure */
|
|
||||||
bool gui_sync_wps_uses_albumart(void)
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
FOR_NB_SCREENS(i) {
|
FOR_NB_SCREENS(i) {
|
||||||
struct gui_wps *gwps = &gui_wps[i];
|
struct gui_wps *gwps = &gui_wps[i];
|
||||||
if (gwps->data && (gwps->data->wps_uses_albumart != WPS_ALBUMART_NONE))
|
if (gwps->data && (gwps->data->wps_uses_albumart != WPS_ALBUMART_NONE))
|
||||||
|
{
|
||||||
|
if (width)
|
||||||
|
*width = gui_wps[0].data->albumart_max_width;
|
||||||
|
if (height)
|
||||||
|
*height = gui_wps[0].data->albumart_max_height;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -34,4 +34,17 @@ bool ffwd_rew(int button);
|
||||||
void display_keylock_text(bool locked);
|
void display_keylock_text(bool locked);
|
||||||
|
|
||||||
bool is_wps_fading(void);
|
bool is_wps_fading(void);
|
||||||
|
|
||||||
|
/* wrapper for the wps to load the skin (.wps/.rwps) files */
|
||||||
|
void wps_data_load(enum screen_type, const char *, bool);
|
||||||
|
void wps_data_init(enum screen_type);
|
||||||
|
|
||||||
|
#ifdef HAVE_ALBUMART
|
||||||
|
/*
|
||||||
|
* Returns true if at least one of the gui_wps screens has an album art
|
||||||
|
* tag in its wps structure and writes the width and height into the passed
|
||||||
|
* pointers
|
||||||
|
*/
|
||||||
|
bool wps_uses_albumart(int*, int*);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "time.h"
|
#include "time.h"
|
||||||
#include "skin_engine/skin_engine.h"
|
#include "wps.h"
|
||||||
|
|
||||||
static const struct browse_folder_info config = {ROCKBOX_DIR, SHOW_CFG};
|
static const struct browse_folder_info config = {ROCKBOX_DIR, SHOW_CFG};
|
||||||
|
|
||||||
|
|
@ -253,17 +253,19 @@ static char* info_getname(int selected_item, void *data,
|
||||||
break;
|
break;
|
||||||
#ifdef HAVE_ALBUMART
|
#ifdef HAVE_ALBUMART
|
||||||
case INFO_ALBUMART: /* album art dimenstions */
|
case INFO_ALBUMART: /* album art dimenstions */
|
||||||
if (gui_sync_wps_uses_albumart())
|
{
|
||||||
|
int width = 0, height = 0;
|
||||||
|
if (wps_uses_albumart(&width, &height))
|
||||||
{
|
{
|
||||||
snprintf(buffer, buffer_len, "%s %dx%d", str(LANG_ALBUMART),
|
snprintf(buffer, buffer_len, "%s %dx%d", str(LANG_ALBUMART),
|
||||||
gui_wps[0].data->albumart_max_width,
|
width, height);
|
||||||
gui_wps[0].data->albumart_max_height);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
snprintf(buffer, buffer_len, "%s %s", str(LANG_ALBUMART),
|
snprintf(buffer, buffer_len, "%s %s", str(LANG_ALBUMART),
|
||||||
str(LANG_SET_BOOL_NO));
|
str(LANG_SET_BOOL_NO));
|
||||||
}
|
}
|
||||||
|
} break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return buffer;
|
return buffer;
|
||||||
|
|
@ -348,17 +350,20 @@ static int info_speak_item(int selected_item, void * data)
|
||||||
break;
|
break;
|
||||||
#ifdef HAVE_ALBUMART
|
#ifdef HAVE_ALBUMART
|
||||||
case INFO_ALBUMART: /* album art dimenstions */
|
case INFO_ALBUMART: /* album art dimenstions */
|
||||||
if (gui_sync_wps_uses_albumart())
|
{
|
||||||
|
int width = 0, height = 0;
|
||||||
|
if (wps_uses_albumart(&width, &height))
|
||||||
{
|
{
|
||||||
talk_id(LANG_ALBUMART, false);
|
talk_id(LANG_ALBUMART, false);
|
||||||
talk_value(gui_wps[0].data->albumart_max_width, UNIT_PIXEL, true);
|
talk_value(width, UNIT_PIXEL, true);
|
||||||
talk_value(gui_wps[0].data->albumart_max_height, UNIT_PIXEL, true);
|
talk_value(height, UNIT_PIXEL, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
talk_id(LANG_ALBUMART, false);
|
talk_id(LANG_ALBUMART, false);
|
||||||
talk_id(LANG_SET_BOOL_NO, true);
|
talk_id(LANG_SET_BOOL_NO, true);
|
||||||
}
|
}
|
||||||
|
} break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -1872,9 +1872,10 @@ static void audio_finish_load_track(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef HAVE_ALBUMART
|
#ifdef HAVE_ALBUMART
|
||||||
if (tracks[track_widx].aa_hid < 0 && gui_sync_wps_uses_albumart())
|
if (tracks[track_widx].aa_hid < 0)
|
||||||
{
|
{
|
||||||
char aa_path[MAX_PATH];
|
char aa_path[MAX_PATH];
|
||||||
|
/* find_albumart will error out if the wps doesn't have AA */
|
||||||
if (find_albumart(track_id3, aa_path, sizeof(aa_path)))
|
if (find_albumart(track_id3, aa_path, sizeof(aa_path)))
|
||||||
{
|
{
|
||||||
tracks[track_widx].aa_hid = bufopen(aa_path, 0, TYPE_BITMAP);
|
tracks[track_widx].aa_hid = bufopen(aa_path, 0, TYPE_BITMAP);
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ void codec_thread_do_callback(void (*fn)(void),
|
||||||
int audio_current_aa_hid(void);
|
int audio_current_aa_hid(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_CODEC == SWCODEC /* This #ifdef is better here than gui/gwps.c */
|
#if CONFIG_CODEC == SWCODEC /* This #ifdef is better here than gui/wps.c */
|
||||||
extern void audio_next_dir(void);
|
extern void audio_next_dir(void);
|
||||||
extern void audio_prev_dir(void);
|
extern void audio_prev_dir(void);
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@
|
||||||
#include "dircache.h"
|
#include "dircache.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
#include "wps.h"
|
||||||
|
|
||||||
/* Define LOGF_ENABLE to enable logf output in this file */
|
/* Define LOGF_ENABLE to enable logf output in this file */
|
||||||
/*#define LOGF_ENABLE*/
|
/*#define LOGF_ENABLE*/
|
||||||
|
|
@ -279,16 +280,16 @@ bool find_albumart(const struct mp3entry *id3, char *buf, int buflen)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
char size_string[9];
|
char size_string[9];
|
||||||
struct wps_data *data = gui_wps[0].data;
|
int width = 0, height = 0;
|
||||||
|
|
||||||
if (!data)
|
if (!wps_uses_albumart(&width, &height))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
logf("Looking for album art for %s", id3->path);
|
logf("Looking for album art for %s", id3->path);
|
||||||
|
|
||||||
/* Write the size string, e.g. ".100x100". */
|
/* Write the size string, e.g. ".100x100". */
|
||||||
snprintf(size_string, sizeof(size_string), ".%dx%d",
|
snprintf(size_string, sizeof(size_string), ".%dx%d",
|
||||||
data->albumart_max_width, data->albumart_max_height);
|
width, height);
|
||||||
|
|
||||||
/* First we look for a bitmap of the right size */
|
/* First we look for a bitmap of the right size */
|
||||||
if (search_albumart_files(id3, size_string, buf, buflen))
|
if (search_albumart_files(id3, size_string, buf, buflen))
|
||||||
|
|
@ -372,9 +373,14 @@ void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear)
|
||||||
void get_albumart_size(struct bitmap *bmp)
|
void get_albumart_size(struct bitmap *bmp)
|
||||||
{
|
{
|
||||||
/* FIXME: What should we do with albumart on remote? */
|
/* FIXME: What should we do with albumart on remote? */
|
||||||
struct wps_data *data = gui_wps[0].data;
|
int width, height;
|
||||||
|
|
||||||
bmp->width = data->albumart_max_width;
|
if (!wps_uses_albumart(&width, &height))
|
||||||
bmp->height = data->albumart_max_height;
|
{
|
||||||
|
width = 0; height = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bmp->width = width;
|
||||||
|
bmp->height = height;
|
||||||
}
|
}
|
||||||
#endif /* PLUGIN */
|
#endif /* PLUGIN */
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
#if CONFIG_TUNER
|
#if CONFIG_TUNER
|
||||||
#include "radio.h"
|
#include "radio.h"
|
||||||
#endif
|
#endif
|
||||||
#include "skin_engine/skin_engine.h"
|
#include "wps.h"
|
||||||
|
|
||||||
#if CONFIG_CODEC == MAS3507D
|
#if CONFIG_CODEC == MAS3507D
|
||||||
void dac_line_in(bool enable);
|
void dac_line_in(bool enable);
|
||||||
|
|
@ -848,15 +848,12 @@ void settings_apply(bool read_disk)
|
||||||
global_settings.wps_file[0] != 0xff ) {
|
global_settings.wps_file[0] != 0xff ) {
|
||||||
snprintf(buf, sizeof buf, WPS_DIR "/%s.wps",
|
snprintf(buf, sizeof buf, WPS_DIR "/%s.wps",
|
||||||
global_settings.wps_file);
|
global_settings.wps_file);
|
||||||
skin_data_load(gui_wps[0].data, &screens[0], buf, true);
|
wps_data_load(SCREEN_MAIN, buf, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wps_data_init(gui_wps[0].data);
|
wps_data_init(SCREEN_MAIN);
|
||||||
skin_data_load(gui_wps[0].data, &screens[0], NULL, true);
|
wps_data_load(SCREEN_MAIN, NULL, true);
|
||||||
#ifdef HAVE_REMOTE_LCD
|
|
||||||
gui_wps[0].data->remote_wps = false;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
|
|
@ -878,13 +875,12 @@ void settings_apply(bool read_disk)
|
||||||
if ( global_settings.rwps_file[0]) {
|
if ( global_settings.rwps_file[0]) {
|
||||||
snprintf(buf, sizeof buf, WPS_DIR "/%s.rwps",
|
snprintf(buf, sizeof buf, WPS_DIR "/%s.rwps",
|
||||||
global_settings.rwps_file);
|
global_settings.rwps_file);
|
||||||
skin_data_load(gui_wps[1].data, &screens[1], buf, true);
|
wps_data_load(SCREEN_REMOTE, buf, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wps_data_init(gui_wps[1].data);
|
wps_data_init(SCREEN_REMOTE);
|
||||||
skin_data_load(gui_wps[1].data, &screens[1], NULL, true);
|
wps_data_load(SCREEN_REMOTE, NULL, true);
|
||||||
gui_wps[1].data->remote_wps = true;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if ( global_settings.lang_file[0]) {
|
if ( global_settings.lang_file[0]) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue