(Menu) Cleanups pt. 2

This commit is contained in:
libretroadmin 2024-09-09 22:18:23 +02:00
parent 6020877043
commit 8db629ebae
4 changed files with 139 additions and 140 deletions

View File

@ -3875,7 +3875,7 @@ static int action_ok_remap_file_flush(const char *path,
const char *path_remapfile = runloop_st->name.remapfile;
const char *remapfile = NULL;
bool success = false;
char msg[256];
char msg[128];
msg[0] = '\0';
@ -4223,8 +4223,8 @@ static int action_ok_audio_run(const char *path,
int action_ok_core_option_dropdown_list(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
char option_path_str[256];
char option_lbl_str[256];
char option_path_str[64];
char option_lbl_str[64];
core_option_manager_t *coreopts = NULL;
struct core_option *option = NULL;
const char *value_label_0 = NULL;
@ -4265,9 +4265,9 @@ int action_ok_core_option_dropdown_list(const char *path,
if ( string_is_empty(value_label_0)
|| string_is_empty(value_label_1)
|| !( ( string_is_equal(value_label_0, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON))
&& string_is_equal(value_label_1, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
&& string_is_equal(value_label_1, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|| ( string_is_equal(value_label_0, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF))
&& string_is_equal(value_label_1, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON)))))
&& string_is_equal(value_label_1, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON)))))
goto push_dropdown_list;
/* > Update value and return */
@ -4350,7 +4350,7 @@ static int action_ok_cheat_add_top(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
int i;
char msg[256];
char msg[128];
struct item_cheat tmp;
struct menu_state *menu_st = menu_state_get_ptr();
unsigned int new_size = cheat_manager_get_size() + 1;
@ -4384,7 +4384,7 @@ static int action_ok_cheat_add_top(const char *path,
static int action_ok_cheat_add_bottom(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
char msg[256];
char msg[128];
struct menu_state *menu_st = menu_state_get_ptr();
unsigned int new_size = cheat_manager_get_size() + 1;
@ -4405,7 +4405,7 @@ static int action_ok_cheat_add_bottom(const char *path,
static int action_ok_cheat_delete_all(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
char msg[256];
char msg[128];
struct menu_state *menu_st = menu_state_get_ptr();
cheat_manager_state.delete_state = 0;
@ -4427,7 +4427,7 @@ static int action_ok_cheat_add_new_after(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
int i;
char msg[256];
char msg[128];
struct item_cheat tmp;
struct menu_state *menu_st = menu_state_get_ptr();
unsigned int new_size = cheat_manager_get_size() + 1;
@ -4461,7 +4461,7 @@ static int action_ok_cheat_add_new_before(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
int i;
char msg[256];
char msg[128];
struct item_cheat tmp;
struct menu_state *menu_st = menu_state_get_ptr();
unsigned int new_size = cheat_manager_get_size() + 1;
@ -4498,7 +4498,7 @@ static int action_ok_cheat_copy_before(const char *path,
{
int i;
struct item_cheat tmp;
char msg[256];
char msg[128];
struct menu_state *menu_st = menu_state_get_ptr();
unsigned int new_size = cheat_manager_get_size() + 1;
cheat_manager_realloc(new_size, CHEAT_HANDLER_TYPE_RETRO);
@ -4534,7 +4534,7 @@ static int action_ok_cheat_copy_after(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
int i;
char msg[256];
char msg[128];
struct item_cheat tmp;
struct menu_state *menu_st = menu_state_get_ptr();
unsigned int new_size = cheat_manager_get_size() + 1;
@ -4570,7 +4570,7 @@ static int action_ok_cheat_copy_after(const char *path,
static int action_ok_cheat_delete(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
char msg[256];
char msg[128];
size_t new_selection_ptr = 0;
struct menu_state *menu_st = menu_state_get_ptr();
size_t selection = menu_st->selection_ptr;
@ -6629,7 +6629,7 @@ static int action_ok_push_netplay_refresh_lan(const char *path,
static int action_ok_push_netplay_kick(const char *path, const char *label,
unsigned type, size_t idx, size_t entry_idx)
{
char msg[256];
char msg[128];
netplay_client_info_t client;
client.id = (int)strtol(label, NULL, 10);
@ -6651,7 +6651,7 @@ static int action_ok_push_netplay_kick(const char *path, const char *label,
static int action_ok_push_netplay_ban(const char *path, const char *label,
unsigned type, size_t idx, size_t entry_idx)
{
char msg[256];
char msg[128];
netplay_client_info_t client;
client.id = (int)strtol(label, NULL, 10);
@ -8206,7 +8206,6 @@ int action_ok_core_set_standalone_exempt(const char *path,
{
const char *core_path = path;
bool exempt = false;
int ret = 0;
if (string_is_empty(core_path))
return -1;
@ -8250,10 +8249,10 @@ int action_ok_core_set_standalone_exempt(const char *path,
1, 100, true,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
ret = -1;
return -1;
}
return ret;
return 0;
}
static int action_ok_core_delete(const char *path,
@ -8383,18 +8382,19 @@ static int action_ok_pl_content_thumbnails(const char *path,
if (settings)
{
playlist_config_t playlist_config;
const char *path_dir_playlist = settings->paths.directory_playlist;
const char *path_dir_thumbnails = settings->paths.directory_thumbnails;
playlist_config.capacity = COLLECTION_SIZE;
playlist_config.old_format = settings->bools.playlist_use_old_format;
playlist_config.compress = settings->bools.playlist_compression;
playlist_config.fuzzy_archive_match = settings->bools.playlist_fuzzy_archive_match;
if (!string_is_empty(path_dir_playlist))
{
playlist_config_t playlist_config;
char playlist_path[PATH_MAX_LENGTH];
const char *path_dir_thumbnails = settings->paths.directory_thumbnails;
playlist_config.capacity = COLLECTION_SIZE;
playlist_config.old_format = settings->bools.playlist_use_old_format;
playlist_config.compress = settings->bools.playlist_compression;
playlist_config.fuzzy_archive_match = settings->bools.playlist_fuzzy_archive_match;
fill_pathname_join_special(
playlist_path, path_dir_playlist, label,
sizeof(playlist_path));
@ -8417,11 +8417,11 @@ static int action_ok_pl_entry_content_thumbnails(const char *path,
playlist_t *playlist = playlist_get_cached();
menu_handle_t *menu = menu_st->driver_data;
system[0] = '\0';
if (!playlist || !menu)
return -1;
system[0] = '\0';
menu_driver_get_thumbnail_system(
menu_st->userdata, system, sizeof(system));
@ -8474,16 +8474,10 @@ static int action_ok_playlist_clean(const char *path,
static int action_ok_playlist_refresh(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
enum manual_content_scan_playlist_refresh_status stat;
playlist_config_t *playlist_config = NULL;
playlist_t *playlist = playlist_get_cached();
settings_t *settings = config_get_ptr();
bool scan_record_valid = false;
const char *msg_prefix = NULL;
const char *msg_subject = NULL;
const char *log_text = NULL;
char system_name[256];
system_name[0] = '\0';
if (!playlist || !settings)
return -1;
@ -8493,91 +8487,96 @@ static int action_ok_playlist_refresh(const char *path,
if (!playlist_config || string_is_empty(playlist_config->path))
return -1;
/* Configure manual scan using playlist record */
switch (manual_content_scan_set_menu_from_playlist(playlist,
stat = manual_content_scan_set_menu_from_playlist(playlist,
settings->paths.path_content_database,
settings->bools.show_hidden_files))
{
case MANUAL_CONTENT_SCAN_PLAYLIST_REFRESH_OK:
scan_record_valid = true;
break;
case MANUAL_CONTENT_SCAN_PLAYLIST_REFRESH_INVALID_CONTENT_DIR:
msg_prefix = msg_hash_to_str(MSG_PLAYLIST_MANAGER_REFRESH_INVALID_CONTENT_DIR);
msg_subject = playlist_get_scan_content_dir(playlist);
log_text = "[Playlist Refresh]: Invalid content directory: %s\n";
break;
case MANUAL_CONTENT_SCAN_PLAYLIST_REFRESH_INVALID_SYSTEM_NAME:
{
const char *playlist_file = NULL;
settings->bools.show_hidden_files);
if ((playlist_file = path_basename(playlist_config->path)))
{
strlcpy(system_name, playlist_file, sizeof(system_name));
path_remove_extension(system_name);
}
msg_prefix = msg_hash_to_str(MSG_PLAYLIST_MANAGER_REFRESH_INVALID_SYSTEM_NAME);
msg_subject = system_name;
log_text = "[Playlist Refresh]: Invalid system name: %s\n";
}
break;
case MANUAL_CONTENT_SCAN_PLAYLIST_REFRESH_INVALID_CORE:
msg_prefix = msg_hash_to_str(MSG_PLAYLIST_MANAGER_REFRESH_INVALID_CORE);
msg_subject = playlist_get_default_core_name(playlist);
log_text = "[Playlist Refresh]: Invalid core name: %s\n";
break;
case MANUAL_CONTENT_SCAN_PLAYLIST_REFRESH_INVALID_DAT_FILE:
msg_prefix = msg_hash_to_str(MSG_PLAYLIST_MANAGER_REFRESH_INVALID_DAT_FILE);
msg_subject = playlist_get_scan_dat_file_path(playlist);
log_text = "[Playlist Refresh]: Invalid arcade dat file: %s\n";
break;
case MANUAL_CONTENT_SCAN_PLAYLIST_REFRESH_DAT_FILE_TOO_LARGE:
msg_prefix = msg_hash_to_str(MSG_PLAYLIST_MANAGER_REFRESH_DAT_FILE_TOO_LARGE);
msg_subject = playlist_get_scan_dat_file_path(playlist);
log_text = "[Playlist Refresh]: Arcade dat file too large: %s\n";
break;
case MANUAL_CONTENT_SCAN_PLAYLIST_REFRESH_MISSING_CONFIG:
default:
msg_prefix = msg_hash_to_str(MSG_PLAYLIST_MANAGER_REFRESH_MISSING_CONFIG);
msg_subject = path_basename(playlist_config->path);
log_text = "[Playlist Refresh]: No scan record found: %s\n";
break;
}
/* Log errors in the event of an invalid
* scan record */
if (!scan_record_valid)
if (stat != MANUAL_CONTENT_SCAN_PLAYLIST_REFRESH_OK)
{
char msg[128];
char system_name[256];
const char *msg_prefix = NULL;
const char *msg_subject = NULL;
const char *log_text = NULL;
switch (stat)
{
case MANUAL_CONTENT_SCAN_PLAYLIST_REFRESH_INVALID_CONTENT_DIR:
msg_prefix = msg_hash_to_str(MSG_PLAYLIST_MANAGER_REFRESH_INVALID_CONTENT_DIR);
msg_subject = playlist_get_scan_content_dir(playlist);
log_text = "[Playlist Refresh]: Invalid content directory: %s\n";
break;
case MANUAL_CONTENT_SCAN_PLAYLIST_REFRESH_INVALID_SYSTEM_NAME:
{
const char *playlist_file = NULL;
if ((playlist_file = path_basename(playlist_config->path)))
{
strlcpy(system_name, playlist_file, sizeof(system_name));
path_remove_extension(system_name);
}
else
system_name[0] = '\0';
msg_prefix = msg_hash_to_str(MSG_PLAYLIST_MANAGER_REFRESH_INVALID_SYSTEM_NAME);
msg_subject = system_name;
log_text = "[Playlist Refresh]: Invalid system name: %s\n";
}
break;
case MANUAL_CONTENT_SCAN_PLAYLIST_REFRESH_INVALID_CORE:
msg_prefix = msg_hash_to_str(MSG_PLAYLIST_MANAGER_REFRESH_INVALID_CORE);
msg_subject = playlist_get_default_core_name(playlist);
log_text = "[Playlist Refresh]: Invalid core name: %s\n";
break;
case MANUAL_CONTENT_SCAN_PLAYLIST_REFRESH_INVALID_DAT_FILE:
msg_prefix = msg_hash_to_str(MSG_PLAYLIST_MANAGER_REFRESH_INVALID_DAT_FILE);
msg_subject = playlist_get_scan_dat_file_path(playlist);
log_text = "[Playlist Refresh]: Invalid arcade dat file: %s\n";
break;
case MANUAL_CONTENT_SCAN_PLAYLIST_REFRESH_DAT_FILE_TOO_LARGE:
msg_prefix = msg_hash_to_str(MSG_PLAYLIST_MANAGER_REFRESH_DAT_FILE_TOO_LARGE);
msg_subject = playlist_get_scan_dat_file_path(playlist);
log_text = "[Playlist Refresh]: Arcade dat file too large: %s\n";
break;
case MANUAL_CONTENT_SCAN_PLAYLIST_REFRESH_MISSING_CONFIG:
default:
msg_prefix = msg_hash_to_str(MSG_PLAYLIST_MANAGER_REFRESH_MISSING_CONFIG);
msg_subject = path_basename(playlist_config->path);
log_text = "[Playlist Refresh]: No scan record found: %s\n";
break;
}
/* Log errors in the event of an invalid
* scan record */
if (string_is_empty(msg_subject))
msg_subject = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE);
fill_pathname_join_special(msg, msg_prefix, msg_subject, sizeof(msg));
RARCH_ERR(log_text, msg_subject);
runloop_msg_queue_push(msg, 1, 150, true,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
/* Even though this is a failure condition, we
* return 0 here to suppress any refreshing of
* the menu (this can appear ugly, depending
* on the active menu driver...) */
return 0;
* let it fall-through to 0 here to suppress
* any refreshing of the menu (this can appear
* ugly, depending on the active menu driver...) */
}
else
{
/* Perform manual scan
* > Since we are refreshing the playlist,
* additionally ensure that all pertinent
* 'playlist_config' parameters are synchronised
* with the current settings struct */
playlist_config->capacity = COLLECTION_SIZE;
playlist_config->old_format = settings->bools.playlist_use_old_format;
playlist_config->compress = settings->bools.playlist_compression;
playlist_config->fuzzy_archive_match = settings->bools.playlist_fuzzy_archive_match;
playlist_config_set_base_content_directory(playlist_config,
settings->bools.playlist_portable_paths ?
settings->paths.directory_menu_content : NULL);
/* Perform manual scan
* > Since we are refreshing the playlist,
* additionally ensure that all pertinent
* 'playlist_config' parameters are synchronised
* with the current settings struct */
playlist_config->capacity = COLLECTION_SIZE;
playlist_config->old_format = settings->bools.playlist_use_old_format;
playlist_config->compress = settings->bools.playlist_compression;
playlist_config->fuzzy_archive_match = settings->bools.playlist_fuzzy_archive_match;
playlist_config_set_base_content_directory(playlist_config,
settings->bools.playlist_portable_paths ?
settings->paths.directory_menu_content : NULL);
task_push_manual_content_scan(playlist_config,
settings->paths.directory_playlist);
task_push_manual_content_scan(playlist_config,
settings->paths.directory_playlist);
}
return 0;
}

View File

@ -5022,7 +5022,7 @@ static bool menu_input_key_bind_iterate(
settings->uints.input_max_users,
&new_binds, &new_binds.buffer))
{
char hold_label[256];
char hold_label[NAME_MAX_LENGTH];
hold_label[0] = '\0';

View File

@ -227,8 +227,8 @@ static uint32_t ex_hash32_nocase_filtered(
{
unsigned char c = *(str++);
if (c >= f_first && c <= f_last)
hash = ((hash * (uint32_t)0x01000193)
^ (uint32_t)((c >= 'A' && c <= 'Z')
hash = ((hash * (uint32_t)0x01000193)
^ (uint32_t)((c >= 'A' && c <= 'Z')
? (c | 0x20) : c));
}
if (hash)
@ -410,7 +410,7 @@ static void explore_load_icons(explore_state_t *state)
/* unload any icons that could exist from a previous call to this */
explore_unload_icons(state);
/* RBUF_RESIZE leaves memory uninitialised,
/* RBUF_RESIZE leaves memory uninitialised,
have to zero it 'manually' */
RBUF_RESIZE(state->icons, system_count);
memset(state->icons, 0, RBUF_SIZEOF(state->icons));
@ -466,7 +466,7 @@ explore_state_t *menu_explore_build_list(const char *directory_playlist,
struct explore_source *playlist_crcs;
struct explore_source *playlist_names;
size_t count;
char systemname[256];
char systemname[NAME_MAX_LENGTH];
}
*rdbs = NULL;
int *rdb_indices = NULL;
@ -479,7 +479,7 @@ explore_state_t *menu_explore_build_list(const char *directory_playlist,
if (!state)
return NULL;
state->label_explore_item_str =
state->label_explore_item_str =
msg_hash_to_str(MENU_ENUM_LABEL_EXPLORE_ITEM);
/* Index all playlists */
@ -572,7 +572,7 @@ explore_state_t *menu_explore_build_list(const char *directory_playlist,
tmp, directory_database, db_name, sizeof(tmp));
/* Replace the extension - change 'lpl' to 'rdb' */
if (( ext_path = path_get_extension_mutable(tmp))
if (( ext_path = path_get_extension_mutable(tmp))
&& ext_path[0] == '.'
&& ext_path[1] == 'l'
&& ext_path[2] == 'p'
@ -621,14 +621,14 @@ explore_state_t *menu_explore_build_list(const char *directory_playlist,
playlist_free(playlist);
}
/* Loop through all RDBs referenced in the playlists
/* Loop through all RDBs referenced in the playlists
* and load meta data strings */
for (i = 0; i != RBUF_LEN(rdbs); i++)
{
struct rmsgpack_dom_value item;
struct explore_rdb* rdb = &rdbs[i];
libretrodb_cursor_t *cur = libretrodb_cursor_new();
bool more =
bool more =
(
libretrodb_cursor_open(rdb->handle, cur, NULL) == 0
&& libretrodb_cursor_read_item(cur, &item) == 0);
@ -834,7 +834,7 @@ static int explore_action_get_title(
const char *path, const char *label,
unsigned menu_type, char *s, size_t len)
{
strlcpy(s, (explore_state ? explore_state->title :
strlcpy(s, (explore_state ? explore_state->title :
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_EXPLORE_TAB)), len);
return 0;
}
@ -895,7 +895,7 @@ static int explore_action_ok(const char *path, const char *label,
state->view_op[lvl] = EXPLORE_OP_EQUAL;
state->view_use_split[lvl] = explore_by_info[cat].use_split;
state->view_cats[lvl] = cat;
state->view_match[lvl] = (type == EXPLORE_TYPE_FILTERNULL ?
state->view_match[lvl] = (type == EXPLORE_TYPE_FILTERNULL ?
NULL : state->by[cat][type-EXPLORE_TYPE_FIRSTITEM]);
state->view_levels++;
}
@ -1013,8 +1013,8 @@ static const char* explore_get_view_path(struct menu_state *menu_st, menu_list_t
/* check if we are opening a saved view via Content > Playlists */
if ( (cur->type == MENU_EXPLORE_TAB)
&& cur->path
&& !string_is_equal(cur->path,
&& cur->path
&& !string_is_equal(cur->path,
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_EXPLORE))
)
return cur->path;
@ -1217,7 +1217,7 @@ static void explore_load_view(explore_state_t *state, const char* path)
{
const char* key = rjson_get_string(json, NULL);
for (cat = 0; cat != EXPLORE_CAT_COUNT; cat++)
if (string_is_equal(key, explore_by_info[cat].rdbkey))
if (string_is_equal(key, explore_by_info[cat].rdbkey))
break;
if (cat == EXPLORE_CAT_COUNT)
rjson_next(json); /* skip value */
@ -1228,7 +1228,7 @@ static void explore_load_view(explore_state_t *state, const char* path)
unsigned lvl, lvl_max = state->view_levels;
uint8_t valid_op = ((uint8_t)-1);
type = rjson_next(json);
if ( type == RJSON_STRING
if ( type == RJSON_STRING
|| type == RJSON_NUMBER)
value = rjson_get_string(json, NULL);
if (value && !*value)
@ -1274,14 +1274,14 @@ static void explore_load_view(explore_state_t *state, const char* path)
else if (op == EXPLORE_OP_MIN)
{
state->view_idx_min[lvl] = (cmp ? i + 1 : i);
valid_op =
valid_op =
((lvl != lvl_max && state->view_op[lvl] == EXPLORE_OP_MAX)
? EXPLORE_OP_RANGE : EXPLORE_OP_MIN);
}
else if (op == EXPLORE_OP_MAX)
{
state->view_idx_max[lvl] = i;
valid_op =
valid_op =
((lvl != lvl_max && state->view_op[lvl] == EXPLORE_OP_MIN)
? EXPLORE_OP_RANGE : EXPLORE_OP_MAX);
}
@ -1292,7 +1292,7 @@ static void explore_load_view(explore_state_t *state, const char* path)
state->view_cats [lvl] = cat;
state->view_use_split[lvl] = explore_by_info[cat].use_split;
if (lvl == lvl_max)
state->view_levels++;
state->view_levels++;
}
}
}
@ -1373,7 +1373,7 @@ unsigned menu_displaylist_explore(file_list_t *list, settings_t *settings)
switch (state->view_op[i])
{
case EXPLORE_OP_EQUAL:
explore_append_title(state, "%s", (match
explore_append_title(state, "%s", (match
? match->str
: msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UNKNOWN)));
break;
@ -1408,7 +1408,7 @@ unsigned menu_displaylist_explore(file_list_t *list, settings_t *settings)
? EXPLORE_ICONS_CONTENT
: EXPLORE_ICONS_OFF;
if ( current_type == MENU_EXPLORE_TAB
if ( current_type == MENU_EXPLORE_TAB
|| current_type == EXPLORE_TYPE_ADDITIONALFILTER)
{
/* Explore top or selecting an additional filter category */
@ -1489,7 +1489,7 @@ unsigned menu_displaylist_explore(file_list_t *list, settings_t *settings)
if (is_top)
{
if (list->size)
((menu_file_list_cbs_t*)list->list[list->size-1].actiondata)->action_sublabel =
((menu_file_list_cbs_t*)list->list[list->size-1].actiondata)->action_sublabel =
explore_action_sublabel_spacer;
explore_menu_entry(list, state,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_EXPLORE_SHOW_ALL),
@ -1509,7 +1509,7 @@ unsigned menu_displaylist_explore(file_list_t *list, settings_t *settings)
if (state->has_unknown[current_cat])
{
if (list->size)
((menu_file_list_cbs_t*)list->list[list->size-1].actiondata)->action_sublabel =
((menu_file_list_cbs_t*)list->list[list->size-1].actiondata)->action_sublabel =
explore_action_sublabel_spacer;
explore_menu_entry(list, state,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UNKNOWN),
@ -1569,7 +1569,7 @@ unsigned menu_displaylist_explore(file_list_t *list, settings_t *settings)
msg_hash_to_str(MENU_ENUM_LABEL_EXPLORE_DELETE_VIEW),
EXPLORE_TYPE_VIEW, explore_action_ok_deleteview);
if (list->size)
((menu_file_list_cbs_t*)list->list[list->size-1].actiondata)->action_sublabel =
((menu_file_list_cbs_t*)list->list[list->size-1].actiondata)->action_sublabel =
explore_action_sublabel_spacer;
}
else
@ -1587,7 +1587,7 @@ unsigned menu_displaylist_explore(file_list_t *list, settings_t *settings)
msg_hash_to_str(MENU_ENUM_LABEL_EXPLORE_SAVE_VIEW),
EXPLORE_TYPE_VIEW, explore_action_ok_saveview);
if (list->size)
((menu_file_list_cbs_t*)list->list[list->size-1].actiondata)->action_sublabel =
((menu_file_list_cbs_t*)list->list[list->size-1].actiondata)->action_sublabel =
explore_action_sublabel_spacer;
}
@ -1607,7 +1607,7 @@ unsigned menu_displaylist_explore(file_list_t *list, settings_t *settings)
explore_string_t** split = e->split;
do
{
if (*split == view_match[i])
if (*split == view_match[i])
break;
} while (*(++split));
if (*split)
@ -1668,7 +1668,7 @@ SKIP_ENTRY:;
if (is_filtered_category && filtered_category_have_unknown)
{
if (list->size)
((menu_file_list_cbs_t*)list->list[list->size-1].actiondata)->action_sublabel =
((menu_file_list_cbs_t*)list->list[list->size-1].actiondata)->action_sublabel =
explore_action_sublabel_spacer;
explore_menu_entry(list, state,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UNKNOWN),
@ -1681,7 +1681,7 @@ SKIP_ENTRY:;
{
/* Content page of selected game */
int pl_idx;
const struct playlist_entry *pl_entry =
const struct playlist_entry *pl_entry =
state->entries[current_type - EXPLORE_TYPE_FIRSTITEM].playlist_entry;
strlcpy(state->title,
@ -1691,7 +1691,7 @@ SKIP_ENTRY:;
{
menu_displaylist_info_t info;
const struct playlist_entry *pl_first = NULL;
playlist_t *pl =
playlist_t *pl =
state->playlists[pl_idx];
playlist_get_index(pl, 0, &pl_first);
@ -1700,7 +1700,7 @@ SKIP_ENTRY:;
|| (pl_entry >= pl_first + playlist_size(pl)))
continue;
/* Fake all the state so the content screen
/* Fake all the state so the content screen
* and information screen think we're viewing via playlist */
menu_displaylist_info_init(&info);
playlist_set_cached_external(pl);
@ -1720,7 +1720,7 @@ SKIP_ENTRY:;
uintptr_t menu_explore_get_entry_icon(unsigned type)
{
unsigned i;
if ( !explore_state
if ( !explore_state
|| !explore_state->show_icons
|| (type < EXPLORE_TYPE_FIRSTITEM))
return 0;
@ -1747,7 +1747,7 @@ ssize_t menu_explore_get_entry_playlist_index(unsigned type,
int pl_idx;
explore_entry_t* entry;
if ( !explore_state
if ( !explore_state
|| (type < EXPLORE_TYPE_FIRSTITEM)
|| (explore_state->show_icons != EXPLORE_ICONS_CONTENT))
return -1;
@ -1773,7 +1773,7 @@ ssize_t menu_explore_get_entry_playlist_index(unsigned type,
if (playlist_entry)
*playlist_entry = entry->playlist_entry;
/* correct numbers of list pos and list size */
/* correct numbers of list pos and list size */
if (list && list_pos && list_size)
while (*list_size && list->list[list->size-*list_size].type < EXPLORE_TYPE_FIRSTITEM)
{ (*list_size)--; (*list_pos)--; }
@ -1793,7 +1793,7 @@ ssize_t menu_explore_set_playlist_thumbnail(unsigned type,
ssize_t playlist_index = -1;
playlist_t *playlist = NULL;
if ( !explore_state
if ( !explore_state
|| (type < EXPLORE_TYPE_FIRSTITEM)
|| (explore_state->show_icons != EXPLORE_ICONS_CONTENT))
return -1;

View File

@ -2569,8 +2569,8 @@ static int setting_action_ok_bind_all_save_autoconfig(
if (!string_is_empty(name) &&
config_save_autoconf_profile(name, index_offset))
{
char msg[256];
char buf[128];
char msg[NAME_MAX_LENGTH];
config_get_autoconf_profile_filename(name, index_offset, buf, sizeof(buf));
snprintf(msg, sizeof(msg),msg_hash_to_str(MSG_AUTOCONFIG_FILE_SAVED_SUCCESSFULLY_NAMED),buf);
runloop_msg_queue_push(