mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
Create retroarch_fill_pathnames
This commit is contained in:
parent
95a6428915
commit
030513bcee
@ -871,7 +871,7 @@ static bool command_event_disk_control_append_image(const char *path)
|
|||||||
* started out in a single disk case, and that this way
|
* started out in a single disk case, and that this way
|
||||||
* of doing it makes the most sense. */
|
* of doing it makes the most sense. */
|
||||||
rarch_ctl(RARCH_CTL_SET_PATHS, (void*)path);
|
rarch_ctl(RARCH_CTL_SET_PATHS, (void*)path);
|
||||||
rarch_ctl(RARCH_CTL_FILL_PATHNAMES, NULL);
|
retroarch_fill_pathnames();
|
||||||
}
|
}
|
||||||
|
|
||||||
command_event(CMD_EVENT_AUTOSAVE_INIT, NULL);
|
command_event(CMD_EVENT_AUTOSAVE_INIT, NULL);
|
||||||
@ -1205,7 +1205,7 @@ static bool event_init_content(void)
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (!content_does_not_need_content())
|
if (!content_does_not_need_content())
|
||||||
rarch_ctl(RARCH_CTL_FILL_PATHNAMES, NULL);
|
retroarch_fill_pathnames();
|
||||||
|
|
||||||
if (!content_init())
|
if (!content_init())
|
||||||
return false;
|
return false;
|
||||||
|
38
retroarch.c
38
retroarch.c
@ -1548,23 +1548,6 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RARCH_CTL_FILL_PATHNAMES:
|
|
||||||
retroarch_init_savefile_paths();
|
|
||||||
bsv_movie_set_path(global->name.savefile);
|
|
||||||
|
|
||||||
if (!*global->name.base)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (!*global->name.ups)
|
|
||||||
fill_pathname_noext(global->name.ups, global->name.base, ".ups",
|
|
||||||
sizeof(global->name.ups));
|
|
||||||
if (!*global->name.bps)
|
|
||||||
fill_pathname_noext(global->name.bps, global->name.base, ".bps",
|
|
||||||
sizeof(global->name.bps));
|
|
||||||
if (!*global->name.ips)
|
|
||||||
fill_pathname_noext(global->name.ips, global->name.base, ".ips",
|
|
||||||
sizeof(global->name.ips));
|
|
||||||
break;
|
|
||||||
case RARCH_CTL_NONE:
|
case RARCH_CTL_NONE:
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
@ -1573,6 +1556,27 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void retroarch_fill_pathnames(void)
|
||||||
|
{
|
||||||
|
global_t *global = global_get_ptr();
|
||||||
|
|
||||||
|
retroarch_init_savefile_paths();
|
||||||
|
bsv_movie_set_path(global->name.savefile);
|
||||||
|
|
||||||
|
if (!*global->name.base)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!*global->name.ups)
|
||||||
|
fill_pathname_noext(global->name.ups, global->name.base, ".ups",
|
||||||
|
sizeof(global->name.ups));
|
||||||
|
if (!*global->name.bps)
|
||||||
|
fill_pathname_noext(global->name.bps, global->name.base, ".bps",
|
||||||
|
sizeof(global->name.bps));
|
||||||
|
if (!*global->name.ips)
|
||||||
|
fill_pathname_noext(global->name.ips, global->name.base, ".ips",
|
||||||
|
sizeof(global->name.ips));
|
||||||
|
}
|
||||||
|
|
||||||
int retroarch_get_capabilities(enum rarch_capabilities type,
|
int retroarch_get_capabilities(enum rarch_capabilities type,
|
||||||
char *s, size_t len)
|
char *s, size_t len)
|
||||||
{
|
{
|
||||||
|
@ -97,8 +97,6 @@ enum rarch_ctl_state
|
|||||||
* but this will do for now. */
|
* but this will do for now. */
|
||||||
RARCH_CTL_VALIDATE_CPU_FEATURES,
|
RARCH_CTL_VALIDATE_CPU_FEATURES,
|
||||||
|
|
||||||
RARCH_CTL_FILL_PATHNAMES,
|
|
||||||
|
|
||||||
RARCH_CTL_SET_PATHS_REDIRECT,
|
RARCH_CTL_SET_PATHS_REDIRECT,
|
||||||
|
|
||||||
RARCH_CTL_SET_SRAM_ENABLE,
|
RARCH_CTL_SET_SRAM_ENABLE,
|
||||||
@ -171,6 +169,8 @@ const char *retroarch_get_current_savefile_dir(void);
|
|||||||
|
|
||||||
bool retroarch_validate_game_options(char *s, size_t len, bool mkdir);
|
bool retroarch_validate_game_options(char *s, size_t len, bool mkdir);
|
||||||
|
|
||||||
|
void retroarch_fill_pathnames(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* retroarch_fail:
|
* retroarch_fail:
|
||||||
* @error_code : Error code.
|
* @error_code : Error code.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user