mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 09:32:52 +00:00
Try to get rid of file_path_str
This commit is contained in:
parent
3a61cfe6ec
commit
ab515daa0c
@ -3111,7 +3111,7 @@ static bool config_load_file(const char *path, settings_t *settings)
|
||||
sizeof(global->name.savefile));
|
||||
fill_pathname_dir(global->name.savefile,
|
||||
path_get(RARCH_PATH_BASENAME),
|
||||
file_path_str(FILE_PATH_SRM_EXTENSION),
|
||||
".srm",
|
||||
sizeof(global->name.savefile));
|
||||
}
|
||||
}
|
||||
@ -3136,7 +3136,7 @@ static bool config_load_file(const char *path, settings_t *settings)
|
||||
sizeof(global->name.savestate));
|
||||
fill_pathname_dir(global->name.savestate,
|
||||
path_get(RARCH_PATH_BASENAME),
|
||||
file_path_str(FILE_PATH_STATE_EXTENSION),
|
||||
".state",
|
||||
sizeof(global->name.savestate));
|
||||
}
|
||||
}
|
||||
@ -3261,19 +3261,19 @@ bool config_load_override(void)
|
||||
fill_pathname_join_special_ext(game_path,
|
||||
config_directory, core_name,
|
||||
game_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(content_path,
|
||||
config_directory, core_name,
|
||||
content_dir_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(core_path,
|
||||
config_directory, core_name,
|
||||
core_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
|
||||
free(config_directory);
|
||||
@ -3488,19 +3488,19 @@ bool config_load_remap(const char *directory_input_remapping)
|
||||
fill_pathname_join_special_ext(core_path,
|
||||
remap_directory, core_name,
|
||||
core_name,
|
||||
file_path_str(FILE_PATH_REMAP_EXTENSION),
|
||||
".rmp",
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(content_path,
|
||||
remap_directory, core_name,
|
||||
content_dir_name,
|
||||
file_path_str(FILE_PATH_REMAP_EXTENSION),
|
||||
".rmp",
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(game_path,
|
||||
remap_directory, core_name,
|
||||
game_name,
|
||||
file_path_str(FILE_PATH_REMAP_EXTENSION),
|
||||
".rmp",
|
||||
path_size);
|
||||
|
||||
input_remapping_set_defaults(false);
|
||||
@ -3644,7 +3644,7 @@ bool config_save_autoconf_profile(const char *path, unsigned user)
|
||||
fill_pathname_join(buf_new, buf,
|
||||
path, path_size);
|
||||
fill_pathname_noext(autoconf_file, buf_new,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
|
||||
free(buf_new);
|
||||
@ -3654,7 +3654,7 @@ bool config_save_autoconf_profile(const char *path, unsigned user)
|
||||
fill_pathname_join(buf, autoconf_dir,
|
||||
path, path_size);
|
||||
fill_pathname_noext(autoconf_file, buf,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
}
|
||||
|
||||
@ -4003,19 +4003,19 @@ bool config_save_overrides(int override_type)
|
||||
fill_pathname_join_special_ext(game_path,
|
||||
config_directory, core_name,
|
||||
game_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(content_path,
|
||||
config_directory, core_name,
|
||||
content_dir_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(core_path,
|
||||
config_directory, core_name,
|
||||
core_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
|
||||
if (!conf)
|
||||
|
@ -230,9 +230,7 @@ static config_file_t *core_info_list_iterate(
|
||||
}
|
||||
#endif
|
||||
|
||||
strlcat(info_path_base,
|
||||
file_path_str(FILE_PATH_CORE_INFO_EXTENSION),
|
||||
info_path_base_size);
|
||||
strlcat(info_path_base, ".info", info_path_base_size);
|
||||
|
||||
info_path = (char*)malloc(info_path_base_size);
|
||||
fill_pathname_join(info_path,
|
||||
|
@ -205,9 +205,7 @@ void fill_pathname_application_special(char *s,
|
||||
fill_pathname_application_special(s1,
|
||||
PATH_MAX_LENGTH * sizeof(char),
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS);
|
||||
fill_pathname_join(s, s1,
|
||||
file_path_str(FILE_PATH_BACKGROUND_IMAGE),
|
||||
len);
|
||||
fill_pathname_join(s, s1, "bg.png", len);
|
||||
free(s1);
|
||||
}
|
||||
}
|
||||
@ -361,10 +359,7 @@ void fill_pathname_application_special(char *s,
|
||||
fill_pathname_application_special(s1,
|
||||
PATH_MAX_LENGTH * sizeof(char),
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB);
|
||||
fill_pathname_join(s, s1,
|
||||
file_path_str(FILE_PATH_TTF_FONT),
|
||||
len);
|
||||
|
||||
fill_pathname_join(s, s1, "font.ttf", len);
|
||||
free(s1);
|
||||
}
|
||||
}
|
||||
|
@ -1256,12 +1256,12 @@ const char *video_shader_get_preset_extension(enum rarch_shader_type type)
|
||||
switch (type)
|
||||
{
|
||||
case RARCH_SHADER_GLSL:
|
||||
return file_path_str(FILE_PATH_GLSLP_EXTENSION);
|
||||
return ".glslp";
|
||||
case RARCH_SHADER_SLANG:
|
||||
return file_path_str(FILE_PATH_SLANGP_EXTENSION);
|
||||
return ".slangp";
|
||||
case RARCH_SHADER_HLSL:
|
||||
case RARCH_SHADER_CG:
|
||||
return file_path_str(FILE_PATH_CGP_EXTENSION);
|
||||
return ".cgp";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1092,7 +1092,7 @@ static void menu_action_setting_disp_set_label_playlist_associations(file_list_t
|
||||
core_name = playlist_get_default_core_name(playlist);
|
||||
|
||||
if (!string_is_empty(core_name) &&
|
||||
!string_is_equal(core_name, file_path_str(FILE_PATH_DETECT)))
|
||||
!string_is_equal(core_name, "DETECT"))
|
||||
strlcpy(s, core_name, len);
|
||||
else
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), len);
|
||||
|
@ -67,7 +67,7 @@ static int action_bind_label_playlist_collection_entry(
|
||||
return 0;
|
||||
|
||||
if (string_is_equal_noncase(path_get_extension(playlist_file),
|
||||
file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT)))
|
||||
"lpl"))
|
||||
{
|
||||
/* Handle content history */
|
||||
if (string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_HISTORY)))
|
||||
|
@ -404,7 +404,15 @@ static int playlist_association_left(unsigned type, const char *label,
|
||||
|
||||
/* Get current core path association */
|
||||
if (string_is_empty(playlist_get_default_core_path(playlist)))
|
||||
strlcpy(core_path, file_path_str(FILE_PATH_DETECT), sizeof(core_path));
|
||||
{
|
||||
core_path[0] = 'D';
|
||||
core_path[1] = 'E';
|
||||
core_path[2] = 'T';
|
||||
core_path[3] = 'E';
|
||||
core_path[4] = 'C';
|
||||
core_path[5] = 'T';
|
||||
core_path[6] = '\0';
|
||||
}
|
||||
else
|
||||
strlcpy(core_path, playlist_get_default_core_path(playlist), sizeof(core_path));
|
||||
|
||||
|
@ -1136,10 +1136,10 @@ static bool menu_content_playlist_load(playlist_t *playlist, size_t idx)
|
||||
for (i = 0; i < strlen(path_tolower); ++i)
|
||||
path_tolower[i] = tolower((unsigned char)path_tolower[i]);
|
||||
|
||||
if (strstr(path_tolower, file_path_str(FILE_PATH_ZIP_EXTENSION)))
|
||||
strstr(path_tolower, file_path_str(FILE_PATH_ZIP_EXTENSION))[4] = '\0';
|
||||
else if (strstr(path_tolower, file_path_str(FILE_PATH_7Z_EXTENSION)))
|
||||
strstr(path_tolower, file_path_str(FILE_PATH_7Z_EXTENSION))[3] = '\0';
|
||||
if (strstr(path_tolower, ".zip"))
|
||||
strstr(path_tolower, ".zip")[4] = '\0';
|
||||
else if (strstr(path_tolower, ".7z"))
|
||||
strstr(path_tolower, ".7z")[3] = '\0';
|
||||
|
||||
path_check = (char *)
|
||||
calloc(strlen(path_tolower) + 1, sizeof(char));
|
||||
@ -1948,8 +1948,8 @@ static int action_ok_playlist_entry_collection(const char *path,
|
||||
}
|
||||
|
||||
/* Is the core path / name of the playlist entry not yet filled in? */
|
||||
if ( string_is_equal(entry->core_path, file_path_str(FILE_PATH_DETECT))
|
||||
&& string_is_equal(entry->core_name, file_path_str(FILE_PATH_DETECT)))
|
||||
if ( string_is_equal(entry->core_path, "DETECT")
|
||||
&& string_is_equal(entry->core_name, "DETECT"))
|
||||
{
|
||||
core_info_ctx_find_t core_info;
|
||||
const char *entry_path = NULL;
|
||||
@ -2041,8 +2041,8 @@ static int action_ok_playlist_entry(const char *path,
|
||||
|
||||
entry_label = entry->label;
|
||||
|
||||
if ( string_is_equal(entry->core_path, file_path_str(FILE_PATH_DETECT))
|
||||
&& string_is_equal(entry->core_name, file_path_str(FILE_PATH_DETECT)))
|
||||
if ( string_is_equal(entry->core_path, "DETECT")
|
||||
&& string_is_equal(entry->core_name, "DETECT"))
|
||||
{
|
||||
core_info_ctx_find_t core_info;
|
||||
const char *default_core_path =
|
||||
@ -2116,8 +2116,8 @@ static int action_ok_playlist_entry_start_content(const char *path,
|
||||
|
||||
playlist_get_index(playlist, selection_ptr, &entry);
|
||||
|
||||
if ( string_is_equal(entry->core_path, file_path_str(FILE_PATH_DETECT))
|
||||
&& string_is_equal(entry->core_name, file_path_str(FILE_PATH_DETECT)))
|
||||
if ( string_is_equal(entry->core_path, "DETECT")
|
||||
&& string_is_equal(entry->core_name, "DETECT"))
|
||||
{
|
||||
core_info_ctx_find_t core_info;
|
||||
char new_core_path[PATH_MAX_LENGTH];
|
||||
@ -3749,7 +3749,7 @@ static int generic_action_ok_network(const char *path,
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_CORE_CONTENT_LIST:
|
||||
fill_pathname_join(url_path, path,
|
||||
file_path_str(FILE_PATH_INDEX_URL), sizeof(url_path));
|
||||
".index", sizeof(url_path));
|
||||
url_label = msg_hash_to_str(enum_idx);
|
||||
type_id2 = ACTION_OK_DL_CORE_CONTENT_LIST;
|
||||
callback = cb_net_generic;
|
||||
@ -3761,15 +3761,15 @@ static int generic_action_ok_network(const char *path,
|
||||
return menu_cbs_exit();
|
||||
|
||||
fill_pathname_join(url_path, settings->paths.network_buildbot_url,
|
||||
file_path_str(FILE_PATH_INDEX_EXTENDED_URL), sizeof(url_path));
|
||||
".index-extended", sizeof(url_path));
|
||||
url_label = msg_hash_to_str(enum_idx);
|
||||
type_id2 = ACTION_OK_DL_CORE_UPDATER_LIST;
|
||||
callback = cb_net_generic;
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_THUMBNAILS_UPDATER_LIST:
|
||||
fill_pathname_join(url_path,
|
||||
file_path_str(FILE_PATH_CORE_THUMBNAILPACKS_URL),
|
||||
file_path_str(FILE_PATH_INDEX_URL), sizeof(url_path));
|
||||
"http://thumbnailpacks.libretro.com",
|
||||
".index", sizeof(url_path));
|
||||
url_label = msg_hash_to_str(enum_idx);
|
||||
type_id2 = ACTION_OK_DL_THUMBNAILS_UPDATER_LIST;
|
||||
callback = cb_net_generic;
|
||||
@ -3781,7 +3781,7 @@ static int generic_action_ok_network(const char *path,
|
||||
file_path_str(FILE_PATH_LAKKA_URL),
|
||||
lakka_get_project(), sizeof(url_path));
|
||||
fill_pathname_join(url_path, url_path,
|
||||
file_path_str(FILE_PATH_INDEX_URL),
|
||||
".index",
|
||||
sizeof(url_path));
|
||||
url_label = msg_hash_to_str(enum_idx);
|
||||
type_id2 = ACTION_OK_DL_LAKKA_LIST;
|
||||
@ -4080,34 +4080,34 @@ static int action_ok_download_generic(const char *path,
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_ASSETS:
|
||||
path = file_path_str(FILE_PATH_ASSETS_ZIP);
|
||||
path = "assets.zip";
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_AUTOCONFIG_PROFILES:
|
||||
path = file_path_str(FILE_PATH_AUTOCONFIG_ZIP);
|
||||
path = "autoconfig.zip";
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_CORE_INFO_FILES:
|
||||
path = file_path_str(FILE_PATH_CORE_INFO_ZIP);
|
||||
path = "info.zip";
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_CHEATS:
|
||||
path = file_path_str(FILE_PATH_CHEATS_ZIP);
|
||||
path = "cheats.zip";
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_OVERLAYS:
|
||||
path = file_path_str(FILE_PATH_OVERLAYS_ZIP);
|
||||
path = "overlays.zip";
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_DATABASES:
|
||||
path = file_path_str(FILE_PATH_DATABASE_RDB_ZIP);
|
||||
path = "database-rdb.zip";
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_SHADERS_GLSL:
|
||||
path = file_path_str(FILE_PATH_SHADERS_GLSL_ZIP);
|
||||
path = "shaders_glsl.zip";
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_SHADERS_SLANG:
|
||||
path = file_path_str(FILE_PATH_SHADERS_SLANG_ZIP);
|
||||
path = "shaders_slang.zip";
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_SHADERS_CG:
|
||||
path = file_path_str(FILE_PATH_SHADERS_CG_ZIP);
|
||||
path = "shaders_cg.zip";
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_CORE_THUMBNAILS_DOWNLOAD:
|
||||
strlcpy(s, file_path_str(FILE_PATH_CORE_THUMBNAILPACKS_URL), sizeof(s));
|
||||
strlcpy(s, "http://thumbnailpacks.libretro.com", sizeof(s));
|
||||
break;
|
||||
default:
|
||||
strlcpy(s, settings->paths.network_buildbot_url, sizeof(s));
|
||||
@ -4324,8 +4324,8 @@ static int action_ok_add_to_favorites(const char *path,
|
||||
|
||||
if (string_is_empty(core_path) || string_is_empty(core_name))
|
||||
{
|
||||
strlcpy(core_path, file_path_str(FILE_PATH_DETECT), sizeof(core_path));
|
||||
strlcpy(core_name, file_path_str(FILE_PATH_DETECT), sizeof(core_name));
|
||||
strlcpy(core_path, "DETECT", sizeof(core_path));
|
||||
strlcpy(core_name, "DETECT", sizeof(core_name));
|
||||
}
|
||||
|
||||
/* > crc32 + db_name */
|
||||
@ -4452,8 +4452,8 @@ static int action_ok_add_to_favorites_playlist(const char *path,
|
||||
}
|
||||
else
|
||||
{
|
||||
string_list_append(str_list, file_path_str(FILE_PATH_DETECT), attr);
|
||||
string_list_append(str_list, file_path_str(FILE_PATH_DETECT), attr);
|
||||
string_list_append(str_list, "DETECT", attr);
|
||||
string_list_append(str_list, "DETECT", attr);
|
||||
}
|
||||
|
||||
/* crc32 */
|
||||
@ -4979,7 +4979,7 @@ static void netplay_refresh_rooms_cb(retro_task_t *task,
|
||||
data->data = new_data;
|
||||
data->data[data->len] = '\0';
|
||||
|
||||
if (!strstr(data->data, file_path_str(FILE_PATH_NETPLAY_ROOM_LIST_URL)))
|
||||
if (!strstr(data->data, "registry.lpl"))
|
||||
{
|
||||
if (string_is_empty(data->data))
|
||||
netplay_room_count = 0;
|
||||
@ -5480,8 +5480,8 @@ static int action_ok_push_dropdown_item_playlist_default_core(const char *path,
|
||||
if (string_is_empty(core_name) ||
|
||||
string_is_equal(core_name, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE)))
|
||||
{
|
||||
playlist_set_default_core_path(playlist, file_path_str(FILE_PATH_DETECT));
|
||||
playlist_set_default_core_name(playlist, file_path_str(FILE_PATH_DETECT));
|
||||
playlist_set_default_core_path(playlist, "DETECT");
|
||||
playlist_set_default_core_name(playlist, "DETECT");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -5512,8 +5512,8 @@ static int action_ok_push_dropdown_item_playlist_default_core(const char *path,
|
||||
/* Fallback... */
|
||||
if (!found)
|
||||
{
|
||||
playlist_set_default_core_path(playlist, file_path_str(FILE_PATH_DETECT));
|
||||
playlist_set_default_core_name(playlist, file_path_str(FILE_PATH_DETECT));
|
||||
playlist_set_default_core_path(playlist, "DETECT");
|
||||
playlist_set_default_core_name(playlist, "DETECT");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -510,7 +510,15 @@ static int playlist_association_right(unsigned type, const char *label,
|
||||
|
||||
/* Get current core path association */
|
||||
if (string_is_empty(playlist_get_default_core_path(playlist)))
|
||||
strlcpy(core_path, file_path_str(FILE_PATH_DETECT), sizeof(core_path));
|
||||
{
|
||||
core_path[0] = 'D';
|
||||
core_path[1] = 'E';
|
||||
core_path[2] = 'T';
|
||||
core_path[3] = 'E';
|
||||
core_path[4] = 'C';
|
||||
core_path[5] = 'T';
|
||||
core_path[6] = '\0';
|
||||
}
|
||||
else
|
||||
strlcpy(core_path, playlist_get_default_core_path(playlist), sizeof(core_path));
|
||||
|
||||
|
@ -1029,7 +1029,7 @@ 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, file_path_str(FILE_PATH_DETECT)))
|
||||
if (string_is_empty(entry->core_name) || string_is_equal(entry->core_name, "DETECT"))
|
||||
return 0;
|
||||
|
||||
/* Add core name */
|
||||
|
@ -101,7 +101,7 @@ static int action_get_title_deferred_playlist_list(const char *path, const char
|
||||
return 0;
|
||||
|
||||
if (string_is_equal_noncase(path_get_extension(playlist_file),
|
||||
file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT)))
|
||||
"lpl"))
|
||||
{
|
||||
/* Handle content history */
|
||||
if (string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_HISTORY)))
|
||||
|
@ -1999,8 +1999,7 @@ static bool ozone_menu_init_list(void *data)
|
||||
|
||||
info.label = strdup(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU));
|
||||
info.exts =
|
||||
strdup(file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT));
|
||||
info.exts = strdup("lpl");
|
||||
info.type_default = FILE_TYPE_PLAIN;
|
||||
info.enum_idx = MENU_ENUM_LABEL_MAIN_MENU;
|
||||
|
||||
|
@ -559,8 +559,7 @@ void ozone_init_horizontal_list(ozone_handle_t *ozone)
|
||||
settings->paths.directory_playlist);
|
||||
info.label = strdup(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB));
|
||||
info.exts = strdup(
|
||||
file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT));
|
||||
info.exts = strdup("lpl");
|
||||
info.type_default = FILE_TYPE_PLAIN;
|
||||
info.enum_idx = MENU_ENUM_LABEL_PLAYLISTS_TAB;
|
||||
|
||||
@ -623,7 +622,7 @@ void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
|
||||
if (!path)
|
||||
continue;
|
||||
|
||||
if (!strstr(path, file_path_str(FILE_PATH_LPL_EXTENSION)))
|
||||
if (!strstr(path, ".lpl"))
|
||||
continue;
|
||||
|
||||
{
|
||||
@ -645,14 +644,14 @@ void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
fill_pathname_join_concat(texturepath, icons_path, sysname,
|
||||
file_path_str(FILE_PATH_PNG_EXTENSION),
|
||||
".lpl",
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
/* If the playlist icon doesn't exist return default */
|
||||
|
||||
if (!path_is_valid(texturepath))
|
||||
fill_pathname_join_concat(texturepath, icons_path, "default",
|
||||
file_path_str(FILE_PATH_PNG_EXTENSION),
|
||||
".lpl",
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
ti.width = 0;
|
||||
@ -673,7 +672,7 @@ void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
|
||||
}
|
||||
|
||||
fill_pathname_join_delim(sysname, sysname,
|
||||
file_path_str(FILE_PATH_CONTENT_BASENAME), '-',
|
||||
"content.png", '-',
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
strlcat(content_texturepath, icons_path, PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
@ -686,7 +685,7 @@ void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
|
||||
strlcat(icons_path, path_default_slash(), PATH_MAX_LENGTH * sizeof(char));
|
||||
strlcat(icons_path, "default", PATH_MAX_LENGTH * sizeof(char));
|
||||
fill_pathname_join_delim(content_texturepath, icons_path,
|
||||
file_path_str(FILE_PATH_CONTENT_BASENAME), '-',
|
||||
"content.png", '-',
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
}
|
||||
|
||||
@ -764,7 +763,7 @@ void ozone_context_destroy_horizontal_list(ozone_handle_t *ozone)
|
||||
file_list_get_at_offset(ozone->horizontal_list, i,
|
||||
&path, NULL, NULL, NULL);
|
||||
|
||||
if (!path || !strstr(path, file_path_str(FILE_PATH_LPL_EXTENSION)))
|
||||
if (!path || !strstr(path, ".lpl"))
|
||||
continue;
|
||||
|
||||
video_driver_texture_unload(&node->icon);
|
||||
|
@ -983,9 +983,7 @@ static void stripes_update_thumbnail_path(void *data, unsigned i, char pos)
|
||||
|
||||
/* Append png extension */
|
||||
if (!string_is_empty(new_path))
|
||||
strlcat(new_path,
|
||||
file_path_str(FILE_PATH_PNG_EXTENSION),
|
||||
sizeof(new_path));
|
||||
strlcat(new_path, ".png", sizeof(new_path));
|
||||
|
||||
end:
|
||||
if (stripes && !string_is_empty(new_path))
|
||||
@ -1040,7 +1038,7 @@ static void stripes_update_savestate_thumbnail_path(void *data, unsigned i)
|
||||
strlcpy(path, global->name.savestate, path_size);
|
||||
}
|
||||
|
||||
strlcat(path, file_path_str(FILE_PATH_PNG_EXTENSION), path_size);
|
||||
strlcat(path, ".png", path_size);
|
||||
|
||||
if (path_is_valid(path))
|
||||
{
|
||||
@ -1506,9 +1504,7 @@ static void stripes_list_switch_new(stripes_handle_t *stripes,
|
||||
free(tmp);
|
||||
}
|
||||
|
||||
strlcat(path,
|
||||
file_path_str(FILE_PATH_PNG_EXTENSION),
|
||||
path_size);
|
||||
strlcat(path, ".png", path_size);
|
||||
|
||||
if (!path_is_valid(path))
|
||||
fill_pathname_application_special(path, path_size,
|
||||
@ -1809,7 +1805,7 @@ static void stripes_context_destroy_horizontal_list(stripes_handle_t *stripes)
|
||||
file_list_get_at_offset(stripes->horizontal_list, i,
|
||||
&path, NULL, NULL, NULL);
|
||||
|
||||
if (!path || !strstr(path, file_path_str(FILE_PATH_LPL_EXTENSION)))
|
||||
if (!path || !strstr(path, ".lpl"))
|
||||
continue;
|
||||
|
||||
video_driver_texture_unload(&node->icon);
|
||||
@ -1833,8 +1829,7 @@ static void stripes_init_horizontal_list(stripes_handle_t *stripes)
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST));
|
||||
info.enum_idx = MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST;
|
||||
#endif
|
||||
info.exts = strdup(
|
||||
file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT));
|
||||
info.exts = strdup("lpl");
|
||||
info.type_default = FILE_TYPE_PLAIN;
|
||||
|
||||
if (!string_is_empty(info.path))
|
||||
@ -1911,7 +1906,7 @@ static void stripes_context_reset_horizontal_list(
|
||||
if (!path)
|
||||
continue;
|
||||
|
||||
if (!strstr(path, file_path_str(FILE_PATH_LPL_EXTENSION)))
|
||||
if (!strstr(path, ".lpl"))
|
||||
continue;
|
||||
|
||||
{
|
||||
@ -1934,7 +1929,7 @@ static void stripes_context_reset_horizontal_list(
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS);
|
||||
|
||||
fill_pathname_join_concat(texturepath, iconpath, sysname,
|
||||
file_path_str(FILE_PATH_PNG_EXTENSION),
|
||||
".png",
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
ti.width = 0;
|
||||
@ -1956,7 +1951,7 @@ static void stripes_context_reset_horizontal_list(
|
||||
|
||||
strlcat(iconpath, sysname, PATH_MAX_LENGTH * sizeof(char));
|
||||
fill_pathname_join_delim(content_texturepath, iconpath,
|
||||
file_path_str(FILE_PATH_CONTENT_BASENAME), '-',
|
||||
"content.png", '-',
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
if (image_texture_load(&ti, content_texturepath))
|
||||
@ -4368,8 +4363,7 @@ static bool stripes_menu_init_list(void *data)
|
||||
|
||||
info.label = strdup(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU));
|
||||
info.exts =
|
||||
strdup(file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT));
|
||||
info.exts = strdup("lpl");
|
||||
info.type_default = FILE_TYPE_PLAIN;
|
||||
info.enum_idx = MENU_ENUM_LABEL_MAIN_MENU;
|
||||
|
||||
|
@ -992,7 +992,7 @@ static void xmb_update_savestate_thumbnail_path(void *data, unsigned i)
|
||||
strlcpy(path, global->name.savestate, path_size);
|
||||
}
|
||||
|
||||
strlcat(path, file_path_str(FILE_PATH_PNG_EXTENSION), path_size);
|
||||
strlcat(path, ".png", path_size);
|
||||
|
||||
if (path_is_valid(path))
|
||||
{
|
||||
@ -1680,9 +1680,7 @@ static void xmb_list_switch_new(xmb_handle_t *xmb,
|
||||
free(tmp);
|
||||
}
|
||||
|
||||
strlcat(path,
|
||||
file_path_str(FILE_PATH_PNG_EXTENSION),
|
||||
path_size);
|
||||
strlcat(path, ".png", path_size);
|
||||
|
||||
if (!path_is_valid(path))
|
||||
fill_pathname_application_special(path, path_size,
|
||||
@ -1957,7 +1955,7 @@ static void xmb_context_destroy_horizontal_list(xmb_handle_t *xmb)
|
||||
file_list_get_at_offset(xmb->horizontal_list, i,
|
||||
&path, NULL, NULL, NULL);
|
||||
|
||||
if (!path || !strstr(path, file_path_str(FILE_PATH_LPL_EXTENSION)))
|
||||
if (!path || !strstr(path, ".lpl"))
|
||||
continue;
|
||||
|
||||
video_driver_texture_unload(&node->icon);
|
||||
@ -1977,8 +1975,7 @@ static void xmb_init_horizontal_list(xmb_handle_t *xmb)
|
||||
settings->paths.directory_playlist);
|
||||
info.label = strdup(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB));
|
||||
info.exts = strdup(
|
||||
file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT));
|
||||
info.exts = strdup("lpl");
|
||||
info.type_default = FILE_TYPE_PLAIN;
|
||||
info.enum_idx = MENU_ENUM_LABEL_PLAYLISTS_TAB;
|
||||
|
||||
@ -2056,7 +2053,7 @@ static void xmb_context_reset_horizontal_list(
|
||||
if (!path)
|
||||
continue;
|
||||
|
||||
if (!strstr(path, file_path_str(FILE_PATH_LPL_EXTENSION)))
|
||||
if (!strstr(path, ".lpl"))
|
||||
continue;
|
||||
|
||||
{
|
||||
@ -2081,14 +2078,14 @@ static void xmb_context_reset_horizontal_list(
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS);
|
||||
|
||||
fill_pathname_join_concat(texturepath, iconpath, sysname,
|
||||
file_path_str(FILE_PATH_PNG_EXTENSION),
|
||||
".png",
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
/* If the playlist icon doesn't exist return default */
|
||||
|
||||
if (!path_is_valid(texturepath))
|
||||
fill_pathname_join_concat(texturepath, iconpath, "default",
|
||||
file_path_str(FILE_PATH_PNG_EXTENSION),
|
||||
".png",
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
ti.width = 0;
|
||||
@ -2108,9 +2105,8 @@ static void xmb_context_reset_horizontal_list(
|
||||
image_texture_free(&ti);
|
||||
}
|
||||
|
||||
fill_pathname_join_delim(sysname, sysname,
|
||||
file_path_str(FILE_PATH_CONTENT_BASENAME), '-',
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
fill_pathname_join_delim(sysname, sysname, "content.png",
|
||||
'-', PATH_MAX_LENGTH * sizeof(char));
|
||||
strlcat(content_texturepath, iconpath, PATH_MAX_LENGTH * sizeof(char));
|
||||
strlcat(content_texturepath, sysname, PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
@ -2120,7 +2116,7 @@ static void xmb_context_reset_horizontal_list(
|
||||
{
|
||||
strlcat(iconpath, "default", PATH_MAX_LENGTH * sizeof(char));
|
||||
fill_pathname_join_delim(content_texturepath, iconpath,
|
||||
file_path_str(FILE_PATH_CONTENT_BASENAME), '-',
|
||||
"content.png", '-',
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
}
|
||||
|
||||
@ -5956,8 +5952,7 @@ static bool xmb_menu_init_list(void *data)
|
||||
|
||||
info.label = strdup(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU));
|
||||
info.exts =
|
||||
strdup(file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT));
|
||||
info.exts = strdup("lpl");
|
||||
info.type_default = FILE_TYPE_PLAIN;
|
||||
info.enum_idx = MENU_ENUM_LABEL_MAIN_MENU;
|
||||
|
||||
|
@ -964,7 +964,7 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
|
||||
|
||||
if (show_inline_core_name)
|
||||
{
|
||||
if (!string_is_empty(entry->core_name) && !string_is_equal(entry->core_name, file_path_str(FILE_PATH_DETECT)))
|
||||
if (!string_is_empty(entry->core_name) && !string_is_equal(entry->core_name, "DETECT"))
|
||||
{
|
||||
strlcat(menu_entry_label, label_spacer, sizeof(menu_entry_label));
|
||||
strlcat(menu_entry_label, entry->core_name, sizeof(menu_entry_label));
|
||||
@ -1127,10 +1127,7 @@ static int menu_displaylist_parse_database_entry(menu_handle_t *menu,
|
||||
|
||||
menu_driver_set_thumbnail_system(path_base, sizeof(path_base));
|
||||
|
||||
strlcat(path_base,
|
||||
file_path_str(FILE_PATH_LPL_EXTENSION),
|
||||
sizeof(path_base)
|
||||
);
|
||||
strlcat(path_base, ".lpl", sizeof(path_base));
|
||||
|
||||
fill_pathname_join(path_playlist,
|
||||
settings->paths.directory_playlist, path_base,
|
||||
@ -2453,7 +2450,7 @@ static unsigned menu_displaylist_parse_playlists(
|
||||
|
||||
/* Ignore non-playlist files */
|
||||
if (!string_is_equal_noncase(path_get_extension(playlist_file),
|
||||
file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT)))
|
||||
"lpl"))
|
||||
continue;
|
||||
|
||||
/* Ignore history/favourites */
|
||||
@ -2725,7 +2722,7 @@ static unsigned menu_displaylist_parse_playlist_manager_list(
|
||||
|
||||
/* Ignore non-playlist files */
|
||||
if (!string_is_equal_noncase(path_get_extension(playlist_file),
|
||||
file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT)))
|
||||
"lpl"))
|
||||
continue;
|
||||
|
||||
/* Ignore history/favourites
|
||||
@ -2909,7 +2906,7 @@ static unsigned menu_displaylist_parse_pl_thumbnail_download_list(
|
||||
continue;
|
||||
|
||||
if (!string_is_equal_noncase(path_get_extension(path),
|
||||
file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT)))
|
||||
"lpl"))
|
||||
continue;
|
||||
|
||||
strlcpy(path_base, path, sizeof(path_base));
|
||||
@ -3056,7 +3053,7 @@ static unsigned menu_displaylist_parse_content_information(
|
||||
|
||||
/* Core name */
|
||||
if (!string_is_empty(core_name) &&
|
||||
!string_is_equal(core_name, file_path_str(FILE_PATH_DETECT)))
|
||||
!string_is_equal(core_name, "DETECT"))
|
||||
{
|
||||
tmp[0] = '\0';
|
||||
|
||||
@ -3172,9 +3169,7 @@ static unsigned menu_displaylist_parse_content_information(
|
||||
settings->paths.path_content_database,
|
||||
db_name,
|
||||
sizeof(db_path));
|
||||
strlcat(db_path,
|
||||
file_path_str(FILE_PATH_RDB_EXTENSION),
|
||||
sizeof(db_path));
|
||||
strlcat(db_path, ".rdb", sizeof(db_path));
|
||||
|
||||
if (path_is_valid(db_path))
|
||||
if (menu_entries_append_enum(info->list,
|
||||
@ -3225,8 +3220,7 @@ static bool menu_displaylist_push_internal(
|
||||
if (!string_is_empty(info->label))
|
||||
free(info->label);
|
||||
|
||||
info->exts = strdup(
|
||||
file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT));
|
||||
info->exts = strdup("lpl");
|
||||
info->label = strdup(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB));
|
||||
|
||||
@ -3244,8 +3238,7 @@ static bool menu_displaylist_push_internal(
|
||||
if (!string_is_empty(info->label))
|
||||
free(info->label);
|
||||
|
||||
info->exts = strdup(
|
||||
file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT));
|
||||
info->exts = strdup("lpl");
|
||||
info->label = strdup(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB));
|
||||
|
||||
@ -3263,8 +3256,7 @@ static bool menu_displaylist_push_internal(
|
||||
if (!string_is_empty(info->label))
|
||||
free(info->label);
|
||||
|
||||
info->exts = strdup(
|
||||
file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT));
|
||||
info->exts = strdup("lpl");
|
||||
info->label = strdup(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB));
|
||||
|
||||
@ -3295,8 +3287,7 @@ static bool menu_displaylist_push_internal(
|
||||
if (!string_is_empty(info->label))
|
||||
free(info->label);
|
||||
|
||||
info->exts = strdup(
|
||||
file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT));
|
||||
info->exts = strdup("lpl");
|
||||
info->label = strdup(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB));
|
||||
|
||||
@ -4071,7 +4062,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
count++;
|
||||
|
||||
if (string_is_empty(current_core_name) ||
|
||||
string_is_equal(current_core_name, file_path_str(FILE_PATH_DETECT)))
|
||||
string_is_equal(current_core_name, "DETECT"))
|
||||
menu_entries_set_checked(list, 0, true);
|
||||
|
||||
/* Loop through cores */
|
||||
@ -8649,8 +8640,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
if (info->path)
|
||||
free(info->path);
|
||||
info->type_default = FILE_TYPE_RDB;
|
||||
info->exts = strdup(
|
||||
file_path_str(FILE_PATH_RDB_EXTENSION));
|
||||
info->exts = strdup(".rdb");
|
||||
info->enum_idx = MENU_ENUM_LABEL_PLAYLISTS_TAB;
|
||||
load_content = false;
|
||||
use_filebrowser = true;
|
||||
|
@ -252,9 +252,9 @@ static bool menu_shader_manager_save_preset_internal(
|
||||
strlcpy(fullname, basename, sizeof(fullname));
|
||||
|
||||
/* Append extension automatically as appropriate. */
|
||||
if ( !strstr(basename, file_path_str(FILE_PATH_CGP_EXTENSION))
|
||||
&& !strstr(basename, file_path_str(FILE_PATH_GLSLP_EXTENSION))
|
||||
&& !strstr(basename, file_path_str(FILE_PATH_SLANGP_EXTENSION)))
|
||||
if ( !strstr(basename, ".cgp")
|
||||
&& !strstr(basename, ".glslp")
|
||||
&& !strstr(basename, ".slangp"))
|
||||
{
|
||||
const char *preset_ext = video_shader_get_preset_extension(type);
|
||||
strlcat(fullname, preset_ext, sizeof(fullname));
|
||||
@ -262,9 +262,18 @@ static bool menu_shader_manager_save_preset_internal(
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *preset_ext = video_shader_get_preset_extension(type);
|
||||
strlcpy(fullname, "retroarch", sizeof(fullname));
|
||||
strlcat(fullname, preset_ext, sizeof(fullname));
|
||||
fullname[0] = 'r';
|
||||
fullname[1] = 'e';
|
||||
fullname[2] = 't';
|
||||
fullname[3] = 'r';
|
||||
fullname[4] = 'o';
|
||||
fullname[5] = 'a';
|
||||
fullname[6] = 'r';
|
||||
fullname[7] = 'c';
|
||||
fullname[8] = 'h';
|
||||
fullname[9] = '\0';
|
||||
strlcat(fullname,
|
||||
video_shader_get_preset_extension(type), sizeof(fullname));
|
||||
}
|
||||
|
||||
if (path_is_absolute(fullname))
|
||||
|
@ -219,8 +219,7 @@ static void fill_content_img(menu_thumbnail_path_data_t *path_data)
|
||||
*scrub_char_pointer = '_';
|
||||
|
||||
/* Add PNG extension */
|
||||
strlcat(path_data->content_img,
|
||||
file_path_str(FILE_PATH_PNG_EXTENSION), sizeof(path_data->content_img));
|
||||
strlcat(path_data->content_img, ".png", sizeof(path_data->content_img));
|
||||
}
|
||||
|
||||
/* Sets current 'system' (default database name).
|
||||
|
24
paths.c
24
paths.c
@ -181,7 +181,7 @@ void path_set_redirect(void)
|
||||
fill_pathname_dir(global->name.savefile,
|
||||
!string_is_empty(path_main_basename) ? path_main_basename :
|
||||
system && !string_is_empty(system->library_name) ? system->library_name : "",
|
||||
file_path_str(FILE_PATH_SRM_EXTENSION),
|
||||
".srm",
|
||||
sizeof(global->name.savefile));
|
||||
RARCH_LOG("%s \"%s\".\n",
|
||||
msg_hash_to_str(MSG_REDIRECTING_SAVEFILE_TO),
|
||||
@ -193,7 +193,7 @@ void path_set_redirect(void)
|
||||
fill_pathname_dir(global->name.savestate,
|
||||
!string_is_empty(path_main_basename) ? path_main_basename :
|
||||
system && !string_is_empty(system->library_name) ? system->library_name : "",
|
||||
file_path_str(FILE_PATH_STATE_EXTENSION),
|
||||
".state",
|
||||
sizeof(global->name.savestate));
|
||||
RARCH_LOG("%s \"%s\".\n",
|
||||
msg_hash_to_str(MSG_REDIRECTING_SAVESTATE_TO),
|
||||
@ -205,7 +205,7 @@ void path_set_redirect(void)
|
||||
/* FIXME: Should this optionally use system->library_name like the others? */
|
||||
fill_pathname_dir(global->name.cheatfile,
|
||||
!string_is_empty(path_main_basename) ? path_main_basename : "",
|
||||
file_path_str(FILE_PATH_STATE_EXTENSION),
|
||||
".state",
|
||||
sizeof(global->name.cheatfile));
|
||||
RARCH_LOG("%s \"%s\".\n",
|
||||
msg_hash_to_str(MSG_REDIRECTING_CHEATFILE_TO),
|
||||
@ -297,7 +297,7 @@ void path_set_special(char **argv, unsigned num_content)
|
||||
{
|
||||
fill_pathname_dir(global->name.savestate,
|
||||
str,
|
||||
file_path_str(FILE_PATH_STATE_EXTENSION),
|
||||
".state",
|
||||
sizeof(global->name.savestate));
|
||||
RARCH_LOG("%s \"%s\".\n",
|
||||
msg_hash_to_str(MSG_REDIRECTING_SAVESTATE_TO),
|
||||
@ -382,14 +382,14 @@ static bool path_init_subsystem(void)
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL))
|
||||
fill_pathname_noext(global->name.savefile,
|
||||
path_main_basename,
|
||||
file_path_str(FILE_PATH_SRM_EXTENSION),
|
||||
".srm",
|
||||
sizeof(global->name.savefile));
|
||||
|
||||
if (path_is_directory(global->name.savefile))
|
||||
{
|
||||
fill_pathname_dir(global->name.savefile,
|
||||
path_main_basename,
|
||||
file_path_str(FILE_PATH_SRM_EXTENSION),
|
||||
".srm",
|
||||
sizeof(global->name.savefile));
|
||||
RARCH_LOG("%s \"%s\".\n",
|
||||
msg_hash_to_str(MSG_REDIRECTING_SAVEFILE_TO),
|
||||
@ -449,17 +449,17 @@ void path_fill_names(void)
|
||||
{
|
||||
if (string_is_empty(global->name.ups))
|
||||
fill_pathname_noext(global->name.ups, path_main_basename,
|
||||
file_path_str(FILE_PATH_UPS_EXTENSION),
|
||||
".ups",
|
||||
sizeof(global->name.ups));
|
||||
|
||||
if (string_is_empty(global->name.bps))
|
||||
fill_pathname_noext(global->name.bps, path_main_basename,
|
||||
file_path_str(FILE_PATH_BPS_EXTENSION),
|
||||
".bps",
|
||||
sizeof(global->name.bps));
|
||||
|
||||
if (string_is_empty(global->name.ips))
|
||||
fill_pathname_noext(global->name.ips, path_main_basename,
|
||||
file_path_str(FILE_PATH_IPS_EXTENSION),
|
||||
".ips",
|
||||
sizeof(global->name.ips));
|
||||
}
|
||||
}
|
||||
@ -570,14 +570,14 @@ static void path_set_names(const char *path)
|
||||
{
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL))
|
||||
fill_pathname_noext(global->name.savefile, path_main_basename,
|
||||
file_path_str(FILE_PATH_SRM_EXTENSION), sizeof(global->name.savefile));
|
||||
".srm", sizeof(global->name.savefile));
|
||||
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL))
|
||||
fill_pathname_noext(global->name.savestate, path_main_basename,
|
||||
file_path_str(FILE_PATH_STATE_EXTENSION), sizeof(global->name.savestate));
|
||||
".state", sizeof(global->name.savestate));
|
||||
|
||||
fill_pathname_noext(global->name.cheatfile, path_main_basename,
|
||||
file_path_str(FILE_PATH_CHT_EXTENSION), sizeof(global->name.cheatfile));
|
||||
".cht", sizeof(global->name.cheatfile));
|
||||
}
|
||||
|
||||
path_set_redirect();
|
||||
|
@ -199,7 +199,7 @@ static bool playlist_core_path_equal(const char *real_core_path, const char *ent
|
||||
|
||||
/* Get entry 'real' core path */
|
||||
strlcpy(entry_real_core_path, entry_core_path, sizeof(entry_real_core_path));
|
||||
if (!string_is_equal(entry_real_core_path, file_path_str(FILE_PATH_DETECT)))
|
||||
if (!string_is_equal(entry_real_core_path, "DETECT"))
|
||||
path_resolve_realpath(entry_real_core_path, sizeof(entry_real_core_path), true);
|
||||
|
||||
if (string_is_empty(entry_real_core_path))
|
||||
@ -586,7 +586,7 @@ bool playlist_push_runtime(playlist_t *playlist,
|
||||
|
||||
/* Get 'real' core path */
|
||||
strlcpy(real_core_path, entry->core_path, sizeof(real_core_path));
|
||||
if (!string_is_equal(real_core_path, file_path_str(FILE_PATH_DETECT)))
|
||||
if (!string_is_equal(real_core_path, "DETECT"))
|
||||
path_resolve_realpath(real_core_path, sizeof(real_core_path), true);
|
||||
|
||||
if (string_is_empty(real_core_path))
|
||||
@ -755,7 +755,7 @@ bool playlist_push(playlist_t *playlist,
|
||||
|
||||
/* Get 'real' core path */
|
||||
strlcpy(real_core_path, entry->core_path, sizeof(real_core_path));
|
||||
if (!string_is_equal(real_core_path, file_path_str(FILE_PATH_DETECT)))
|
||||
if (!string_is_equal(real_core_path, "DETECT"))
|
||||
playlist_resolve_path(PLAYLIST_SAVE, real_core_path, sizeof(real_core_path));
|
||||
|
||||
if (string_is_empty(real_core_path))
|
||||
@ -2584,7 +2584,7 @@ void playlist_set_default_core_path(playlist_t *playlist, const char *core_path)
|
||||
|
||||
/* Get 'real' core path */
|
||||
strlcpy(real_core_path, core_path, sizeof(real_core_path));
|
||||
if (!string_is_equal(real_core_path, file_path_str(FILE_PATH_DETECT)))
|
||||
if (!string_is_equal(real_core_path, "DETECT"))
|
||||
playlist_resolve_path(PLAYLIST_SAVE, real_core_path, sizeof(real_core_path));
|
||||
|
||||
if (string_is_empty(real_core_path))
|
||||
|
66
retroarch.c
66
retroarch.c
@ -3790,8 +3790,7 @@ static void command_event_load_auto_state(void)
|
||||
sizeof(*savestate_name_auto));
|
||||
|
||||
fill_pathname_noext(savestate_name_auto, global->name.savestate,
|
||||
file_path_str(FILE_PATH_AUTO_EXTENSION),
|
||||
savestate_name_auto_size);
|
||||
".auto", savestate_name_auto_size);
|
||||
|
||||
if (!path_is_valid(savestate_name_auto))
|
||||
{
|
||||
@ -4137,8 +4136,7 @@ static bool command_event_save_auto_state(void)
|
||||
calloc(PATH_MAX_LENGTH, sizeof(*savestate_name_auto));
|
||||
|
||||
fill_pathname_noext(savestate_name_auto, global->name.savestate,
|
||||
file_path_str(FILE_PATH_AUTO_EXTENSION),
|
||||
savestate_name_auto_size);
|
||||
".auto", savestate_name_auto_size);
|
||||
|
||||
ret = content_save_state((const char*)savestate_name_auto, true, true);
|
||||
RARCH_LOG("%s \"%s\" %s.\n",
|
||||
@ -4258,12 +4256,15 @@ static bool command_event_save_core_config(void)
|
||||
|
||||
if (i)
|
||||
snprintf(tmp, sizeof(tmp), "-%u%s",
|
||||
i,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION));
|
||||
i, ".cfg");
|
||||
else
|
||||
strlcpy(tmp,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
sizeof(tmp));
|
||||
{
|
||||
tmp[0] = '.';
|
||||
tmp[1] = 'c';
|
||||
tmp[2] = 'f';
|
||||
tmp[3] = 'g';
|
||||
tmp[4] = '\0';
|
||||
}
|
||||
|
||||
strlcat(config_path, tmp, config_size);
|
||||
if (!path_is_valid(config_path))
|
||||
@ -4279,9 +4280,7 @@ static bool command_event_save_core_config(void)
|
||||
/* Fallback to system time... */
|
||||
RARCH_WARN("[config] %s\n",
|
||||
msg_hash_to_str(MSG_CANNOT_INFER_NEW_CONFIG_PATH));
|
||||
fill_dated_filename(config_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
config_size);
|
||||
fill_dated_filename(config_name, ".cfg", config_size);
|
||||
fill_pathname_join(config_path, config_dir, config_name,
|
||||
config_size);
|
||||
}
|
||||
@ -10440,6 +10439,7 @@ static void bsv_movie_deinit(void)
|
||||
static bool runloop_check_movie_init(void)
|
||||
{
|
||||
char msg[16384], path[8192];
|
||||
size_t copied;
|
||||
settings_t *settings = configuration_settings;
|
||||
|
||||
msg[0] = path[0] = '\0';
|
||||
@ -10447,15 +10447,17 @@ static bool runloop_check_movie_init(void)
|
||||
configuration_set_uint(settings, settings->uints.rewind_granularity, 1);
|
||||
|
||||
if (settings->ints.state_slot > 0)
|
||||
snprintf(path, sizeof(path), "%s%d",
|
||||
copied = snprintf(path, sizeof(path), "%s%d",
|
||||
bsv_movie_state.movie_path,
|
||||
settings->ints.state_slot);
|
||||
else
|
||||
strlcpy(path, bsv_movie_state.movie_path, sizeof(path));
|
||||
copied = strlcpy(path, bsv_movie_state.movie_path, sizeof(path));
|
||||
|
||||
strlcat(path,
|
||||
file_path_str(FILE_PATH_BSV_EXTENSION),
|
||||
sizeof(path));
|
||||
path[copied ] = '.';
|
||||
path[copied+1] = 'b';
|
||||
path[copied+2] = 's';
|
||||
path[copied+3] = 'v';
|
||||
path[copied+4] = '\0';
|
||||
|
||||
snprintf(msg, sizeof(msg), "%s \"%s\".",
|
||||
msg_hash_to_str(MSG_STARTING_MOVIE_RECORD_TO),
|
||||
@ -14398,7 +14400,7 @@ static void input_config_parse_joy_button(
|
||||
if (config_get_array(conf, key, tmp, sizeof(tmp)))
|
||||
{
|
||||
btn = tmp;
|
||||
if (string_is_equal(btn, file_path_str(FILE_PATH_NUL)))
|
||||
if (string_is_equal(btn, "nul"))
|
||||
bind->joykey = NO_BTN;
|
||||
else
|
||||
{
|
||||
@ -14444,7 +14446,7 @@ static void input_config_parse_joy_axis(
|
||||
|
||||
if (config_get_array(conf, key, tmp, sizeof(tmp)))
|
||||
{
|
||||
if (string_is_equal(tmp, file_path_str(FILE_PATH_NUL)))
|
||||
if (string_is_equal(tmp, "nul"))
|
||||
bind->joyaxis = AXIS_NONE;
|
||||
else if (strlen(tmp) >= 2 && (*tmp == '+' || *tmp == '-'))
|
||||
{
|
||||
@ -14642,7 +14644,7 @@ void input_config_get_bind_string(char *buf, const struct retro_keybind *bind,
|
||||
key[0] = '\0';
|
||||
|
||||
input_keymaps_translate_rk_to_str(bind->key, key, sizeof(key));
|
||||
if (string_is_equal(key, file_path_str(FILE_PATH_NUL)))
|
||||
if (string_is_equal(key, "nul"))
|
||||
*key = '\0';
|
||||
/*empty?*/
|
||||
if (*key != '\0')
|
||||
@ -15024,7 +15026,7 @@ static void save_keybind_joykey(config_file_t *conf,
|
||||
if (bind->joykey == NO_BTN)
|
||||
{
|
||||
if (save_empty)
|
||||
config_set_string(conf, key, file_path_str(FILE_PATH_NUL));
|
||||
config_set_string(conf, key, "nul");
|
||||
}
|
||||
else if (GET_HAT_DIR(bind->joykey))
|
||||
save_keybind_hat(conf, key, bind);
|
||||
@ -15051,7 +15053,7 @@ static void save_keybind_axis(config_file_t *conf,
|
||||
if (bind->joyaxis == AXIS_NONE)
|
||||
{
|
||||
if (save_empty)
|
||||
config_set_string(conf, key, file_path_str(FILE_PATH_NUL));
|
||||
config_set_string(conf, key, "nul");
|
||||
}
|
||||
else if (AXIS_NEG_GET(bind->joyaxis) != AXIS_DIR_NONE)
|
||||
{
|
||||
@ -15118,7 +15120,7 @@ static void save_keybind_mbutton(config_file_t *conf,
|
||||
break;
|
||||
default:
|
||||
if (save_empty)
|
||||
config_set_string(conf, key, file_path_str(FILE_PATH_NUL));
|
||||
config_set_string(conf, key, "nul");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -22374,8 +22376,7 @@ bool retroarch_validate_game_options(char *s, size_t len, bool mkdir)
|
||||
/* Concatenate strings into full paths for game_path */
|
||||
fill_pathname_join_special_ext(s,
|
||||
config_directory, core_name, game_name,
|
||||
file_path_str(FILE_PATH_OPT_EXTENSION),
|
||||
len);
|
||||
".opt", len);
|
||||
|
||||
/* No need to make a directory if file already exists... */
|
||||
if (mkdir && !path_is_valid(s))
|
||||
@ -22414,8 +22415,7 @@ bool retroarch_validate_per_core_options(char *s, size_t len, bool mkdir)
|
||||
/* Concatenate strings into full paths for core options path */
|
||||
fill_pathname_join_special_ext(s,
|
||||
config_directory, core_name, core_name,
|
||||
file_path_str(FILE_PATH_OPT_EXTENSION),
|
||||
len);
|
||||
".opt", len);
|
||||
|
||||
/* No need to make a directory if file already exists... */
|
||||
if (mkdir && !path_is_valid(s))
|
||||
@ -22966,7 +22966,7 @@ static void rarch_init_core_options_path(
|
||||
{
|
||||
fill_pathname_resolve_relative(
|
||||
global_options_path, path_get(RARCH_PATH_CONFIG),
|
||||
file_path_str(FILE_PATH_CORE_OPTIONS_CONFIG), sizeof(global_options_path));
|
||||
"retroarch-core-options.cfg", sizeof(global_options_path));
|
||||
}
|
||||
}
|
||||
|
||||
@ -25652,10 +25652,10 @@ static bool rarch_write_debug_info(void)
|
||||
filestream_printf(file, "Auto-extract downloaded archives: %s\n", settings->bools.network_buildbot_auto_extract_archive ? "yes" : "no");
|
||||
|
||||
{
|
||||
size_t count = 0;
|
||||
size_t count = 0;
|
||||
core_info_list_t *core_info_list = NULL;
|
||||
struct string_list *list = NULL;
|
||||
const char *ext = file_path_str(FILE_PATH_RDB_EXTENSION);
|
||||
struct string_list *list = NULL;
|
||||
const char *ext = ".rdb";
|
||||
|
||||
/* remove dot */
|
||||
if (!string_is_empty(ext) && ext[0] == '.' && strlen(ext) > 1)
|
||||
@ -25990,7 +25990,7 @@ void rarch_log_file_init(void)
|
||||
format[0] = '\0';
|
||||
strftime(format, sizeof(format), "retroarch__%Y_%m_%d__%H_%M_%S", tm_);
|
||||
fill_pathname_noext(timestamped_log_file_name, format,
|
||||
file_path_str(FILE_PATH_EVENT_LOG_EXTENSION),
|
||||
".log",
|
||||
sizeof(timestamped_log_file_name));
|
||||
}
|
||||
|
||||
@ -26046,7 +26046,7 @@ void rarch_log_file_init(void)
|
||||
fill_pathname_join(log_file_path, settings->paths.log_dir,
|
||||
log_to_file_timestamp
|
||||
? timestamped_log_file_name
|
||||
: file_path_str(FILE_PATH_DEFAULT_EVENT_LOG),
|
||||
: ".log",
|
||||
sizeof(log_file_path));
|
||||
}
|
||||
|
||||
|
@ -303,7 +303,7 @@ runtime_log_t *runtime_log_init(const char *content_path,
|
||||
return NULL;
|
||||
|
||||
if ( string_is_equal(core_path, "builtin") ||
|
||||
string_is_equal(core_path, file_path_str(FILE_PATH_DETECT)))
|
||||
string_is_equal(core_path, "DETECT"))
|
||||
return NULL;
|
||||
|
||||
/* Get core name
|
||||
@ -411,7 +411,7 @@ runtime_log_t *runtime_log_init(const char *content_path,
|
||||
|
||||
/* Build final log file path */
|
||||
fill_pathname_join(log_file_path, log_file_dir, content_name, sizeof(log_file_path));
|
||||
strlcat(log_file_path, file_path_str(FILE_PATH_RUNTIME_EXTENSION), sizeof(log_file_path));
|
||||
strlcat(log_file_path, ".lrtl", sizeof(log_file_path));
|
||||
|
||||
if (string_is_empty(log_file_path))
|
||||
return NULL;
|
||||
|
@ -479,33 +479,34 @@ bool task_push_audio_mixer_load_and_play(
|
||||
nbio->type = NBIO_TYPE_NONE;
|
||||
mixer->type = AUDIO_MIXER_TYPE_NONE;
|
||||
|
||||
if (strstr(fullpath, file_path_str(FILE_PATH_WAV_EXTENSION)))
|
||||
if (strstr(fullpath, ".wav"))
|
||||
{
|
||||
mixer->type = AUDIO_MIXER_TYPE_WAV;
|
||||
nbio->type = NBIO_TYPE_WAV;
|
||||
t->callback = task_audio_mixer_handle_upload_wav_and_play;
|
||||
}
|
||||
else if (strstr(fullpath, file_path_str(FILE_PATH_OGG_EXTENSION)))
|
||||
else if (strstr(fullpath, ".ogg"))
|
||||
{
|
||||
mixer->type = AUDIO_MIXER_TYPE_OGG;
|
||||
nbio->type = NBIO_TYPE_OGG;
|
||||
t->callback = task_audio_mixer_handle_upload_ogg_and_play;
|
||||
}
|
||||
else if (strstr(fullpath, file_path_str(FILE_PATH_MP3_EXTENSION)))
|
||||
else if (strstr(fullpath, ".mp3"))
|
||||
{
|
||||
mixer->type = AUDIO_MIXER_TYPE_MP3;
|
||||
nbio->type = NBIO_TYPE_MP3;
|
||||
t->callback = task_audio_mixer_handle_upload_mp3_and_play;
|
||||
}
|
||||
else if (strstr(fullpath, file_path_str(FILE_PATH_FLAC_EXTENSION)))
|
||||
else if (strstr(fullpath, ".flac"))
|
||||
{
|
||||
mixer->type = AUDIO_MIXER_TYPE_FLAC;
|
||||
nbio->type = NBIO_TYPE_FLAC;
|
||||
t->callback = task_audio_mixer_handle_upload_flac_and_play;
|
||||
}
|
||||
else if ( strstr(fullpath, file_path_str(FILE_PATH_MOD_EXTENSION)) ||
|
||||
strstr(fullpath, file_path_str(FILE_PATH_S3M_EXTENSION)) ||
|
||||
strstr(fullpath, file_path_str(FILE_PATH_XM_EXTENSION)))
|
||||
else if (
|
||||
strstr(fullpath, ".mod") ||
|
||||
strstr(fullpath, ".s3m") ||
|
||||
strstr(fullpath, ".xm"))
|
||||
{
|
||||
mixer->type = AUDIO_MIXER_TYPE_MOD;
|
||||
nbio->type = NBIO_TYPE_MOD;
|
||||
@ -588,33 +589,34 @@ bool task_push_audio_mixer_load(
|
||||
nbio->type = NBIO_TYPE_NONE;
|
||||
mixer->type = AUDIO_MIXER_TYPE_NONE;
|
||||
|
||||
if (strstr(fullpath, file_path_str(FILE_PATH_WAV_EXTENSION)))
|
||||
if (strstr(fullpath, ".wav"))
|
||||
{
|
||||
mixer->type = AUDIO_MIXER_TYPE_WAV;
|
||||
nbio->type = NBIO_TYPE_WAV;
|
||||
t->callback = task_audio_mixer_handle_upload_wav;
|
||||
}
|
||||
else if (strstr(fullpath, file_path_str(FILE_PATH_OGG_EXTENSION)))
|
||||
else if (strstr(fullpath, ".ogg"))
|
||||
{
|
||||
mixer->type = AUDIO_MIXER_TYPE_OGG;
|
||||
nbio->type = NBIO_TYPE_OGG;
|
||||
t->callback = task_audio_mixer_handle_upload_ogg;
|
||||
}
|
||||
else if (strstr(fullpath, file_path_str(FILE_PATH_MP3_EXTENSION)))
|
||||
else if (strstr(fullpath, ".mp3"))
|
||||
{
|
||||
mixer->type = AUDIO_MIXER_TYPE_MP3;
|
||||
nbio->type = NBIO_TYPE_MP3;
|
||||
t->callback = task_audio_mixer_handle_upload_mp3;
|
||||
}
|
||||
else if (strstr(fullpath, file_path_str(FILE_PATH_FLAC_EXTENSION)))
|
||||
else if (strstr(fullpath, ".flac"))
|
||||
{
|
||||
mixer->type = AUDIO_MIXER_TYPE_FLAC;
|
||||
nbio->type = NBIO_TYPE_FLAC;
|
||||
t->callback = task_audio_mixer_handle_upload_flac;
|
||||
}
|
||||
else if ( strstr(fullpath, file_path_str(FILE_PATH_MOD_EXTENSION)) ||
|
||||
strstr(fullpath, file_path_str(FILE_PATH_S3M_EXTENSION)) ||
|
||||
strstr(fullpath, file_path_str(FILE_PATH_XM_EXTENSION)))
|
||||
else if (
|
||||
strstr(fullpath, ".mod") ||
|
||||
strstr(fullpath, ".s3m") ||
|
||||
strstr(fullpath, ".xm"))
|
||||
{
|
||||
mixer->type = AUDIO_MIXER_TYPE_MOD;
|
||||
nbio->type = NBIO_TYPE_MOD;
|
||||
|
@ -801,7 +801,7 @@ static int database_info_list_iterate_found_match(
|
||||
db_path, PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
strlcat(db_playlist_base_str,
|
||||
file_path_str(FILE_PATH_LPL_EXTENSION),
|
||||
".lpl",
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
if (!string_is_empty(_db->playlist_directory))
|
||||
@ -857,8 +857,8 @@ static int database_info_list_iterate_found_match(
|
||||
/* the push function reads our entry as const, so these casts are safe */
|
||||
entry.path = entry_path_str;
|
||||
entry.label = db_info_entry->name;
|
||||
entry.core_path = (char*)file_path_str(FILE_PATH_DETECT);
|
||||
entry.core_name = (char*)file_path_str(FILE_PATH_DETECT);
|
||||
entry.core_path = (char*)"DETECT";
|
||||
entry.core_name = (char*)"DETECT";
|
||||
entry.db_name = db_playlist_base_str;
|
||||
entry.crc32 = db_crc;
|
||||
entry.subsystem_ident = NULL;
|
||||
@ -1045,7 +1045,7 @@ static int task_database_iterate_playlist_lutro(
|
||||
if (!string_is_empty(_db->playlist_directory))
|
||||
fill_pathname_join(db_playlist_path,
|
||||
_db->playlist_directory,
|
||||
file_path_str(FILE_PATH_LUTRO_PLAYLIST),
|
||||
"Lutro.lpl",
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
playlist = playlist_init(db_playlist_path, COLLECTION_SIZE);
|
||||
@ -1053,7 +1053,7 @@ static int task_database_iterate_playlist_lutro(
|
||||
free(db_playlist_path);
|
||||
|
||||
if (!playlist_entry_exists(playlist,
|
||||
path, file_path_str(FILE_PATH_DETECT)))
|
||||
path, "DETECT"))
|
||||
{
|
||||
struct playlist_entry entry;
|
||||
char *game_title = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
@ -1066,10 +1066,10 @@ static int task_database_iterate_playlist_lutro(
|
||||
/* the push function reads our entry as const, so these casts are safe */
|
||||
entry.path = (char*)path;
|
||||
entry.label = game_title;
|
||||
entry.core_path = (char*)file_path_str(FILE_PATH_DETECT);
|
||||
entry.core_name = (char*)file_path_str(FILE_PATH_DETECT);
|
||||
entry.db_name = (char*)file_path_str(FILE_PATH_LUTRO_PLAYLIST);
|
||||
entry.crc32 = (char*)file_path_str(FILE_PATH_DETECT);
|
||||
entry.core_path = (char*)"DETECT";
|
||||
entry.core_name = (char*)"DETECT";
|
||||
entry.db_name = (char*)"Lutro.lpl";
|
||||
entry.crc32 = (char*)"DETECT";
|
||||
entry.subsystem_ident = NULL;
|
||||
entry.subsystem_name = NULL;
|
||||
entry.subsystem_roms = NULL;
|
||||
|
@ -76,7 +76,7 @@ static void netplay_crc_scan_callback(retro_task_t *task,
|
||||
&content_info, CORE_TYPE_PLAIN, NULL, NULL);
|
||||
content_clear_subsystem();
|
||||
if (!content_set_subsystem_by_name(state->subsystem_name))
|
||||
RARCH_LOG("[lobby] subsystem not found in implementation\n");
|
||||
RARCH_LOG("[Lobby] Subsystem not found in implementation\n");
|
||||
|
||||
for (i = 0; i < game_list->size; i++)
|
||||
content_add_subsystem(game_list->elems[i].data);
|
||||
@ -93,7 +93,7 @@ static void netplay_crc_scan_callback(retro_task_t *task,
|
||||
{
|
||||
struct retro_system_info *system = runloop_get_libretro_system_info();
|
||||
|
||||
RARCH_LOG("[lobby] loading core %s with content file %s\n",
|
||||
RARCH_LOG("[Lobby] Loading core %s with content file %s\n",
|
||||
state->core_path, state->content_path);
|
||||
|
||||
command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname);
|
||||
@ -121,7 +121,7 @@ static void netplay_crc_scan_callback(retro_task_t *task,
|
||||
content_ctx_info_t content_info = {0};
|
||||
struct retro_system_info *system = runloop_get_libretro_system_info();
|
||||
|
||||
RARCH_LOG("[lobby] loading contentless core %s\n", state->core_path);
|
||||
RARCH_LOG("[Lobby] Loading contentless core %s\n", state->core_path);
|
||||
|
||||
command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname);
|
||||
|
||||
@ -135,14 +135,14 @@ static void netplay_crc_scan_callback(retro_task_t *task,
|
||||
else if (!string_is_empty(state->core_path) && !string_is_empty(state->content_path)
|
||||
&& state->current)
|
||||
{
|
||||
RARCH_LOG("[lobby] loading core %s with current content\n", state->core_path);
|
||||
RARCH_LOG("[Lobby] Loading core %s with current content\n", state->core_path);
|
||||
command_event(CMD_EVENT_NETPLAY_INIT_DIRECT, state->hostname);
|
||||
command_event(CMD_EVENT_RESUME, NULL);
|
||||
}
|
||||
/* no match found */
|
||||
else
|
||||
{
|
||||
RARCH_LOG("[lobby] couldn't find a suitable %s\n",
|
||||
RARCH_LOG("[Lobby] Couldn't find a suitable %s\n",
|
||||
string_is_empty(state->content_path) ? "content file" : "core");
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_LOAD_CONTENT_MANUALLY),
|
||||
@ -238,14 +238,14 @@ static void task_netplay_crc_scan_handler(retro_task_t *task)
|
||||
{
|
||||
char current[PATH_MAX_LENGTH];
|
||||
|
||||
RARCH_LOG("[lobby] testing CRC matching for: %s\n", state->content_crc);
|
||||
RARCH_LOG("[Lobby] Testing CRC matching for: %s\n", state->content_crc);
|
||||
|
||||
snprintf(current, sizeof(current), "%X|crc", content_get_crc());
|
||||
RARCH_LOG("[lobby] current content crc: %s\n", current);
|
||||
RARCH_LOG("[Lobby] Current content crc: %s\n", current);
|
||||
|
||||
if (string_is_equal(current, state->content_crc))
|
||||
{
|
||||
RARCH_LOG("[lobby] CRC match %s with currently loaded content\n", current);
|
||||
RARCH_LOG("[Lobby] CRC match %s with currently loaded content\n", current);
|
||||
strlcpy(state->content_path, "N/A", sizeof(state->content_path));
|
||||
state->found = true;
|
||||
state->current = true;
|
||||
@ -266,10 +266,10 @@ static void task_netplay_crc_scan_handler(retro_task_t *task)
|
||||
const char *lpl_path = state->lpl_list->elems[i].data;
|
||||
|
||||
/* skip files without .lpl file extension */
|
||||
if (!strstr(lpl_path, file_path_str(FILE_PATH_LPL_EXTENSION)))
|
||||
if (!strstr(lpl_path, ".lpl"))
|
||||
continue;
|
||||
|
||||
RARCH_LOG("[lobby] searching playlist: %s\n", lpl_path);
|
||||
RARCH_LOG("[Lobby] Searching playlist: %s\n", lpl_path);
|
||||
playlist = playlist_init(lpl_path, COLLECTION_SIZE);
|
||||
playlist_size = playlist_get_size(playlist);
|
||||
|
||||
@ -286,7 +286,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task)
|
||||
|
||||
if (have_crc && string_is_equal(playlist_crc32, state->content_crc))
|
||||
{
|
||||
RARCH_LOG("[lobby] CRC match %s\n", playlist_crc32);
|
||||
RARCH_LOG("[Lobby] CRC match %s\n", playlist_crc32);
|
||||
strlcpy(state->content_path, playlist_path, sizeof(state->content_path));
|
||||
state->found = true;
|
||||
task_set_data(task, state);
|
||||
@ -307,7 +307,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task)
|
||||
string_is_equal(entry, state->content_path) &&
|
||||
strstr(state->core_extensions, path_get_extension(playlist_path)))
|
||||
{
|
||||
RARCH_LOG("[lobby] filename match %s\n", playlist_path);
|
||||
RARCH_LOG("[Lobby] Filename match %s\n", playlist_path);
|
||||
|
||||
strlcpy(state->content_path, playlist_path, sizeof(state->content_path));
|
||||
state->found = true;
|
||||
@ -340,10 +340,10 @@ static void task_netplay_crc_scan_handler(retro_task_t *task)
|
||||
const char *lpl_path = state->lpl_list->elems[j].data;
|
||||
|
||||
/* skip files without .lpl file extension */
|
||||
if (!strstr(lpl_path, file_path_str(FILE_PATH_LPL_EXTENSION)))
|
||||
if (!strstr(lpl_path, ".lpl"))
|
||||
continue;
|
||||
|
||||
RARCH_LOG("[lobby] searching rom %d/%d (%s) in playlist: %s\n", i + 1, game_list->size, game_list->elems[i].data, lpl_path);
|
||||
RARCH_LOG("[Lobby] Searching content %d/%d (%s) in playlist: %s\n", i + 1, game_list->size, game_list->elems[i].data, lpl_path);
|
||||
playlist = playlist_init(lpl_path, COLLECTION_SIZE);
|
||||
playlist_size = playlist_get_size(playlist);
|
||||
|
||||
@ -359,7 +359,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task)
|
||||
strstr(game_list->elems[i].data, entry) &&
|
||||
strstr(state->core_extensions, path_get_extension(playlist_entry->path)))
|
||||
{
|
||||
RARCH_LOG("[lobby] filename match %s\n", playlist_entry->path);
|
||||
RARCH_LOG("[Lobby] filename match %s\n", playlist_entry->path);
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
@ -394,7 +394,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task)
|
||||
|
||||
if (state->found)
|
||||
{
|
||||
RARCH_LOG("[lobby] subsystem matching set found %s\n", state->content_path);
|
||||
RARCH_LOG("[Lobby] Subsystem matching set found %s\n", state->content_path);
|
||||
task_set_data(task, state);
|
||||
finish_task(task, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_COMPAT_CONTENT_FOUND));
|
||||
}
|
||||
|
@ -153,7 +153,13 @@ static void task_pl_manager_reset_cores_handler(retro_task_t *task)
|
||||
task_set_progress(task, (pl_manager->list_index * 100) / pl_manager->list_size);
|
||||
|
||||
/* Reset core association */
|
||||
strlcpy(detect_string, file_path_str(FILE_PATH_DETECT), sizeof(detect_string));
|
||||
detect_string[0] = 'D';
|
||||
detect_string[1] = 'E';
|
||||
detect_string[2] = 'T';
|
||||
detect_string[3] = 'E';
|
||||
detect_string[4] = 'C';
|
||||
detect_string[5] = 'T';
|
||||
detect_string[6] = '\0';
|
||||
|
||||
update_entry.core_path = detect_string;
|
||||
update_entry.core_name = detect_string;
|
||||
|
@ -1596,8 +1596,7 @@ void path_init_savefile_rtc(const char *savefile_path)
|
||||
/* Infer .rtc save path from save ram path. */
|
||||
attr.i = RETRO_MEMORY_RTC;
|
||||
fill_pathname(savefile_name_rtc,
|
||||
savefile_path,
|
||||
file_path_str(FILE_PATH_RTC_EXTENSION),
|
||||
savefile_path, ".rtc",
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
string_list_append(task_save_files, savefile_name_rtc, attr);
|
||||
free(savefile_name_rtc);
|
||||
|
@ -222,7 +222,7 @@ void MainWindow::onFileDropWidgetContextMenuRequested(const QPoint &pos)
|
||||
}
|
||||
|
||||
if (selectedDatabase.isEmpty())
|
||||
selectedDatabase = QFileInfo(currentPlaylistPath).fileName().remove(file_path_str(FILE_PATH_LPL_EXTENSION));
|
||||
selectedDatabase = QFileInfo(currentPlaylistPath).fileName().remove(".lpl");
|
||||
|
||||
contentHash["label"] = selectedName;
|
||||
contentHash["path"] = selectedPath;
|
||||
|
@ -122,7 +122,7 @@ void PlaylistEntryDialog::loadPlaylistOptions()
|
||||
m_databaseComboBox->clear();
|
||||
|
||||
m_coreComboBox->addItem(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_CORE_SELECTION_ASK));
|
||||
m_databaseComboBox->addItem(QString("<") + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE) + ">", QFileInfo(m_mainwindow->getCurrentPlaylistPath()).fileName().remove(file_path_str(FILE_PATH_LPL_EXTENSION)));
|
||||
m_databaseComboBox->addItem(QString("<") + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE) + ">", QFileInfo(m_mainwindow->getCurrentPlaylistPath()).fileName().remove(".lpl"));
|
||||
|
||||
core_info_get_list(&core_info_list);
|
||||
|
||||
|
@ -426,7 +426,7 @@ void MainWindow::addFilesToPlaylist(QStringList files)
|
||||
if (selectedDatabase.isEmpty())
|
||||
selectedDatabase = QFileInfo(currentPlaylistPath).fileName();
|
||||
else
|
||||
selectedDatabase += file_path_str(FILE_PATH_LPL_EXTENSION);
|
||||
selectedDatabase += ".lpl";
|
||||
|
||||
dialog.reset(new QProgressDialog(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_GATHERING_LIST_OF_FILES), "Cancel", 0, 0, this));
|
||||
dialog->setWindowModality(Qt::ApplicationModal);
|
||||
@ -678,7 +678,7 @@ bool MainWindow::updateCurrentPlaylistEntry(const QHash<QString, QString> &conte
|
||||
|
||||
if (!dbName.isEmpty())
|
||||
{
|
||||
dbNameArray = (dbName + file_path_str(FILE_PATH_LPL_EXTENSION)).toUtf8();
|
||||
dbNameArray = (dbName + ".lpl").toUtf8();
|
||||
dbNameData = dbNameArray.constData();
|
||||
}
|
||||
|
||||
@ -943,8 +943,8 @@ void MainWindow::onPlaylistWidgetContextMenuRequested(const QPoint&)
|
||||
}
|
||||
else
|
||||
{
|
||||
playlist_set_default_core_path(playlist, file_path_str(FILE_PATH_DETECT));
|
||||
playlist_set_default_core_name(playlist, file_path_str(FILE_PATH_DETECT));
|
||||
playlist_set_default_core_path(playlist, "DETECT");
|
||||
playlist_set_default_core_name(playlist, "DETECT");
|
||||
}
|
||||
|
||||
/* Write changes to disk */
|
||||
@ -985,7 +985,7 @@ void MainWindow::onPlaylistWidgetContextMenuRequested(const QPoint&)
|
||||
else if (selectedAction == newPlaylistAction.data())
|
||||
{
|
||||
QString name = QInputDialog::getText(this, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_NEW_PLAYLIST), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_ENTER_NEW_PLAYLIST_NAME));
|
||||
QString newPlaylistPath = playlistDirAbsPath + "/" + name + file_path_str(FILE_PATH_LPL_EXTENSION);
|
||||
QString newPlaylistPath = playlistDirAbsPath + "/" + name + ".lpl";
|
||||
QFile file(newPlaylistPath);
|
||||
|
||||
if (!name.isEmpty())
|
||||
@ -1141,7 +1141,7 @@ void MainWindow::reloadPlaylists()
|
||||
QIcon icon;
|
||||
QString iconPath;
|
||||
|
||||
fileDisplayName.remove(file_path_str(FILE_PATH_LPL_EXTENSION));
|
||||
fileDisplayName.remove(".lpl");
|
||||
|
||||
iconPath = QString(settings->paths.directory_assets) + ICON_PATH + fileDisplayName + ".png";
|
||||
|
||||
@ -1334,7 +1334,7 @@ QString MainWindow::getPlaylistDefaultCore(QString dbName)
|
||||
playlistPath,
|
||||
settings->paths.directory_playlist, dbNameCString,
|
||||
sizeof(playlistPath));
|
||||
strlcat(playlistPath, file_path_str(FILE_PATH_LPL_EXTENSION), sizeof(playlistPath));
|
||||
strlcat(playlistPath, ".lpl", sizeof(playlistPath));
|
||||
|
||||
/* Load playlist, if required */
|
||||
if (cachedPlaylist)
|
||||
@ -1355,7 +1355,7 @@ QString MainWindow::getPlaylistDefaultCore(QString dbName)
|
||||
|
||||
/* Get default core path */
|
||||
if (!string_is_empty(defaultCorePath) &&
|
||||
!string_is_equal(defaultCorePath, file_path_str(FILE_PATH_DETECT)))
|
||||
!string_is_equal(defaultCorePath, "DETECT"))
|
||||
corePath = QString::fromUtf8(defaultCorePath);
|
||||
|
||||
/* Free playlist, if required */
|
||||
@ -1425,7 +1425,7 @@ void PlaylistModel::getPlaylistItems(QString path)
|
||||
if (!string_is_empty(entry->db_name))
|
||||
{
|
||||
hash["db_name"] = entry->db_name;
|
||||
hash["db_name"].remove(file_path_str(FILE_PATH_LPL_EXTENSION));
|
||||
hash["db_name"].remove(".lpl");
|
||||
}
|
||||
|
||||
m_contents.append(hash);
|
||||
|
@ -500,13 +500,13 @@ void ShaderParamsDialog::onShaderLoadPresetClicked()
|
||||
|
||||
/* NOTE: Maybe we should have a way to get a list of all shader types instead of hard-coding this? */
|
||||
if (video_shader_is_supported(RARCH_SHADER_CG))
|
||||
filter += QLatin1Literal(" *") + file_path_str(FILE_PATH_CGP_EXTENSION);
|
||||
filter += QLatin1Literal(" *") + ".cgp";
|
||||
|
||||
if (video_shader_is_supported(RARCH_SHADER_GLSL))
|
||||
filter += QLatin1Literal(" *") + file_path_str(FILE_PATH_GLSLP_EXTENSION);
|
||||
filter += QLatin1Literal(" *") + ".glslp";
|
||||
|
||||
if (video_shader_is_supported(RARCH_SHADER_SLANG))
|
||||
filter += QLatin1Literal(" *") + file_path_str(FILE_PATH_SLANGP_EXTENSION);
|
||||
filter += QLatin1Literal(" *") + ".slangp";
|
||||
|
||||
filter += ")";
|
||||
|
||||
|
@ -2045,7 +2045,7 @@ void MainWindow::setCoreActions()
|
||||
coreName = "<n/a>";
|
||||
else
|
||||
{
|
||||
const char *detect_str = file_path_str(FILE_PATH_DETECT);
|
||||
const char *detect_str = "DETECT";
|
||||
|
||||
if (coreName != detect_str)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user