mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Create dir_is_empty
This commit is contained in:
parent
bdf379d568
commit
9050f75fc8
31
dirs.c
31
dirs.c
@ -172,24 +172,23 @@ void dir_check_shader(bool pressed_next, bool pressed_prev)
|
|||||||
|
|
||||||
/* empty functions */
|
/* 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 false;
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get size functions */
|
/* get size functions */
|
||||||
|
8
dirs.h
8
dirs.h
@ -44,13 +44,7 @@ void dir_check_shader(bool pressed_next, bool pressed_prev);
|
|||||||
|
|
||||||
/* empty functions */
|
/* empty functions */
|
||||||
|
|
||||||
bool dir_is_savefile_empty(void);
|
bool dir_is_empty(enum rarch_dir_type type);
|
||||||
|
|
||||||
bool dir_is_savestate_empty(void);
|
|
||||||
|
|
||||||
bool dir_is_system_empty(void);
|
|
||||||
|
|
||||||
bool dir_is_osk_overlay_empty(void);
|
|
||||||
|
|
||||||
/* clear functions */
|
/* clear functions */
|
||||||
|
|
||||||
|
@ -847,9 +847,9 @@ static void menu_content_environment_get(int *argc, char *argv[],
|
|||||||
|
|
||||||
if (!path_is_empty(RARCH_PATH_CONFIG))
|
if (!path_is_empty(RARCH_PATH_CONFIG))
|
||||||
wrap_args->config_path = path_get(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();
|
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();
|
wrap_args->state_path = dir_get_savestate();
|
||||||
if (fullpath && *fullpath)
|
if (fullpath && *fullpath)
|
||||||
wrap_args->content_path = fullpath;
|
wrap_args->content_path = fullpath;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user