allow MacOS build without SDL_FILE
parent
b1b2ad725c
commit
176941a4fb
|
@ -1838,8 +1838,6 @@ elseif(APPLE)
|
||||||
# !!! FIXME: modern CMake doesn't need "LANGUAGE C" for Objective-C.
|
# !!! FIXME: modern CMake doesn't need "LANGUAGE C" for Objective-C.
|
||||||
set_source_files_properties(${EXTRA_SOURCES} PROPERTIES LANGUAGE C)
|
set_source_files_properties(${EXTRA_SOURCES} PROPERTIES LANGUAGE C)
|
||||||
set(HAVE_SDL_FILE TRUE)
|
set(HAVE_SDL_FILE TRUE)
|
||||||
else()
|
|
||||||
message_error("SDL_FILE must be enabled to build on MacOS X")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(IOS OR TVOS)
|
if(IOS OR TVOS)
|
||||||
|
|
|
@ -833,7 +833,7 @@ SDL_RWFromFile(const char *file, const char *mode)
|
||||||
rwops->type = SDL_RWOPS_VITAFILE;
|
rwops->type = SDL_RWOPS_VITAFILE;
|
||||||
#elif HAVE_STDIO_H
|
#elif HAVE_STDIO_H
|
||||||
{
|
{
|
||||||
#ifdef __APPLE__
|
#if __APPLE__ && !SDL_FILE_DISABLED // TODO: add dummy?
|
||||||
FILE *fp = SDL_OpenFPFromBundleOrFallback(file, mode);
|
FILE *fp = SDL_OpenFPFromBundleOrFallback(file, mode);
|
||||||
#elif __WINRT__
|
#elif __WINRT__
|
||||||
FILE *fp = NULL;
|
FILE *fp = NULL;
|
||||||
|
|
Loading…
Reference in New Issue