windows build fix
This commit is contained in:
parent
e1fa182620
commit
7092c0dbf4
|
@ -59,25 +59,6 @@
|
||||||
#include <retro_stat.h>
|
#include <retro_stat.h>
|
||||||
#include <retro_dirent.h>
|
#include <retro_dirent.h>
|
||||||
|
|
||||||
struct RDIR
|
|
||||||
{
|
|
||||||
#if defined(_WIN32)
|
|
||||||
WIN32_FIND_DATA entry;
|
|
||||||
HANDLE directory;
|
|
||||||
bool next;
|
|
||||||
#elif defined(VITA) || defined(PSP)
|
|
||||||
SceUID directory;
|
|
||||||
SceIoDirent entry;
|
|
||||||
#elif defined(__CELLOS_LV2__)
|
|
||||||
CellFsErrno error;
|
|
||||||
int directory;
|
|
||||||
CellFsDirent entry;
|
|
||||||
#else
|
|
||||||
DIR *directory;
|
|
||||||
const struct dirent *entry;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
struct RDIR *retro_opendir(const char *name)
|
struct RDIR *retro_opendir(const char *name)
|
||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
|
|
@ -29,7 +29,24 @@
|
||||||
|
|
||||||
RETRO_BEGIN_DECLS
|
RETRO_BEGIN_DECLS
|
||||||
|
|
||||||
struct RDIR;
|
struct RDIR
|
||||||
|
{
|
||||||
|
#if defined(_WIN32)
|
||||||
|
WIN32_FIND_DATA entry;
|
||||||
|
HANDLE directory;
|
||||||
|
bool next;
|
||||||
|
#elif defined(VITA) || defined(PSP)
|
||||||
|
SceUID directory;
|
||||||
|
SceIoDirent entry;
|
||||||
|
#elif defined(__CELLOS_LV2__)
|
||||||
|
CellFsErrno error;
|
||||||
|
int directory;
|
||||||
|
CellFsDirent entry;
|
||||||
|
#else
|
||||||
|
DIR *directory;
|
||||||
|
const struct dirent *entry;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
struct RDIR *retro_opendir(const char *name);
|
struct RDIR *retro_opendir(const char *name);
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <lists/dir_list.h>
|
#include <lists/dir_list.h>
|
||||||
#include <lists/string_list.h>
|
#include <lists/string_list.h>
|
||||||
#include <file/file_path.h>
|
#include <file/file_path.h>
|
||||||
|
@ -211,9 +215,9 @@ int dir_list_read(const char *dir, struct string_list *list, struct string_list
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (include_hidden)
|
if (include_hidden)
|
||||||
entry.dwFileAttributes |= FILE_ATTRIBUTE_HIDDEN;
|
entry->entry.dwFileAttributes |= FILE_ATTRIBUTE_HIDDEN;
|
||||||
else
|
else
|
||||||
entry.dwFileAttributes &= ~FILE_ATTRIBUTE_HIDDEN;
|
entry->entry.dwFileAttributes &= ~FILE_ATTRIBUTE_HIDDEN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while (retro_readdir(entry))
|
while (retro_readdir(entry))
|
||||||
|
|
Loading…
Reference in New Issue