mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Set save redirect paths before set_environment (#15820)
This commit is contained in:
parent
7df3ca3064
commit
06d5cd39fc
16
runloop.c
16
runloop.c
@ -1996,8 +1996,9 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
||||
break;
|
||||
|
||||
case RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY:
|
||||
RARCH_LOG("[Environ]: GET_SAVE_DIRECTORY.\n");
|
||||
*(const char**)data = runloop_st->savefile_dir;
|
||||
RARCH_LOG("[Environ]: SAVE_DIRECTORY: \"%s\".\n",
|
||||
runloop_st->savefile_dir);
|
||||
break;
|
||||
|
||||
case RETRO_ENVIRONMENT_GET_USERNAME:
|
||||
@ -4631,7 +4632,7 @@ bool runloop_event_init_core(
|
||||
type, &runloop_st->current_core, NULL, NULL))
|
||||
return false;
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
/* remember last core type created, so creating a
|
||||
/* Remember last core type created, so creating a
|
||||
* secondary core will know what core type to use. */
|
||||
runloop_st->last_core_type = type;
|
||||
#endif
|
||||
@ -4690,7 +4691,7 @@ bool runloop_event_init_core(
|
||||
settings, &runloop_st->fastmotion_override.current);
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* assume the core supports achievements unless it tells us otherwise */
|
||||
/* Assume the core supports achievements unless it tells us otherwise */
|
||||
rcheevos_set_support_cheevos(true);
|
||||
#endif
|
||||
|
||||
@ -4701,9 +4702,13 @@ bool runloop_event_init_core(
|
||||
runloop_st->shader_delay_timer.timer_end = false; /* not expired */
|
||||
#endif
|
||||
|
||||
/* reset video format to libretro's default */
|
||||
/* Reset video format to libretro's default */
|
||||
video_st->pix_fmt = RETRO_PIXEL_FORMAT_0RGB1555;
|
||||
|
||||
/* Set save redirection paths */
|
||||
runloop_path_set_redirect(settings, old_savefile_dir, old_savestate_dir);
|
||||
|
||||
/* Set core environment */
|
||||
runloop_st->current_core.retro_set_environment(runloop_environment_cb);
|
||||
|
||||
/* Load any input remap files
|
||||
@ -4720,9 +4725,6 @@ bool runloop_event_init_core(
|
||||
config_load_remap(dir_input_remapping, &runloop_st->system);
|
||||
#endif
|
||||
|
||||
/* Per-core saves: reset redirection paths */
|
||||
runloop_path_set_redirect(settings, old_savefile_dir, old_savestate_dir);
|
||||
|
||||
video_st->frame_cache_data = NULL;
|
||||
|
||||
runloop_st->current_core.retro_init();
|
||||
|
Loading…
x
Reference in New Issue
Block a user