windows build fix

This commit is contained in:
radius 2016-08-27 22:59:47 -05:00
parent e1fa182620
commit 7092c0dbf4
3 changed files with 24 additions and 22 deletions

View File

@ -59,25 +59,6 @@
#include <retro_stat.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)
{
#if defined(_WIN32)

View File

@ -29,7 +29,24 @@
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);

View File

@ -22,6 +22,10 @@
#include <stdlib.h>
#ifdef _WIN32
#include <windows.h>
#endif
#include <lists/dir_list.h>
#include <lists/string_list.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
if (include_hidden)
entry.dwFileAttributes |= FILE_ATTRIBUTE_HIDDEN;
entry->entry.dwFileAttributes |= FILE_ATTRIBUTE_HIDDEN;
else
entry.dwFileAttributes &= ~FILE_ATTRIBUTE_HIDDEN;
entry->entry.dwFileAttributes &= ~FILE_ATTRIBUTE_HIDDEN;
#endif
while (retro_readdir(entry))