allow MacOS build without SDL_FILE

This commit is contained in:
pionere 2022-01-12 10:02:52 +01:00 committed by Ryan C. Gordon
parent b1b2ad725c
commit 176941a4fb
2 changed files with 1 additions and 3 deletions

View File

@ -1838,8 +1838,6 @@ elseif(APPLE)
# !!! FIXME: modern CMake doesn't need "LANGUAGE C" for Objective-C.
set_source_files_properties(${EXTRA_SOURCES} PROPERTIES LANGUAGE C)
set(HAVE_SDL_FILE TRUE)
else()
message_error("SDL_FILE must be enabled to build on MacOS X")
endif()
if(IOS OR TVOS)

View File

@ -833,7 +833,7 @@ SDL_RWFromFile(const char *file, const char *mode)
rwops->type = SDL_RWOPS_VITAFILE;
#elif HAVE_STDIO_H
{
#ifdef __APPLE__
#if __APPLE__ && !SDL_FILE_DISABLED // TODO: add dummy?
FILE *fp = SDL_OpenFPFromBundleOrFallback(file, mode);
#elif __WINRT__
FILE *fp = NULL;