Use string_is_empty

This commit is contained in:
twinaphex 2016-06-26 10:33:46 +02:00
parent 961daf8067
commit f6bbe69096
2 changed files with 8 additions and 6 deletions

View File

@ -1098,7 +1098,7 @@ static void retroarch_init_savefile_paths(void)
global->savefiles = string_list_new();
retro_assert(global->savefiles);
if (system && *global->subsystem)
if (system && !string_is_empty(global->subsystem))
{
/* For subsystems, we know exactly which RAM types are supported. */
@ -1558,16 +1558,18 @@ void retroarch_fill_pathnames(void)
retroarch_init_savefile_paths();
bsv_movie_set_path(global->name.savefile);
if (!*global->name.base)
if (string_is_empty(global->name.base))
return;
if (!*global->name.ups)
if (string_is_empty(global->name.ups))
fill_pathname_noext(global->name.ups, global->name.base, ".ups",
sizeof(global->name.ups));
if (!*global->name.bps)
if (string_is_empty(global->name.bps))
fill_pathname_noext(global->name.bps, global->name.base, ".bps",
sizeof(global->name.bps));
if (!*global->name.ips)
if (string_is_empty(global->name.ips))
fill_pathname_noext(global->name.ips, global->name.base, ".ips",
sizeof(global->name.ips));
}

View File

@ -1118,7 +1118,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
const struct retro_variable *vars =
(const struct retro_variable*)data;
if (!*options_path && *global->path.config)
if (string_is_empty(options_path) && *global->path.config)
{
fill_pathname_resolve_relative(buf, global->path.config,
file_path_str(FILE_PATH_CORE_OPTIONS_CONFIG), sizeof(buf));