mirror of
https://github.com/libretro/RetroArch
synced 2024-12-28 09:29:16 +00:00
Create dir_clear
This commit is contained in:
parent
72fff59efd
commit
bdf379d568
@ -1143,9 +1143,9 @@ static void config_set_defaults(void)
|
||||
/* Make sure settings from other configs carry over into defaults
|
||||
* for another config. */
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL))
|
||||
dir_clear_savefile();
|
||||
dir_clear(RARCH_DIR_SAVEFILE);
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL))
|
||||
dir_clear_savestate();
|
||||
dir_clear(RARCH_DIR_SAVESTATE);
|
||||
|
||||
*settings->path.libretro_info = '\0';
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_LIBRETRO_DIRECTORY, NULL))
|
||||
@ -2101,7 +2101,7 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
if (string_is_equal(settings->directory.overlay, "default"))
|
||||
*settings->directory.overlay = '\0';
|
||||
if (string_is_equal(dir_get_osk_overlay(), "default"))
|
||||
dir_clear_osk_overlay();
|
||||
dir_clear(RARCH_DIR_OSK_OVERLAY);
|
||||
#endif
|
||||
if (string_is_equal(settings->directory.system, "default"))
|
||||
*settings->directory.system = '\0';
|
||||
|
43
dirs.c
43
dirs.c
@ -216,32 +216,33 @@ size_t dir_get_osk_overlay_size(void)
|
||||
|
||||
/* clear functions */
|
||||
|
||||
void dir_clear_system(void)
|
||||
void dir_clear(enum rarch_dir_type type)
|
||||
{
|
||||
*dir_system = '\0';
|
||||
}
|
||||
|
||||
void dir_clear_savefile(void)
|
||||
{
|
||||
*dir_savefile = '\0';
|
||||
}
|
||||
|
||||
void dir_clear_savestate(void)
|
||||
{
|
||||
*dir_savestate = '\0';
|
||||
}
|
||||
|
||||
void dir_clear_osk_overlay(void)
|
||||
{
|
||||
*dir_osk_overlay = '\0';
|
||||
switch (type)
|
||||
{
|
||||
case RARCH_DIR_SAVEFILE:
|
||||
*dir_savefile = '\0';
|
||||
break;
|
||||
case RARCH_DIR_SAVESTATE:
|
||||
*dir_savestate = '\0';
|
||||
break;
|
||||
case RARCH_DIR_SYSTEM:
|
||||
*dir_system = '\0';
|
||||
break;
|
||||
case RARCH_DIR_OSK_OVERLAY:
|
||||
*dir_osk_overlay = '\0';
|
||||
break;
|
||||
case RARCH_DIR_NONE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void dir_clear_all(void)
|
||||
{
|
||||
dir_clear_system();
|
||||
dir_clear_osk_overlay();
|
||||
dir_clear_savefile();
|
||||
dir_clear_savestate();
|
||||
dir_clear(RARCH_DIR_SYSTEM);
|
||||
dir_clear(RARCH_DIR_OSK_OVERLAY);
|
||||
dir_clear(RARCH_DIR_SAVEFILE);
|
||||
dir_clear(RARCH_DIR_SAVESTATE);
|
||||
}
|
||||
|
||||
/* get ptr functions */
|
||||
|
Loading…
Reference in New Issue
Block a user