(Menu) Settings cleanups

This commit is contained in:
twinaphex 2020-02-22 07:21:35 +01:00
parent 4f50b2c698
commit 3ee89a16ef
5 changed files with 241 additions and 165 deletions

View File

@ -261,6 +261,7 @@ static void menu_action_setting_disp_set_label_netplay_mitm_server(
char *s2, size_t len2)
{
unsigned j;
const char *netplay_mitm_server;
settings_t *settings = config_get_ptr();
*s = '\0';
@ -270,12 +271,14 @@ static void menu_action_setting_disp_set_label_netplay_mitm_server(
if (!settings)
return;
if (string_is_empty(settings->arrays.netplay_mitm_server))
netplay_mitm_server = settings->arrays.netplay_mitm_server;
if (string_is_empty(netplay_mitm_server))
return;
for (j = 0; j < ARRAY_SIZE(netplay_mitm_server_list); j++)
{
if (string_is_equal(settings->arrays.netplay_mitm_server,
if (string_is_equal(netplay_mitm_server,
netplay_mitm_server_list[j].name))
strlcpy(s, netplay_mitm_server_list[j].description, len);
}
@ -291,19 +294,17 @@ static void menu_action_setting_disp_set_label_shader_watch_for_changes(
const char *path,
char *s2, size_t len2)
{
settings_t *settings = config_get_ptr();
settings_t *settings = config_get_ptr();
bool shader_watch_files = settings ? settings->bools.video_shader_watch_files: false;
*s = '\0';
*w = 19;
strlcpy(s2, path, len2);
if (settings)
{
if (settings->bools.video_shader_watch_files)
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_TRUE), len);
else
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FALSE), len);
}
if (shader_watch_files)
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_TRUE), len);
else
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FALSE), len);
}
static void menu_action_setting_disp_set_label_shader_num_passes(

View File

@ -1074,11 +1074,13 @@ static int action_bind_sublabel_playlist_entry(
playlist_get_index(playlist, i, &entry);
/* Only add sublabel if a core is currently assigned */
if (string_is_empty(entry->core_name) || string_is_equal(entry->core_name, "DETECT"))
if ( string_is_empty(entry->core_name) ||
string_is_equal(entry->core_name, "DETECT"))
return 0;
/* Add core name */
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_CORE), len);
strlcpy(s,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_CORE), len);
strlcat(s, " ", len);
strlcat(s, entry->core_name, len);
@ -1100,33 +1102,39 @@ static int action_bind_sublabel_playlist_entry(
!string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_HORIZONTAL_MENU)))
return 0;
/* Check whether runtime info should be loaded from log file */
if (entry->runtime_status == PLAYLIST_RUNTIME_UNKNOWN)
runtime_update_playlist(playlist, i);
/* Check whether runtime info is valid */
if (entry->runtime_status == PLAYLIST_RUNTIME_VALID)
switch (entry->runtime_status)
{
int n = 0;
char tmp[64];
case PLAYLIST_RUNTIME_UNKNOWN:
/* Check whether runtime info should be loaded from log file */
runtime_update_playlist(playlist, i);
break;
case PLAYLIST_RUNTIME_VALID:
/* Check whether runtime info is valid */
{
int n = 0;
char tmp[64];
tmp[0 ] = '\n';
tmp[1 ] = '\0';
tmp[0 ] = '\n';
tmp[1 ] = '\0';
n = strlcat(tmp, entry->runtime_str, sizeof(tmp));
n = strlcat(tmp, entry->runtime_str, sizeof(tmp));
tmp[n ] = '\n';
tmp[n+1] = '\0';
tmp[n ] = '\n';
tmp[n+1] = '\0';
/* Runtime/last played strings are now cached in the
* playlist, so we can add both in one go */
n = strlcat(tmp, entry->last_played_str, sizeof(tmp));
/* Runtime/last played strings are now cached in the
* playlist, so we can add both in one go */
n = strlcat(tmp, entry->last_played_str, sizeof(tmp));
if ((n < 0) || (n >= 64))
n = 0; /* Silence GCC warnings... */
if ((n < 0) || (n >= 64))
n = 0; /* Silence GCC warnings... */
if (!string_is_empty(tmp))
strlcat(s, tmp, len);
if (!string_is_empty(tmp))
strlcat(s, tmp, len);
}
break;
default:
break;
}
return 0;

View File

@ -126,17 +126,18 @@ static int action_get_title_left_thumbnails(
enum msg_hash_enums label_value = MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS;
#if defined(HAVE_RGUI) || defined(HAVE_OZONE) || defined(HAVE_MATERIALUI)
settings_t *settings = config_get_ptr();
const char *menu_driver = settings->arrays.menu_driver;
/* Get label value */
#ifdef HAVE_RGUI
if (string_is_equal(settings->arrays.menu_driver, "rgui"))
if (string_is_equal(menu_driver, "rgui"))
label_value = MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_RGUI;
#endif
#ifdef HAVE_OZONE
if (string_is_equal(settings->arrays.menu_driver, "ozone"))
if (string_is_equal(menu_driver, "ozone"))
label_value = MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE;
#endif
#ifdef HAVE_MATERIALUI
if (string_is_equal(settings->arrays.menu_driver, "glui"))
if (string_is_equal(menu_driver, "glui"))
label_value = MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_MATERIALUI;
#endif
#endif

View File

@ -366,6 +366,7 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
const char *tmp_string = NULL;
const frontend_ctx_driver_t *frontend = frontend_get_ptr();
settings_t *settings = config_get_ptr();
const char *menu_driver = settings->arrays.menu_driver;
tmp[0] = '\0';
@ -488,12 +489,14 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
controller,
input_config_get_device_name(controller),
input_autoconfigure_get_device_name_index(controller));
if (menu_entries_append_enum(list, tmp, "",
MENU_ENUM_LABEL_SYSTEM_INFO_CONTROLLER_ENTRY,
MENU_SETTINGS_CORE_INFO_NONE, 0, 0))
count++;
if (string_is_equal(settings->arrays.menu_driver, "rgui"))
#ifdef HAVE_RGUI
if (string_is_equal(menu_driver, "rgui"))
{
snprintf(tmp, sizeof(tmp), " Device display name: %s",
input_config_get_device_display_name(controller) ?
@ -517,6 +520,7 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
MENU_SETTINGS_CORE_INFO_NONE, 0, 0))
count++;
}
#endif
}
}
@ -2763,17 +2767,14 @@ static unsigned menu_displaylist_parse_playlist_manager_list(
menu_displaylist_info_t *info)
{
unsigned count = 0;
struct string_list *str_list = NULL;
settings_t *settings = config_get_ptr();
if (!settings)
return count;
/* Add collection playlists */
str_list = dir_list_new_special(
settings->paths.directory_playlist,
const char *dir_playlist = settings->paths.directory_playlist;
bool show_hidden_files = settings->bools.show_hidden_files;
bool history_list_enable = settings->bools.history_list_enable;
struct string_list *str_list = dir_list_new_special(
dir_playlist,
DIR_LIST_COLLECTIONS, NULL,
settings->bools.show_hidden_files);
show_hidden_files);
if (str_list && str_list->size)
{
@ -2826,7 +2827,7 @@ static unsigned menu_displaylist_parse_playlist_manager_list(
string_list_free(str_list);
/* Add content history */
if (settings->bools.history_list_enable)
if (history_list_enable)
if (g_defaults.content_history)
if (playlist_size(g_defaults.content_history) > 0)
if (menu_entries_append_enum(info->list,
@ -2858,12 +2859,10 @@ static bool menu_displaylist_parse_playlist_manager_settings(
{
enum msg_hash_enums right_thumbnail_label_value;
enum msg_hash_enums left_thumbnail_label_value;
settings_t *settings = config_get_ptr();
const char *playlist_file = NULL;
playlist_t *playlist = NULL;
if (!settings)
return false;
settings_t *settings = config_get_ptr();
const char *menu_driver = settings->arrays.menu_driver;
if (string_is_empty(playlist_path))
return false;
@ -2909,28 +2908,31 @@ static bool menu_displaylist_parse_playlist_manager_settings(
MENU_SETTING_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE, 0, 0);
/* Thumbnail modes */
right_thumbnail_label_value = MENU_ENUM_LABEL_VALUE_THUMBNAILS;
left_thumbnail_label_value = MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS;
/* > Get label values */
if (string_is_equal(settings->arrays.menu_driver, "rgui"))
#ifdef HAVE_RGUI
if (string_is_equal(menu_driver, "rgui"))
{
right_thumbnail_label_value = MENU_ENUM_LABEL_VALUE_THUMBNAILS_RGUI;
left_thumbnail_label_value = MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_RGUI;
}
else if (string_is_equal(settings->arrays.menu_driver, "ozone"))
#endif
#ifdef HAVE_OZONE
if (string_is_equal(menu_driver, "ozone"))
{
right_thumbnail_label_value = MENU_ENUM_LABEL_VALUE_THUMBNAILS;
left_thumbnail_label_value = MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE;
}
else if (string_is_equal(settings->arrays.menu_driver, "glui"))
#endif
#ifdef HAVE_MATERIALUI
if (string_is_equal(menu_driver, "glui"))
{
right_thumbnail_label_value = MENU_ENUM_LABEL_VALUE_THUMBNAILS_MATERIALUI;
left_thumbnail_label_value = MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_MATERIALUI;
}
else
{
right_thumbnail_label_value = MENU_ENUM_LABEL_VALUE_THUMBNAILS;
left_thumbnail_label_value = MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS;
}
#endif
/* > Right thumbnail mode */
menu_entries_append_enum(info->list,
@ -2967,17 +2969,14 @@ static bool menu_displaylist_parse_playlist_manager_settings(
static unsigned menu_displaylist_parse_pl_thumbnail_download_list(
menu_displaylist_info_t *info)
{
settings_t *settings = config_get_ptr();
unsigned count = 0;
struct string_list *str_list = NULL;
if (!settings)
return count;
str_list = dir_list_new_special(
settings->paths.directory_playlist,
settings_t *settings = config_get_ptr();
const char *dir_playlist = settings->paths.directory_playlist;
bool show_hidden_files = settings->bools.show_hidden_files;
struct string_list *str_list = dir_list_new_special(
dir_playlist,
DIR_LIST_COLLECTIONS, NULL,
settings->bools.show_hidden_files);
show_hidden_files);
if (str_list && str_list->size)
{
@ -3454,7 +3453,8 @@ static bool menu_displaylist_push_internal(
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB)))
{
settings_t *settings = config_get_ptr();
settings_t *settings = config_get_ptr();
const char *dir_playlist = settings->paths.directory_playlist;
filebrowser_clear_type();
info->type = 42;
@ -3468,7 +3468,7 @@ static bool menu_displaylist_push_internal(
info->label = strdup(
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB));
if (string_is_empty(settings->paths.directory_playlist))
if (string_is_empty(dir_playlist))
{
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
info->need_refresh = true;
@ -3482,7 +3482,7 @@ static bool menu_displaylist_push_internal(
if (!string_is_empty(info->path))
free(info->path);
info->path = strdup(settings->paths.directory_playlist);
info->path = strdup(dir_playlist);
if (menu_displaylist_ctl(
DISPLAYLIST_DATABASE_PLAYLISTS, info))
@ -3989,8 +3989,10 @@ static unsigned menu_displaylist_populate_subsystem(
const struct retro_subsystem_info* subsystem, file_list_t *list)
{
char star_char[16];
unsigned count = 0;
settings_t *settings = config_get_ptr();
unsigned count = 0;
settings_t *settings = config_get_ptr();
const char *menu_driver = settings->arrays.menu_driver;
bool menu_show_sublabels = settings->bools.menu_show_sublabels;
/* Note: Create this string here explicitly (rather than
* using a #define elsewhere) since we need to be aware of
* its length... */
@ -4004,7 +4006,7 @@ static unsigned menu_displaylist_populate_subsystem(
#endif
unsigned i = 0;
int n = 0;
bool is_rgui = string_is_equal(settings->arrays.menu_driver, "rgui");
bool is_rgui = string_is_equal(menu_driver, "rgui");
/* Select appropriate 'star' marker for subsystem menu entries
* (i.e. RGUI does not support unicode, so use a 'standard'
@ -4028,7 +4030,7 @@ static unsigned menu_displaylist_populate_subsystem(
/* If using RGUI with sublabels disabled, add the
* appropriate text to the menu entry itself... */
if (is_rgui && !settings->bools.menu_show_sublabels)
if (is_rgui && !menu_show_sublabels)
{
char tmp[PATH_MAX_LENGTH];
@ -4075,7 +4077,7 @@ static unsigned menu_displaylist_populate_subsystem(
/* If using RGUI with sublabels disabled, add the
* appropriate text to the menu entry itself... */
if (is_rgui && !settings->bools.menu_show_sublabels)
if (is_rgui && !menu_show_sublabels)
{
unsigned j = 0;
char rom_buff[PATH_MAX_LENGTH];
@ -4123,7 +4125,7 @@ static unsigned menu_displaylist_populate_subsystem(
/* If using RGUI with sublabels disabled, add the
* appropriate text to the menu entry itself... */
if (is_rgui && !settings->bools.menu_show_sublabels)
if (is_rgui && !menu_show_sublabels)
{
/* This check is probably not required (it's not done
* in menu_cbs_sublabel.c action_bind_sublabel_subsystem_add(),
@ -4162,7 +4164,9 @@ static unsigned menu_displaylist_populate_subsystem(
return count;
}
unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ctl_state type,
unsigned menu_displaylist_build_list(
file_list_t *list,
enum menu_displaylist_ctl_state type,
bool include_everything)
{
unsigned i;
@ -4187,7 +4191,9 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
break;
case DISPLAYLIST_PLAYLIST_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
settings_t *settings = config_get_ptr();
bool playlist_show_sublabels = settings->bools.playlist_show_sublabels;
bool history_list_enable = settings->bools.history_list_enable;
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_HISTORY_LIST_ENABLE, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE, PARSE_ONLY_UINT, false},
@ -4213,11 +4219,11 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
{
case MENU_ENUM_LABEL_PLAYLIST_SUBLABEL_RUNTIME_TYPE:
case MENU_ENUM_LABEL_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE:
if (settings->bools.playlist_show_sublabels)
if (playlist_show_sublabels)
build_list[i].checked = true;
break;
case MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE:
if (settings->bools.history_list_enable)
if (history_list_enable)
build_list[i].checked = true;
break;
default:
@ -4276,10 +4282,10 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
{
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
settings_t *settings = config_get_ptr();
const char *dir_video_shader = settings->paths.directory_video_shader;
const char *dir_menu_config = settings->paths.directory_menu_config;
if (menu_shader_manager_auto_preset_exists(SHADER_PRESET_GLOBAL,
settings->paths.directory_video_shader,
settings->paths.directory_menu_config
))
dir_video_shader, dir_menu_config))
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GLOBAL),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_GLOBAL),
@ -4288,9 +4294,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
count++;
if (menu_shader_manager_auto_preset_exists(SHADER_PRESET_CORE,
settings->paths.directory_video_shader,
settings->paths.directory_menu_config
))
dir_video_shader, dir_menu_config))
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_CORE),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_CORE),
@ -4299,9 +4303,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
count++;
if (menu_shader_manager_auto_preset_exists(SHADER_PRESET_PARENT,
settings->paths.directory_video_shader,
settings->paths.directory_menu_config
))
dir_video_shader, dir_menu_config))
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_PARENT),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_PARENT),
@ -4310,9 +4312,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
count++;
if (menu_shader_manager_auto_preset_exists(SHADER_PRESET_GAME,
settings->paths.directory_video_shader,
settings->paths.directory_menu_config
))
dir_video_shader, dir_menu_config))
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GAME),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_GAME),
@ -4742,9 +4742,11 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_LOAD_CONTENT_LIST:
case DISPLAYLIST_LOAD_CONTENT_SPECIAL:
{
settings_t *settings = config_get_ptr();
settings_t *settings = config_get_ptr();
const char *dir_menu_content = settings->paths.directory_menu_content;
bool menu_content_show_favorites = settings->bools.menu_content_show_favorites;
if (!string_is_empty(settings->paths.directory_menu_content))
if (!string_is_empty(dir_menu_content))
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES),
@ -4752,7 +4754,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
MENU_SETTING_ACTION, 0, 0))
count++;
if (settings->bools.menu_content_show_favorites)
if (menu_content_show_favorites)
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_FAVORITES),
@ -4804,8 +4806,9 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
}
{
settings_t *settings = config_get_ptr();
if (settings->bools.menu_content_show_playlists)
settings_t *settings = config_get_ptr();
bool menu_content_show_playlists = settings->bools.menu_content_show_playlists;
if (menu_content_show_playlists)
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB),
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB),
@ -4989,6 +4992,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_ACCESSIBILITY_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
bool accessibility_enable = settings->bools.accessibility_enable;
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_ACCESSIBILITY_ENABLED, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, PARSE_ONLY_UINT, false },
@ -4999,7 +5003,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
switch (build_list[i].enum_idx)
{
case MENU_ENUM_LABEL_ACCESSIBILITY_NARRATOR_SPEECH_SPEED:
if (settings->bools.accessibility_enable)
if (accessibility_enable)
build_list[i].checked = true;
break;
default:
@ -5325,16 +5329,18 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_DROPDOWN_LIST_MANUAL_CONTENT_SCAN_SYSTEM_NAME:
/* Get system name list */
{
settings_t *settings = config_get_ptr();
settings_t *settings = config_get_ptr();
bool show_hidden_files = settings->bools.show_hidden_files;
const char *path_content_database = settings->paths.path_content_database;
#ifdef HAVE_LIBRETRODB
struct string_list *system_name_list =
manual_content_scan_get_menu_system_name_list(
settings->paths.path_content_database,
settings->bools.show_hidden_files);
path_content_database,
show_hidden_files);
#else
struct string_list *system_name_list =
manual_content_scan_get_menu_system_name_list(NULL,
settings->bools.show_hidden_files);
show_hidden_files);
#endif
if (system_name_list)
@ -5374,7 +5380,8 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_DROPDOWN_LIST_MANUAL_CONTENT_SCAN_CORE_NAME:
{
/* Get core name list */
struct string_list *core_name_list = manual_content_scan_get_menu_core_name_list();
struct string_list *core_name_list =
manual_content_scan_get_menu_core_name_list();
if (core_name_list)
{
@ -5522,6 +5529,10 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_NETWORK_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
bool netplay_allow_slaves = settings->bools.netplay_allow_slaves;
bool netplay_use_mitm_server = settings->bools.netplay_use_mitm_server;
bool network_cmd_enable = settings->bools.network_cmd_enable;
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_NETPLAY_PUBLIC_ANNOUNCE, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_NETPLAY_USE_MITM_SERVER, PARSE_ONLY_BOOL, true },
@ -5547,11 +5558,11 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
switch (build_list[i].enum_idx)
{
case MENU_ENUM_LABEL_NETPLAY_REQUIRE_SLAVES:
if (settings->bools.netplay_allow_slaves)
if (netplay_allow_slaves)
build_list[i].checked = true;
break;
case MENU_ENUM_LABEL_NETPLAY_MITM_SERVER:
if (settings->bools.netplay_use_mitm_server)
if (netplay_use_mitm_server)
build_list[i].checked = true;
break;
default:
@ -5585,7 +5596,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
PARSE_ONLY_BOOL, false) != -1)
count++;
if (settings->bools.network_cmd_enable)
if (network_cmd_enable)
{
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_NETWORK_CMD_PORT,
@ -5830,6 +5841,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_RECORDING_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
unsigned streaming_mode = settings->uints.streaming_mode;
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_VIDEO_RECORD_QUALITY, PARSE_ONLY_UINT, true},
{MENU_ENUM_LABEL_RECORD_CONFIG, PARSE_ONLY_PATH, true},
@ -5849,7 +5861,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
switch (build_list[i].enum_idx)
{
case MENU_ENUM_LABEL_UDP_STREAM_PORT:
if (settings->uints.streaming_mode == STREAMING_MODE_LOCAL)
if (streaming_mode == STREAMING_MODE_LOCAL)
build_list[i].checked = true;
break;
default:
@ -5885,6 +5897,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_RETRO_ACHIEVEMENTS_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
bool cheevos_enable = settings->bools.cheevos_enable;
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_CHEEVOS_ENABLE, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CHEEVOS_USERNAME, PARSE_ONLY_STRING, false },
@ -5900,7 +5913,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
for (i = 0; i < ARRAY_SIZE(build_list); i++)
{
if (settings->bools.cheevos_enable)
if (cheevos_enable)
build_list[i].checked = true;
}
@ -5925,6 +5938,8 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_USER_INTERFACE_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
bool kiosk_mode_enable = settings->bools.kiosk_mode_enable;
bool desktop_menu_enable = settings->bools.desktop_menu_enable;
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_MENU_VIEWS_SETTINGS, PARSE_ACTION, true},
{MENU_ENUM_LABEL_MENU_SETTINGS, PARSE_ACTION, true},
@ -5954,11 +5969,11 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
switch (build_list[i].enum_idx)
{
case MENU_ENUM_LABEL_MENU_KIOSK_MODE_PASSWORD:
if (settings->bools.kiosk_mode_enable)
if (kiosk_mode_enable)
build_list[i].checked = true;
break;
case MENU_ENUM_LABEL_UI_COMPANION_TOGGLE:
if (settings->bools.desktop_menu_enable)
if (desktop_menu_enable)
build_list[i].checked = true;
break;
default:
@ -6120,11 +6135,15 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_VIDEO_SYNCHRONIZATION_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
bool video_vsync = settings->bools.video_vsync;
bool video_hard_sync = settings->bools.video_hard_sync;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_VSYNC,
PARSE_ONLY_BOOL, false) == 0)
count++;
if (settings->bools.video_vsync)
if (video_vsync)
{
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_SWAP_INTERVAL,
@ -6146,7 +6165,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
MENU_ENUM_LABEL_VIDEO_HARD_SYNC,
PARSE_ONLY_BOOL, false) == 0)
count++;
if (settings->bools.video_hard_sync)
if (video_hard_sync)
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_HARD_SYNC_FRAMES,
PARSE_ONLY_UINT, false) == 0)
@ -6372,6 +6391,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_ONSCREEN_OVERLAY_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
bool input_overlay_enable = settings->bools.input_overlay_enable;
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_INPUT_OVERLAY_ENABLE, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_IN_MENU, PARSE_ONLY_BOOL, false },
@ -6396,7 +6416,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case MENU_ENUM_LABEL_OVERLAY_PRESET:
case MENU_ENUM_LABEL_OVERLAY_OPACITY:
case MENU_ENUM_LABEL_OVERLAY_SCALE:
if (settings->bools.input_overlay_enable)
if (input_overlay_enable)
build_list[i].checked = true;
break;
default:
@ -6420,6 +6440,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_ONSCREEN_VIDEO_LAYOUT_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
bool video_layout_enable = settings->bools.video_layout_enable;
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_VIDEO_LAYOUT_ENABLE, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_VIDEO_LAYOUT_PATH, PARSE_ONLY_PATH, false},
@ -6432,7 +6453,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
{
case MENU_ENUM_LABEL_VIDEO_LAYOUT_PATH:
case MENU_ENUM_LABEL_VIDEO_LAYOUT_SELECTED_VIEW:
if (settings->bools.video_layout_enable)
if (video_layout_enable)
build_list[i].checked = true;
break;
default:
@ -6456,6 +6477,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_LATENCY_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
bool video_hard_sync = settings->bools.video_hard_sync;
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_VIDEO_FRAME_DELAY, PARSE_ONLY_UINT, true },
{MENU_ENUM_LABEL_AUDIO_LATENCY, PARSE_ONLY_UINT, true },
@ -6480,7 +6502,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
MENU_ENUM_LABEL_VIDEO_HARD_SYNC,
PARSE_ONLY_BOOL, false);
count++;
if (settings->bools.video_hard_sync)
if (video_hard_sync)
{
menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_HARD_SYNC_FRAMES,
@ -6491,7 +6513,8 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
{
settings_t *settings = config_get_ptr();
if (settings->bools.run_ahead_enabled)
bool runahead_enabled = settings->bools.run_ahead_enabled;
if (runahead_enabled)
{
for (i = 0; i < ARRAY_SIZE(build_list); i++)
{
@ -6524,6 +6547,13 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
bool video_font_enable = settings->bools.video_font_enable;
bool video_fps_show = settings->bools.video_fps_show;
bool video_msg_bgcolor_enable = settings->bools.video_msg_bgcolor_enable;
#ifdef HAVE_GFX_WIDGETS
bool menu_enable_widgets = settings->bools.menu_enable_widgets;
bool menu_widget_scale_auto = settings->bools.menu_widget_scale_auto;
#endif
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_VIDEO_FONT_ENABLE, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_MENU_WIDGETS_ENABLE, PARSE_ONLY_BOOL, true },
@ -6553,33 +6583,33 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
switch (build_list[i].enum_idx)
{
case MENU_ENUM_LABEL_FPS_UPDATE_INTERVAL:
if (settings->bools.video_font_enable)
if (settings->bools.video_fps_show)
if (video_font_enable)
if (video_fps_show)
build_list[i].checked = true;
break;
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_RED:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_GREEN:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_BLUE:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_OPACITY:
if (settings->bools.video_font_enable)
if (settings->bools.video_msg_bgcolor_enable)
if (video_font_enable)
if (video_msg_bgcolor_enable)
build_list[i].checked = true;
break;
case MENU_ENUM_LABEL_MENU_WIDGET_SCALE_AUTO:
#ifdef HAVE_GFX_WIDGETS
if (settings->bools.menu_enable_widgets)
if (menu_enable_widgets)
build_list[i].checked = true;
#endif
break;
case MENU_ENUM_LABEL_MENU_WIDGET_SCALE_FACTOR:
#ifdef HAVE_GFX_WIDGETS
if (settings->bools.menu_enable_widgets)
if (!settings->bools.menu_widget_scale_auto)
if (menu_enable_widgets)
if (!menu_widget_scale_auto)
build_list[i].checked = true;
#endif
break;
default:
if (settings->bools.video_font_enable)
if (video_font_enable)
build_list[i].checked = true;
break;
}
@ -6671,6 +6701,9 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_SETTINGS_ALL:
{
settings_t *settings = config_get_ptr();
#ifdef HAVE_TRANSLATE
bool settings_show_ai_service = settings->bools.settings_show_ai_service;
#endif
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_DRIVER_SETTINGS, PARSE_ACTION, true},
{MENU_ENUM_LABEL_VIDEO_SETTINGS, PARSE_ACTION, true},
@ -6706,7 +6739,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
{
case MENU_ENUM_LABEL_AI_SERVICE_SETTINGS:
#ifdef HAVE_TRANSLATE
build_list[i].checked = settings->bools.settings_show_ai_service;
build_list[i].checked = settings_show_ai_service;
#else
build_list[i].checked = false;
#endif
@ -7085,6 +7118,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_LOGGING_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
bool log_to_file = settings->bools.log_to_file;
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_LOG_VERBOSITY, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_FRONTEND_LOG_LEVEL, PARSE_ONLY_UINT, false},
@ -7104,7 +7138,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
build_list[i].checked = true;
break;
case MENU_ENUM_LABEL_LOG_TO_FILE_TIMESTAMP:
if (settings->bools.log_to_file)
if (log_to_file)
build_list[i].checked = true;
break;
default:
@ -7145,6 +7179,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case DISPLAYLIST_REWIND_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
bool rewind_enable = settings->bools.rewind_enable;
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_REWIND_ENABLE, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_REWIND_GRANULARITY, PARSE_ONLY_UINT, false},
@ -7159,7 +7194,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
case MENU_ENUM_LABEL_REWIND_GRANULARITY:
case MENU_ENUM_LABEL_REWIND_BUFFER_SIZE:
case MENU_ENUM_LABEL_REWIND_BUFFER_SIZE_STEP:
if (settings->bools.rewind_enable)
if (rewind_enable)
build_list[i].checked = true;
break;
default:
@ -7201,7 +7236,8 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
break;
case DISPLAYLIST_MENU_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
settings_t *settings = config_get_ptr();
bool menu_horizontal_animation = settings->bools.menu_horizontal_animation;
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_MENU_SCALE_FACTOR, PARSE_ONLY_FLOAT, true},
{MENU_ENUM_LABEL_MENU_WALLPAPER, PARSE_ONLY_PATH , true},
@ -7271,7 +7307,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
switch (build_list[i].enum_idx)
{
case MENU_ENUM_LABEL_MENU_XMB_ANIMATION_HORIZONTAL_HIGHLIGHT:
if (settings->bools.menu_horizontal_animation)
if (menu_horizontal_animation)
build_list[i].checked = true;
break;
default:
@ -7613,8 +7649,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
{
settings_t *settings = config_get_ptr();
unsigned max_users = *(input_driver_get_uint(INPUT_ACTION_MAX_USERS));
bool is_rgui = string_is_equal(
settings->arrays.menu_driver, "rgui");
const char *menu_driver = settings->arrays.menu_driver;
bool is_rgui = string_is_equal(menu_driver, "rgui");
file_list_t *list = info->list;
unsigned p = atoi(info->path);
@ -8173,8 +8209,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
{
settings_t *settings = config_get_ptr();
if (settings->bools.multimedia_builtin_mediaplayer_enable)
settings_t *settings = config_get_ptr();
bool multimedia_builtin_mediaplayer_enable = settings->bools.multimedia_builtin_mediaplayer_enable;
if (multimedia_builtin_mediaplayer_enable)
{
if (menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RUN_MUSIC),
@ -8398,13 +8435,14 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
struct video_shader *shader = menu_shader_get();
unsigned pass_count = shader ? shader->passes : 0;
settings_t *settings = config_get_ptr();
bool video_shader_enable = settings->bools.video_shader_enable;
if (menu_displaylist_parse_settings_enum(info->list,
MENU_ENUM_LABEL_VIDEO_SHADERS_ENABLE,
PARSE_ONLY_BOOL, false) == 0)
count++;
if (settings->bools.video_shader_enable)
if (video_shader_enable)
{
if (frontend_driver_can_watch_for_changes())
{
@ -8555,12 +8593,14 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
{
#ifdef HAVE_NETWORKING
char new_label[PATH_MAX_LENGTH];
settings_t *settings = config_get_ptr();
settings_t *settings = config_get_ptr();
const char *
network_buildbot_assets_url = settings->paths.network_buildbot_assets_url;
new_label[0] = '\0';
fill_pathname_join(new_label,
settings->paths.network_buildbot_assets_url,
network_buildbot_assets_url,
"cores", sizeof(new_label));
count = print_buf_lines(info->list, menu->core_buf, new_label,
@ -8697,14 +8737,16 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
else
{
char path_playlist[PATH_MAX_LENGTH];
playlist_t *playlist = NULL;
settings_t *settings = config_get_ptr();
playlist_t *playlist = NULL;
settings_t *settings = config_get_ptr();
bool playlist_sort_alphabetical = settings->bools.playlist_sort_alphabetical;
const char *dir_playlist = settings->paths.directory_playlist;
path_playlist[0] = '\0';
fill_pathname_join(
path_playlist,
settings->paths.directory_playlist,
dir_playlist,
info->path,
sizeof(path_playlist));
@ -8718,7 +8760,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
if (playlist)
{
if (settings->bools.playlist_sort_alphabetical)
if (playlist_sort_alphabetical)
playlist_qsort(playlist);
ret = menu_displaylist_parse_playlist(info,
@ -8727,7 +8769,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
if (ret == 0)
{
info->need_sort = settings->bools.playlist_sort_alphabetical;
info->need_sort = playlist_sort_alphabetical;
info->need_refresh = true;
info->need_push = true;
}
@ -8735,14 +8777,16 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
break;
case DISPLAYLIST_HISTORY:
{
settings_t *settings = config_get_ptr();
settings_t *settings = config_get_ptr();
bool history_list_enable = settings->bools.history_list_enable;
const char *path_content_history = settings->paths.path_content_history;
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
if (settings->bools.history_list_enable)
if (history_list_enable)
menu_displaylist_parse_playlist_generic(
menu, info,
"history",
settings->paths.path_content_history,
path_content_history,
false, /* Not a collection */
false, /* Do not sort */
&ret);
@ -8765,15 +8809,18 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
break;
case DISPLAYLIST_FAVORITES:
{
settings_t *settings = config_get_ptr();
settings_t *settings = config_get_ptr();
const char *path_content_favorites = settings->paths.path_content_favorites;
bool playlist_sort_alphabetical = settings->bools.playlist_sort_alphabetical;
info->count = 0;
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
menu_displaylist_parse_playlist_generic(menu, info,
"favorites",
settings->paths.path_content_favorites,
path_content_favorites,
false, /* Not a conventional collection */
settings->bools.playlist_sort_alphabetical,
playlist_sort_alphabetical,
&ret);
if (info->count == 0)
@ -8788,7 +8835,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
}
ret = 0;
info->need_sort = settings->bools.playlist_sort_alphabetical;
info->need_sort = playlist_sort_alphabetical;
info->need_refresh = true;
info->need_push = true;
}
@ -8796,12 +8843,14 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
case DISPLAYLIST_MUSIC_HISTORY:
{
settings_t *settings = config_get_ptr();
const char *
path_content_music_history = settings->paths.path_content_music_history;
info->count = 0;
if (settings->bools.history_list_enable)
menu_displaylist_parse_playlist_generic(menu, info,
"music_history",
settings->paths.path_content_music_history,
path_content_music_history,
false, /* Not a collection */
false, /* Do not sort */
&ret);
@ -8834,11 +8883,14 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
{
settings_t *settings = config_get_ptr();
if (settings->bools.history_list_enable)
bool history_list_enable = settings->bools.history_list_enable;
const char *
path_content_video_history = settings->paths.path_content_video_history;
if (history_list_enable)
{
menu_displaylist_parse_playlist_generic(menu, info,
"video_history",
settings->paths.path_content_video_history,
path_content_video_history,
false, /* Not a collection */
false, /* Do not sort */
&ret);
@ -9106,10 +9158,11 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
{
size_t opts = 0;
settings_t *settings = config_get_ptr();
bool game_specific_options = settings->bools.game_specific_options;
rarch_ctl(RARCH_CTL_GET_CORE_OPTION_SIZE, &opts);
if (settings->bools.game_specific_options)
if (game_specific_options)
{
if (!rarch_ctl(RARCH_CTL_IS_GAME_OPTIONS_ACTIVE, NULL))
{
@ -9423,12 +9476,13 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
break;
case DISPLAYLIST_HORIZONTAL:
{
settings_t *settings = config_get_ptr();
settings_t *settings = config_get_ptr();
bool playlist_sort_alphabetical = settings->bools.playlist_sort_alphabetical;
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
ret = menu_displaylist_parse_horizontal_list(menu, info, settings->bools.playlist_sort_alphabetical);
ret = menu_displaylist_parse_horizontal_list(menu, info, playlist_sort_alphabetical);
info->need_sort = settings->bools.playlist_sort_alphabetical;
info->need_sort = playlist_sort_alphabetical;
info->need_refresh = true;
info->need_push = true;
}
@ -10052,19 +10106,20 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
break;
case DISPLAYLIST_PLAYLIST:
{
settings_t *settings = config_get_ptr();
settings_t *settings = config_get_ptr();
bool playlist_sort_alphabetical = settings->bools.playlist_sort_alphabetical;
menu_displaylist_parse_playlist_generic(menu, info,
path_basename(info->path),
info->path,
true, /* Is a collection */
settings->bools.playlist_sort_alphabetical,
playlist_sort_alphabetical,
&ret);
ret = 0; /* Why do we do this...? */
if (ret == 0)
{
info->need_sort = settings->bools.playlist_sort_alphabetical;
info->need_sort = playlist_sort_alphabetical;
info->need_refresh = true;
info->need_push = true;
}
@ -11068,8 +11123,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
else
{
settings_t *settings = config_get_ptr();
bool show_hidden_files = settings->bools.show_hidden_files;
filebrowser_parse(info, type,
settings->bools.show_hidden_files,
show_hidden_files,
settings->bools.multimedia_builtin_mediaplayer_enable,
settings->bools.multimedia_builtin_imageviewer_enable,
settings->bools.menu_navigation_browser_filter_supported_extensions_enable

View File

@ -1597,6 +1597,10 @@ static void bundle_decompressed(retro_task_t *task,
static bool menu_init(menu_handle_t *menu_data)
{
settings_t *settings = config_get_ptr();
#ifdef HAVE_CONFIGFILE
bool menu_show_start_screen = settings->bools.menu_show_start_screen;
bool config_save_on_exit = settings->bools.config_save_on_exit;
#endif
/* Ensure that menu pointer input is correctly
* initialised */
@ -1606,7 +1610,7 @@ static bool menu_init(menu_handle_t *menu_data)
return false;
#ifdef HAVE_CONFIGFILE
if (settings->bools.menu_show_start_screen)
if (menu_show_start_screen)
{
/* We don't want the welcome dialog screen to show up
* again after the first startup, so we save to config
@ -1617,7 +1621,7 @@ static bool menu_init(menu_handle_t *menu_data)
configuration_set_bool(settings,
settings->bools.menu_show_start_screen, false);
#if !(defined(PS2) && defined(DEBUG)) /* TODO: PS2 IMPROVEMENT */
if (settings->bools.config_save_on_exit)
if (config_save_on_exit)
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
#endif
}
@ -1636,10 +1640,16 @@ static bool menu_init(menu_handle_t *menu_data)
{
menu_dialog_push_pending(true, MENU_DIALOG_HELP_EXTRACT);
#ifdef HAVE_COMPRESSION
task_push_decompress(settings->arrays.bundle_assets_src,
task_push_decompress(
settings->arrays.bundle_assets_src,
settings->arrays.bundle_assets_dst,
NULL, settings->arrays.bundle_assets_dst_subdir,
NULL, bundle_decompressed, NULL, NULL, false);
NULL,
settings->arrays.bundle_assets_dst_subdir,
NULL,
bundle_decompressed,
NULL,
NULL,
false);
#endif
}
@ -2087,7 +2097,7 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
{
int i;
driver_ctx_info_t drv;
settings_t *settings = config_get_ptr();
settings_t *settings = config_get_ptr();
drv.label = "menu_driver";
drv.s = settings->arrays.menu_driver;