Merge pull request #7961 from fjtrujy/feature/solvePS2RunTimeIssues

Make PS2 works again
This commit is contained in:
Twinaphex 2019-01-10 02:30:14 +01:00 committed by GitHub
commit 9c507b2433
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 11 deletions

View File

@ -31,10 +31,11 @@
#endif
#endif
#ifdef _WIN32
#undef fopen
void *fopen_utf8(const char * filename, const char * mode)
{
#if defined(_WIN32)
#undef fopen
#if defined(_XBOX)
return fopen(filename, mode);
#elif defined(LEGACY_WIN32)
@ -55,7 +56,5 @@ void *fopen_utf8(const char * filename, const char * mode)
free(mode_w);
return ret;
#endif
#else
return fopen(filename, mode);
#endif
}
#endif

View File

@ -219,7 +219,7 @@ static bool path_stat(const char *path, enum stat_mode mode, int32_t *size)
#endif
case IS_CHARACTER_SPECIAL:
#if defined(VITA) || defined(PSP) || defined(PS2) || defined(__CELLOS_LV2__) || defined(_WIN32)
break;
return false;
#else
return S_ISCHR(buf.st_mode);
#endif

View File

@ -23,12 +23,12 @@
#ifndef __LIBRETRO_SDK_COMPAT_FOPEN_UTF8_H
#define __LIBRETRO_SDK_COMPAT_FOPEN_UTF8_H
/* Defined to error rather than fopen_utf8, to make it
* clear to everyone reading the code that not worrying
* about UTF16 is fine. */
#ifdef _WIN32
/* Defined to error rather than fopen_utf8, to make it clear to everyone reading the code that not worrying about utf16 is fine */
/* TODO: enable */
/* #define fopen (use fopen_utf8 instead) */
void *fopen_utf8(const char * filename, const char * mode);
#else
#define fopen_utf8 fopen
#endif
#endif