mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
string_is_empty check is already being done by path_is_valid/file stat
path cb function
This commit is contained in:
parent
32f9b9ab9a
commit
eed2ea7a99
@ -1529,7 +1529,7 @@ static bool command_event_save_core_config(void)
|
||||
config_path[0] = '\0';
|
||||
|
||||
/* Infer file name based on libretro core. */
|
||||
if (!string_is_empty(core_path) && filestream_exists(core_path))
|
||||
if (path_is_valid(core_path))
|
||||
{
|
||||
unsigned i;
|
||||
RARCH_LOG("%s\n", msg_hash_to_str(MSG_USING_CORE_NAME_FOR_NEW_CONFIG));
|
||||
|
@ -723,7 +723,7 @@ static void xmb_draw_icon(
|
||||
draw.y = height - y - shadow_offset;
|
||||
|
||||
#if defined(VITA) || defined(WIIU)
|
||||
if(scale_factor < 1)
|
||||
if (scale_factor < 1)
|
||||
{
|
||||
draw.x = draw.x + (icon_size-draw.width)/2;
|
||||
draw.y = draw.y + (icon_size-draw.width)/2;
|
||||
@ -737,7 +737,7 @@ static void xmb_draw_icon(
|
||||
draw.y = height - y;
|
||||
|
||||
#if defined(VITA) || defined(WIIU)
|
||||
if(scale_factor < 1)
|
||||
if (scale_factor < 1)
|
||||
{
|
||||
draw.x = draw.x + (icon_size-draw.width)/2;
|
||||
draw.y = draw.y + (icon_size-draw.width)/2;
|
||||
@ -1185,8 +1185,7 @@ static void xmb_update_savestate_thumbnail_image(void *data)
|
||||
if (!xmb)
|
||||
return;
|
||||
|
||||
if (!string_is_empty(xmb->savestate_thumbnail_file_path)
|
||||
&& filestream_exists(xmb->savestate_thumbnail_file_path))
|
||||
if (path_is_valid(xmb->savestate_thumbnail_file_path))
|
||||
task_push_image_load(xmb->savestate_thumbnail_file_path,
|
||||
menu_display_handle_savestate_thumbnail_upload, NULL);
|
||||
else
|
||||
@ -1636,9 +1635,9 @@ static void xmb_list_switch_new(xmb_handle_t *xmb,
|
||||
fill_pathname_application_special(path, path_size,
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_BG);
|
||||
|
||||
if(!string_is_equal(path, xmb->bg_file_path))
|
||||
if (!string_is_equal(path, xmb->bg_file_path))
|
||||
{
|
||||
if(filestream_exists(path))
|
||||
if (filestream_exists(path))
|
||||
{
|
||||
task_push_image_load(path,
|
||||
menu_display_handle_wallpaper_upload, NULL);
|
||||
@ -2044,7 +2043,7 @@ static void xmb_context_reset_horizontal_list(
|
||||
|
||||
if (image_texture_load(&ti, texturepath))
|
||||
{
|
||||
if(ti.pixels)
|
||||
if (ti.pixels)
|
||||
{
|
||||
video_driver_texture_unload(&node->icon);
|
||||
video_driver_texture_load(&ti,
|
||||
@ -2072,7 +2071,7 @@ static void xmb_context_reset_horizontal_list(
|
||||
|
||||
if (image_texture_load(&ti, content_texturepath))
|
||||
{
|
||||
if(ti.pixels)
|
||||
if (ti.pixels)
|
||||
{
|
||||
video_driver_texture_unload(&node->content_icon);
|
||||
video_driver_texture_load(&ti,
|
||||
|
@ -1683,10 +1683,12 @@ bool menu_display_reset_textures_list(
|
||||
ti.pixels = NULL;
|
||||
ti.supports_rgba = video_driver_supports_rgba();
|
||||
|
||||
if (!string_is_empty(texture_path))
|
||||
fill_pathname_join(texpath, iconpath, texture_path, sizeof(texpath));
|
||||
if (string_is_empty(texture_path))
|
||||
return false;
|
||||
|
||||
if (string_is_empty(texpath) || !filestream_exists(texpath))
|
||||
fill_pathname_join(texpath, iconpath, texture_path, sizeof(texpath));
|
||||
|
||||
if (!path_is_valid(texpath))
|
||||
return false;
|
||||
|
||||
if (!image_texture_load(&ti, texpath))
|
||||
|
Loading…
Reference in New Issue
Block a user