mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-19 12:55:34 +00:00
Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_UIKIT
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
#include "../../video/uikit/SDL_uikitvideo.h"
|
#include "../../video/uikit/SDL_uikitvideo.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ void *SDL_LoadObject(const char *sofile)
|
|||||||
void *handle;
|
void *handle;
|
||||||
const char *loaderror;
|
const char *loaderror;
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
if (!UIKit_IsSystemVersionAtLeast(8.0)) {
|
if (!UIKit_IsSystemVersionAtLeast(8.0)) {
|
||||||
SDL_SetError("SDL_LoadObject requires iOS 8+");
|
SDL_SetError("SDL_LoadObject requires iOS 8+");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ GL_CheckAllErrors(const char *prefix, SDL_Renderer *renderer, const char *file,
|
|||||||
|
|
||||||
static int GLES2_LoadFunctions(GLES2_RenderData *data)
|
static int GLES2_LoadFunctions(GLES2_RenderData *data)
|
||||||
{
|
{
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
#define __SDL_NOGETPROCADDR__
|
#define __SDL_NOGETPROCADDR__
|
||||||
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||||
#define __SDL_NOGETPROCADDR__
|
#define __SDL_NOGETPROCADDR__
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ static VideoBootStrap *bootstrap[] = {
|
|||||||
#if SDL_VIDEO_DRIVER_HAIKU
|
#if SDL_VIDEO_DRIVER_HAIKU
|
||||||
&HAIKU_bootstrap,
|
&HAIKU_bootstrap,
|
||||||
#endif
|
#endif
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
&UIKIT_bootstrap,
|
&UIKIT_bootstrap,
|
||||||
#endif
|
#endif
|
||||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||||
@@ -4662,7 +4662,7 @@ int SDL_GetMessageBoxCount(void)
|
|||||||
#ifdef SDL_VIDEO_DRIVER_COCOA
|
#ifdef SDL_VIDEO_DRIVER_COCOA
|
||||||
#include "cocoa/SDL_cocoamessagebox.h"
|
#include "cocoa/SDL_cocoamessagebox.h"
|
||||||
#endif
|
#endif
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
#include "uikit/SDL_uikitmessagebox.h"
|
#include "uikit/SDL_uikitmessagebox.h"
|
||||||
#endif
|
#endif
|
||||||
#if SDL_VIDEO_DRIVER_WAYLAND
|
#if SDL_VIDEO_DRIVER_WAYLAND
|
||||||
@@ -4681,7 +4681,7 @@ int SDL_GetMessageBoxCount(void)
|
|||||||
#include "vita/SDL_vitamessagebox.h"
|
#include "vita/SDL_vitamessagebox.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS) || SDL_VIDEO_DRIVER_WINRT || defined(SDL_VIDEO_DRIVER_COCOA) || SDL_VIDEO_DRIVER_UIKIT || SDL_VIDEO_DRIVER_X11 || SDL_VIDEO_DRIVER_WAYLAND || SDL_VIDEO_DRIVER_HAIKU || SDL_VIDEO_DRIVER_RISCOS
|
#if defined(SDL_VIDEO_DRIVER_WINDOWS) || SDL_VIDEO_DRIVER_WINRT || defined(SDL_VIDEO_DRIVER_COCOA) || defined(SDL_VIDEO_DRIVER_UIKIT) || SDL_VIDEO_DRIVER_X11 || SDL_VIDEO_DRIVER_WAYLAND || SDL_VIDEO_DRIVER_HAIKU || SDL_VIDEO_DRIVER_RISCOS
|
||||||
static SDL_bool SDL_IsMessageboxValidForDriver(const SDL_MessageBoxData *messageboxdata, SDL_SYSWM_TYPE drivertype)
|
static SDL_bool SDL_IsMessageboxValidForDriver(const SDL_MessageBoxData *messageboxdata, SDL_SYSWM_TYPE drivertype)
|
||||||
{
|
{
|
||||||
SDL_SysWMinfo info;
|
SDL_SysWMinfo info;
|
||||||
@@ -4767,7 +4767,7 @@ int SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
|
|||||||
retval = 0;
|
retval = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
if (retval == -1 &&
|
if (retval == -1 &&
|
||||||
SDL_IsMessageboxValidForDriver(messageboxdata, SDL_SYSWM_UIKIT) &&
|
SDL_IsMessageboxValidForDriver(messageboxdata, SDL_SYSWM_UIKIT) &&
|
||||||
UIKit_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
UIKit_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#define VK_USE_PLATFORM_METAL_EXT
|
#define VK_USE_PLATFORM_METAL_EXT
|
||||||
#define VK_USE_PLATFORM_MACOS_MVK
|
#define VK_USE_PLATFORM_MACOS_MVK
|
||||||
#endif
|
#endif
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
#define VK_USE_PLATFORM_METAL_EXT
|
#define VK_USE_PLATFORM_METAL_EXT
|
||||||
#define VK_USE_PLATFORM_IOS_MVK
|
#define VK_USE_PLATFORM_IOS_MVK
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
|
|
||||||
#include "../SDL_sysvideo.h"
|
#include "../SDL_sysvideo.h"
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
|
|
||||||
#include "SDL_uikitvideo.h"
|
#include "SDL_uikitvideo.h"
|
||||||
#include "../../events/SDL_clipboardevents_c.h"
|
#include "../../events/SDL_clipboardevents_c.h"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
|
|
||||||
#include "../../events/SDL_events_c.h"
|
#include "../../events/SDL_events_c.h"
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
|
|
||||||
extern SDL_bool UIKit_ShowingMessageBox(void);
|
extern SDL_bool UIKit_ShowingMessageBox(void);
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
|
|
||||||
#include "SDL_uikitvideo.h"
|
#include "SDL_uikitvideo.h"
|
||||||
#include "SDL_uikitwindow.h"
|
#include "SDL_uikitwindow.h"
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
#include "../SDL_sysvideo.h"
|
#include "../SDL_sysvideo.h"
|
||||||
#include "SDL_uikitwindow.h"
|
#include "SDL_uikitwindow.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT && (SDL_VIDEO_VULKAN || SDL_VIDEO_METAL)
|
#if defined(SDL_VIDEO_DRIVER_UIKIT) && (SDL_VIDEO_VULKAN || SDL_VIDEO_METAL)
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
#import <Metal/Metal.h>
|
#import <Metal/Metal.h>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT && (SDL_VIDEO_VULKAN || SDL_VIDEO_METAL)
|
#if defined(SDL_VIDEO_DRIVER_UIKIT) && (SDL_VIDEO_VULKAN || SDL_VIDEO_METAL)
|
||||||
|
|
||||||
#include "../SDL_sysvideo.h"
|
#include "../SDL_sysvideo.h"
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
|
|
||||||
#include "SDL_uikitmodes.h"
|
#include "SDL_uikitmodes.h"
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT && (SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2)
|
#if defined(SDL_VIDEO_DRIVER_UIKIT) && (SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2)
|
||||||
|
|
||||||
#include "SDL_uikitopengles.h"
|
#include "SDL_uikitopengles.h"
|
||||||
#import "SDL_uikitopenglview.h"
|
#import "SDL_uikitopenglview.h"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT && (SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2)
|
#if defined(SDL_VIDEO_DRIVER_UIKIT) && (SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2)
|
||||||
|
|
||||||
#include <OpenGLES/EAGLDrawable.h>
|
#include <OpenGLES/EAGLDrawable.h>
|
||||||
#include <OpenGLES/ES2/glext.h>
|
#include <OpenGLES/ES2/glext.h>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
|
|
||||||
#include "SDL_uikitview.h"
|
#include "SDL_uikitview.h"
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
|
|
||||||
#include "../SDL_sysvideo.h"
|
#include "../SDL_sysvideo.h"
|
||||||
#include "../../events/SDL_events_c.h"
|
#include "../../events/SDL_events_c.h"
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
#include "../SDL_vulkan_internal.h"
|
#include "../SDL_vulkan_internal.h"
|
||||||
#include "../SDL_sysvideo.h"
|
#include "../SDL_sysvideo.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_UIKIT
|
#if SDL_VIDEO_VULKAN && defined(SDL_VIDEO_DRIVER_UIKIT)
|
||||||
|
|
||||||
int UIKit_Vulkan_LoadLibrary(_THIS, const char *path);
|
int UIKit_Vulkan_LoadLibrary(_THIS, const char *path);
|
||||||
void UIKit_Vulkan_UnloadLibrary(_THIS);
|
void UIKit_Vulkan_UnloadLibrary(_THIS);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_UIKIT
|
#if SDL_VIDEO_VULKAN && defined(SDL_VIDEO_DRIVER_UIKIT)
|
||||||
|
|
||||||
#include "SDL_uikitvideo.h"
|
#include "SDL_uikitvideo.h"
|
||||||
#include "SDL_uikitwindow.h"
|
#include "SDL_uikitwindow.h"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
|
|
||||||
#include "../SDL_sysvideo.h"
|
#include "../SDL_sysvideo.h"
|
||||||
#include "../SDL_pixels_c.h"
|
#include "../SDL_pixels_c.h"
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ static GL_Context ctx;
|
|||||||
|
|
||||||
static int LoadContext(GL_Context *data)
|
static int LoadContext(GL_Context *data)
|
||||||
{
|
{
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
#define __SDL_NOGETPROCADDR__
|
#define __SDL_NOGETPROCADDR__
|
||||||
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||||
#define __SDL_NOGETPROCADDR__
|
#define __SDL_NOGETPROCADDR__
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ static GLES2_Context ctx;
|
|||||||
|
|
||||||
static int LoadContext(GLES2_Context *data)
|
static int LoadContext(GLES2_Context *data)
|
||||||
{
|
{
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
#define __SDL_NOGETPROCADDR__
|
#define __SDL_NOGETPROCADDR__
|
||||||
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||||
#define __SDL_NOGETPROCADDR__
|
#define __SDL_NOGETPROCADDR__
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ static GLES2_Context ctx;
|
|||||||
|
|
||||||
static int LoadContext(GLES2_Context *data)
|
static int LoadContext(GLES2_Context *data)
|
||||||
{
|
{
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||||
#define __SDL_NOGETPROCADDR__
|
#define __SDL_NOGETPROCADDR__
|
||||||
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||||
#define __SDL_NOGETPROCADDR__
|
#define __SDL_NOGETPROCADDR__
|
||||||
|
|||||||
Reference in New Issue
Block a user