Work around inconsistent header inclusion.
Overriding headers has always been risky, and finally we see why. Apparently on iOS, files may be compiled in such a way that the original SDL_config.h file is included, not Lime's custom one. It's hard to do anything more than we've already done to manage include order, so we need to find another option. One such option is to make the two files as similar as possible, such that it usually doesn't matter which one ends up being included. Then we only set `USING_GENERATED_CONFIG_H` when it really matters.
This commit is contained in:
@@ -39,10 +39,12 @@
|
||||
#include "SDL_config_iphoneos.h"
|
||||
#elif defined(__ANDROID__)
|
||||
#include "SDL_config_android.h"
|
||||
#elif defined(__PSP__)
|
||||
#include "SDL_config_psp.h"
|
||||
#elif defined(__OS2__)
|
||||
#include "SDL_config_os2.h"
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
#include "SDL_config_emscripten.h"
|
||||
#elif defined(__NGAGE__)
|
||||
#include "SDL_config_ngage.h"
|
||||
#elif defined(RASPBERRYPI)
|
||||
#include "SDL_config_rpi.h"
|
||||
#elif defined(HX_LINUX)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<cache value="1" />
|
||||
<tag value="${NATIVE_TOOLKIT_OPTIM_TAG}" if="NATIVE_TOOLKIT_OPTIM_TAG" />
|
||||
|
||||
<compilerflag value="-DUSING_GENERATED_CONFIG_H" />
|
||||
<compilerflag value="-DUSING_GENERATED_CONFIG_H" if="linux || rpi" /> <!-- For other targets, it doesn't matter which header is included. -->
|
||||
<depend files="native-toolkit-sdl-depends" />
|
||||
|
||||
<compilerflag value="-I${ANDROID_NDK_ROOT}/sources/android/cpufeatures" if="android" />
|
||||
|
||||
Reference in New Issue
Block a user