Cleanup retro_dirent.c

This commit is contained in:
twinaphex 2018-02-02 19:09:25 +01:00
parent dbe270476a
commit acdbf6f069

View File

@ -122,6 +122,7 @@ struct RDIR *retro_opendir(const char *name)
snprintf(path_buf, sizeof(path_buf), "%s*", name);
else
snprintf(path_buf, sizeof(path_buf), "%s\\*", name);
#if defined(LEGACY_WIN32)
path_local = utf8_to_local_string_alloc(path_buf);
rdir->directory = FindFirstFile(path_local, &rdir->entry);
@ -135,6 +136,7 @@ struct RDIR *retro_opendir(const char *name)
if (path_wide)
free(path_wide);
#endif
#elif defined(VITA) || defined(PSP)
rdir->directory = sceIoDopen(name);
#elif defined(_3DS)
@ -149,11 +151,9 @@ struct RDIR *retro_opendir(const char *name)
if (rdir->directory)
return rdir;
else
{
free(rdir);
return NULL;
}
}
bool retro_dirent_error(struct RDIR *rdir)