diff --git a/dirs.c b/dirs.c index b975f0989e..e5c0f3c209 100644 --- a/dirs.c +++ b/dirs.c @@ -29,6 +29,24 @@ #include "runloop.h" +bool dir_is_savefile_empty(void) +{ + global_t *global = global_get_ptr(); + + if (!global) + return false; + return string_is_empty(global->dir.savefile); +} + +bool dir_is_savestate_empty(void) +{ + global_t *global = global_get_ptr(); + + if (!global) + return false; + return string_is_empty(global->dir.savestate); +} + void dir_clear_savefile(void) { global_t *global = global_get_ptr(); diff --git a/dirs.h b/dirs.h index 7537371084..41fa9f654b 100644 --- a/dirs.h +++ b/dirs.h @@ -21,6 +21,10 @@ RETRO_BEGIN_DECLS +bool dir_is_savefile_empty(void); + +bool dir_is_savestate_empty(void); + void dir_clear_savefile(void); void dir_clear_savestate(void);