diff --git a/dirs.c b/dirs.c index 3d0313921f..1cea853406 100644 --- a/dirs.c +++ b/dirs.c @@ -172,24 +172,23 @@ void dir_check_shader(bool pressed_next, bool pressed_prev) /* empty functions */ -bool dir_is_system_empty(void) +bool dir_is_empty(enum rarch_dir_type type) { - return string_is_empty(dir_savefile); -} + switch (type) + { + case RARCH_DIR_SYSTEM: + return string_is_empty(dir_savefile); + case RARCH_DIR_SAVEFILE: + return string_is_empty(dir_savefile); + case RARCH_DIR_SAVESTATE: + return string_is_empty(dir_savestate); + case RARCH_DIR_OSK_OVERLAY: + return string_is_empty(dir_osk_overlay); + case RARCH_DIR_NONE: + break; + } -bool dir_is_savefile_empty(void) -{ - return string_is_empty(dir_savefile); -} - -bool dir_is_savestate_empty(void) -{ - return string_is_empty(dir_savestate); -} - -bool dir_is_osk_overlay_empty(void) -{ - return string_is_empty(dir_osk_overlay); + return false; } /* get size functions */ diff --git a/dirs.h b/dirs.h index 2c54f508ba..a33e601c83 100644 --- a/dirs.h +++ b/dirs.h @@ -44,13 +44,7 @@ void dir_check_shader(bool pressed_next, bool pressed_prev); /* empty functions */ -bool dir_is_savefile_empty(void); - -bool dir_is_savestate_empty(void); - -bool dir_is_system_empty(void); - -bool dir_is_osk_overlay_empty(void); +bool dir_is_empty(enum rarch_dir_type type); /* clear functions */ diff --git a/tasks/task_content.c b/tasks/task_content.c index 98b6c6c72c..6af7313c52 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -847,9 +847,9 @@ static void menu_content_environment_get(int *argc, char *argv[], if (!path_is_empty(RARCH_PATH_CONFIG)) wrap_args->config_path = path_get(RARCH_PATH_CONFIG); - if (!dir_is_savefile_empty()) + if (!dir_is_empty(RARCH_DIR_SAVEFILE)) wrap_args->sram_path = dir_get_savefile(); - if (!dir_is_savestate_empty()) + if (!dir_is_empty(RARCH_DIR_SAVESTATE)) wrap_args->state_path = dir_get_savestate(); if (fullpath && *fullpath) wrap_args->content_path = fullpath;