Create FILE_PATH_STR extensions

This commit is contained in:
twinaphex 2016-06-28 01:10:58 +02:00
parent 35605f43fa
commit 64c85771b2
3 changed files with 17 additions and 3 deletions

View File

@ -45,6 +45,9 @@ enum file_path_enum
FILE_PATH_INDEX_URL,
FILE_PATH_INDEX_EXTENDED_URL,
FILE_PATH_SRM_EXTENSION,
FILE_PATH_UPS_EXTENSION,
FILE_PATH_IPS_EXTENSION,
FILE_PATH_BPS_EXTENSION,
FILE_PATH_STATE_EXTENSION,
FILE_PATH_RTC_EXTENSION,
FILE_PATH_CHT_EXTENSION,

View File

@ -39,6 +39,12 @@ const char *file_path_str(enum file_path_enum enum_idx)
return ".state";
case FILE_PATH_LPL_EXTENSION:
return ".lpl";
case FILE_PATH_UPS_EXTENSION:
return ".ups";
case FILE_PATH_IPS_EXTENSION:
return ".ips";
case FILE_PATH_BPS_EXTENSION:
return ".bps";
case FILE_PATH_INDEX_URL:
return ".index";
case FILE_PATH_INDEX_DIRS_URL:

View File

@ -1541,9 +1541,11 @@ void retroarch_set_pathnames(const char *path)
if (!global->has_set.save_path)
fill_pathname_noext(global->name.savefile, global->name.base,
file_path_str(FILE_PATH_SRM_EXTENSION), sizeof(global->name.savefile));
if (!global->has_set.state_path)
fill_pathname_noext(global->name.savestate, global->name.base,
file_path_str(FILE_PATH_STATE_EXTENSION), sizeof(global->name.savestate));
fill_pathname_noext(global->name.cheatfile, global->name.base,
file_path_str(FILE_PATH_CHT_EXTENSION), sizeof(global->name.cheatfile));
@ -1561,15 +1563,18 @@ void retroarch_fill_pathnames(void)
return;
if (string_is_empty(global->name.ups))
fill_pathname_noext(global->name.ups, global->name.base, ".ups",
fill_pathname_noext(global->name.ups, global->name.base,
file_path_str(FILE_PATH_UPS_EXTENSION),
sizeof(global->name.ups));
if (string_is_empty(global->name.bps))
fill_pathname_noext(global->name.bps, global->name.base, ".bps",
fill_pathname_noext(global->name.bps, global->name.base,
file_path_str(FILE_PATH_BPS_EXTENSION),
sizeof(global->name.bps));
if (string_is_empty(global->name.ips))
fill_pathname_noext(global->name.ips, global->name.base, ".ips",
fill_pathname_noext(global->name.ips, global->name.base,
file_path_str(FILE_PATH_IPS_EXTENSION),
sizeof(global->name.ips));
}