SDL_rwops.c (SDL_IsRegularFile): fix WinRT build failure due to S_ISREG

(cherry picked from commit fcd1c155cc)
This commit is contained in:
Ozkan Sezer
2024-01-28 02:20:00 +03:00
parent 5ae2ffc127
commit 2a4db8c415

View File

@@ -465,7 +465,7 @@ static SDL_bool SDL_IsRegularFile(FILE *f)
{
#ifdef SDL_PLATFORM_WINRT
struct __stat64 st;
if (_fstat64(_fileno(f), &st) < 0 || !S_ISREG(st.st_mode)) {
if (_fstat64(_fileno(f), &st) < 0 || (st.st_mode & _S_IFMT) != _S_IFREG) {
return SDL_FALSE;
}
#else