mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-20 21:35:30 +00:00
Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_ANDROID
This commit is contained in:
@@ -245,7 +245,7 @@ static int GLES2_LoadFunctions(GLES2_RenderData *data)
|
||||
{
|
||||
#if SDL_VIDEO_DRIVER_UIKIT
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
#elif SDL_VIDEO_DRIVER_ANDROID
|
||||
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
#endif
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS) || SDL_VIDEO_DRIVER_WINRT
|
||||
#include "../core/windows/SDL_windows.h"
|
||||
#endif
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
#include <android/native_window.h>
|
||||
#include "../video/android/SDL_androidvideo.h"
|
||||
#endif
|
||||
@@ -67,7 +67,7 @@
|
||||
#define DEFAULT_OGL_ES_PVR (vc4 ? "libGLES_CM.so.1" : "libbrcmGLESv2.so")
|
||||
#define DEFAULT_OGL_ES (vc4 ? "libGLESv1_CM.so.1" : "libbrcmGLESv2.so")
|
||||
|
||||
#elif SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_VIVANTE
|
||||
#elif defined(SDL_VIDEO_DRIVER_ANDROID) || SDL_VIDEO_DRIVER_VIVANTE
|
||||
/* Android */
|
||||
#define DEFAULT_EGL "libEGL.so"
|
||||
#define DEFAULT_OGL_ES2 "libGLESv2.so"
|
||||
@@ -971,7 +971,7 @@ SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface)
|
||||
share_context = (EGLContext)SDL_GL_GetCurrentContext();
|
||||
}
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
if (_this->gl_config.flags & SDL_GL_CONTEXT_DEBUG_FLAG) {
|
||||
/* If SDL_GL_CONTEXT_DEBUG_FLAG is set but EGL_KHR_debug unsupported, unset.
|
||||
* This is required because some Android devices like to complain about it
|
||||
@@ -1220,7 +1220,7 @@ int SDL_EGL_DeleteContext(_THIS, SDL_GLContext context)
|
||||
EGLSurface *
|
||||
SDL_EGL_CreateSurface(_THIS, SDL_Window *window, NativeWindowType nw)
|
||||
{
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
EGLint format_wanted;
|
||||
EGLint format_got;
|
||||
#endif
|
||||
@@ -1234,7 +1234,7 @@ SDL_EGL_CreateSurface(_THIS, SDL_Window *window, NativeWindowType nw)
|
||||
return EGL_NO_SURFACE;
|
||||
}
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
/* On Android, EGL_NATIVE_VISUAL_ID is an attribute of the EGLConfig that is
|
||||
* guaranteed to be accepted by ANativeWindow_setBuffersGeometry(). */
|
||||
_this->egl_data->eglGetConfigAttrib(_this->egl_data->egl_display,
|
||||
@@ -1302,7 +1302,7 @@ SDL_EGL_CreateSurface(_THIS, SDL_Window *window, NativeWindowType nw)
|
||||
SDL_EGL_SetError("unable to create an EGL window surface", "eglCreateWindowSurface");
|
||||
}
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
format_got = ANativeWindow_getFormat(nw);
|
||||
Android_SetFormat(format_wanted, format_got);
|
||||
#endif
|
||||
|
||||
@@ -88,7 +88,7 @@ static VideoBootStrap *bootstrap[] = {
|
||||
#if SDL_VIDEO_DRIVER_UIKIT
|
||||
&UIKIT_bootstrap,
|
||||
#endif
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
&Android_bootstrap,
|
||||
#endif
|
||||
#if SDL_VIDEO_DRIVER_PS2
|
||||
@@ -4650,7 +4650,7 @@ int SDL_GetMessageBoxCount(void)
|
||||
return SDL_AtomicGet(&SDL_messagebox_count);
|
||||
}
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
#include "android/SDL_androidmessagebox.h"
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_WINDOWS
|
||||
@@ -4740,7 +4740,7 @@ int SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
|
||||
}
|
||||
|
||||
/* It's completely fine to call this function before video is initialized */
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
if (retval == -1 &&
|
||||
Android_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||
retval = 0;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#error You should not be here.
|
||||
#endif
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
#define VK_USE_PLATFORM_ANDROID_KHR
|
||||
#endif
|
||||
#if SDL_VIDEO_DRIVER_COCOA
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
|
||||
#include "SDL_androidvideo.h"
|
||||
#include "SDL_androidclipboard.h"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
|
||||
#include "SDL_androidevents.h"
|
||||
#include "SDL_androidkeyboard.h"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID && SDL_VIDEO_OPENGL_EGL
|
||||
#if defined(SDL_VIDEO_DRIVER_ANDROID) && SDL_VIDEO_OPENGL_EGL
|
||||
|
||||
/* Android SDL video driver implementation */
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
|
||||
#include <android/log.h>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
|
||||
#include "SDL_androidmessagebox.h"
|
||||
#include "../../core/android/SDL_android.h"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
|
||||
extern int Android_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
|
||||
#include "SDL_androidmouse.h"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
|
||||
#include <android/log.h>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
|
||||
/* Android SDL video driver implementation */
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_ANDROID
|
||||
#if SDL_VIDEO_VULKAN && defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||
|
||||
#include "SDL_androidvideo.h"
|
||||
#include "SDL_androidwindow.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "../SDL_vulkan_internal.h"
|
||||
#include "../SDL_sysvideo.h"
|
||||
|
||||
#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_ANDROID
|
||||
#if SDL_VIDEO_VULKAN && defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||
|
||||
int Android_Vulkan_LoadLibrary(_THIS, const char *path);
|
||||
void Android_Vulkan_UnloadLibrary(_THIS);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
|
||||
#include "../SDL_sysvideo.h"
|
||||
#include "../../events/SDL_keyboard_c.h"
|
||||
|
||||
@@ -461,7 +461,7 @@ static int keyboard_setTextInputRect(void *arg)
|
||||
static int keyboard_setTextInputRectNegative(void *arg)
|
||||
{
|
||||
/* Some platforms set also an error message; prepare for checking it */
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS) || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS) || defined(SDL_VIDEO_DRIVER_ANDROID) || SDL_VIDEO_DRIVER_COCOA
|
||||
const char *expectedError = "Parameter 'rect' is invalid";
|
||||
const char *error;
|
||||
|
||||
@@ -474,7 +474,7 @@ static int keyboard_setTextInputRectNegative(void *arg)
|
||||
SDLTest_AssertPass("Call to SDL_SetTextInputRect(NULL)");
|
||||
|
||||
/* Some platforms set also an error message; so check it */
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS) || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS) || defined(SDL_VIDEO_DRIVER_ANDROID) || SDL_VIDEO_DRIVER_COCOA
|
||||
error = SDL_GetError();
|
||||
SDLTest_AssertPass("Call to SDL_GetError()");
|
||||
SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
|
||||
|
||||
@@ -36,7 +36,7 @@ static int LoadContext(GL_Context *data)
|
||||
{
|
||||
#if SDL_VIDEO_DRIVER_UIKIT
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
#elif SDL_VIDEO_DRIVER_ANDROID
|
||||
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
#endif
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ static int LoadContext(GLES2_Context *data)
|
||||
{
|
||||
#if SDL_VIDEO_DRIVER_UIKIT
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
#elif SDL_VIDEO_DRIVER_ANDROID
|
||||
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
#endif
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ static int LoadContext(GLES2_Context *data)
|
||||
{
|
||||
#if SDL_VIDEO_DRIVER_UIKIT
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
#elif SDL_VIDEO_DRIVER_ANDROID
|
||||
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user