Fix -Wundef warnings due to use of unguarded __IOS__
This commit is contained in:
1 parent
785055bedf
commit
4bf650d488
6 files changed
+8
-8
No files matched your search
@@ -623,7 +623,7 @@ SDL_IsTablet(void)
|
|||||||
#if defined(__ANDROID__)
|
#if defined(__ANDROID__)
|
||||||
extern SDL_bool SDL_IsAndroidTablet(void);
|
extern SDL_bool SDL_IsAndroidTablet(void);
|
||||||
return SDL_IsAndroidTablet();
|
return SDL_IsAndroidTablet();
|
||||||
#elif __IOS__
|
#elif defined(__IOS__)
|
||||||
extern SDL_bool SDL_IsIPad(void);
|
extern SDL_bool SDL_IsIPad(void);
|
||||||
return SDL_IsIPad();
|
return SDL_IsIPad();
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -595,7 +595,7 @@ static const SDL_UDEV_Symbols *udev_ctx = NULL;
|
|||||||
#include "hidapi/hidapi.h"
|
#include "hidapi/hidapi.h"
|
||||||
#define HAVE_PLATFORM_BACKEND 1
|
#define HAVE_PLATFORM_BACKEND 1
|
||||||
#define udev_ctx 1
|
#define udev_ctx 1
|
||||||
#elif __IOS__ || __TVOS__
|
#elif defined(__IOS__) || __TVOS__
|
||||||
/* The implementation for iOS and tvOS is in a separate .m file */
|
/* The implementation for iOS and tvOS is in a separate .m file */
|
||||||
#include "hidapi/hidapi.h"
|
#include "hidapi/hidapi.h"
|
||||||
#define HAVE_PLATFORM_BACKEND 1
|
#define HAVE_PLATFORM_BACKEND 1
|
||||||
@@ -1585,7 +1585,7 @@ int SDL_hid_get_indexed_string(SDL_hid_device *device, int string_index, wchar_t
|
|||||||
|
|
||||||
void SDL_hid_ble_scan(SDL_bool active)
|
void SDL_hid_ble_scan(SDL_bool active)
|
||||||
{
|
{
|
||||||
#if !SDL_HIDAPI_DISABLED && (__IOS__ || __TVOS__)
|
#if !SDL_HIDAPI_DISABLED && (defined(__IOS__) || __TVOS__)
|
||||||
hid_ble_scan(active);
|
hid_ble_scan(active);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ namespace NAMESPACE {
|
|||||||
*/
|
*/
|
||||||
HID_API_EXPORT const wchar_t* HID_API_CALL hid_error(hid_device *dev);
|
HID_API_EXPORT const wchar_t* HID_API_CALL hid_error(hid_device *dev);
|
||||||
|
|
||||||
#if __IOS__ || __TVOS__
|
#if defined(__IOS__) || __TVOS__
|
||||||
HID_API_EXPORT void HID_API_CALL hid_ble_scan(int active);
|
HID_API_EXPORT void HID_API_CALL hid_ble_scan(int active);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -192,12 +192,12 @@ typedef struct
|
|||||||
|
|
||||||
static Uint32 SDL_DefaultGraphicsBackends(SDL_VideoDevice *_this)
|
static Uint32 SDL_DefaultGraphicsBackends(SDL_VideoDevice *_this)
|
||||||
{
|
{
|
||||||
#if (SDL_VIDEO_OPENGL && __MACOS__) || (__IOS__ && !TARGET_OS_MACCATALYST) || defined(__ANDROID__)
|
#if (SDL_VIDEO_OPENGL && __MACOS__) || (defined(__IOS__) && !TARGET_OS_MACCATALYST) || defined(__ANDROID__)
|
||||||
if (_this->GL_CreateContext != NULL) {
|
if (_this->GL_CreateContext != NULL) {
|
||||||
return SDL_WINDOW_OPENGL;
|
return SDL_WINDOW_OPENGL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if SDL_VIDEO_METAL && (TARGET_OS_MACCATALYST || __MACOS__ || __IOS__)
|
#if SDL_VIDEO_METAL && (TARGET_OS_MACCATALYST || __MACOS__ || defined(__IOS__))
|
||||||
if (_this->Metal_CreateView != NULL) {
|
if (_this->Metal_CreateView != NULL) {
|
||||||
return SDL_WINDOW_METAL;
|
return SDL_WINDOW_METAL;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -294,7 +294,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
textwin = SDLTest_TextWindowCreate(0, 0, 640, 480);
|
textwin = SDLTest_TextWindowCreate(0, 0, 640, 480);
|
||||||
|
|
||||||
#if __IOS__
|
#ifdef __IOS__
|
||||||
/* Creating the context creates the view, which we need to show keyboard */
|
/* Creating the context creates the view, which we need to show keyboard */
|
||||||
SDL_GL_CreateContext(window);
|
SDL_GL_CreateContext(window);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ int main(int argc, char *argv[])
|
|||||||
renderer = SDL_CreateRenderer(window, NULL, 0);
|
renderer = SDL_CreateRenderer(window, NULL, 0);
|
||||||
SDL_RenderPresent(renderer);
|
SDL_RenderPresent(renderer);
|
||||||
|
|
||||||
#if __IOS__
|
#ifdef __IOS__
|
||||||
/* Creating the context creates the view, which we need to show keyboard */
|
/* Creating the context creates the view, which we need to show keyboard */
|
||||||
SDL_GL_CreateContext(window);
|
SDL_GL_CreateContext(window);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in new issue
Block a user