Fix uses of undefined macro identifiers (-Wundef)
* Fix -Wundef warnings due to use of unguarded SDL_LOADSO_DISABLED
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_WINDOWS
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_ANDROID
* Fix -Wundef warnings due to use of unguarded SDL_LOADSO_DUMMY
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_COCOA
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_UIKIT
* Fix -Wundef warnings due to use of unguarded SDL_TIMERS_DISABLED
* Fix -Wundef warnings due to use of unguarded SDL_EVENTS_DISABLED
* Fix -Wundef warnings due to use of unguarded SDL_TIMER_DUMMY
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DISABLED
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DISABLED
* Fix -Wundef warnings due to use of unguarded SDL_JOYSTICK_DISABLED
* Fix -Wundef warnings due to use of unguarded SDL_HAPTIC_DISABLED
* Fix -Wundef warnings due to use of unguarded SDL_SENSOR_DISABLED
* Fix -Wundef warnings due to use of unguarded __ANDROID__
* Fix -Wundef warnings due to use of unguarded __IOS__
* Fix -Wundef warnings due to use of unguarded EMULATE_CAS
* Fix -Wundef warnings due to use of unguarded SDL_ATOMIC_DISABLED
* Fix -Wundef warnings due to use of unguarded SDL_THREADS_DISABLED
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_SNDIO
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_NETBSD
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_WASAPI
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_DSOUND
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_HAIKU
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_COREAUDIO
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_AAUDIO
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_OPENSLES
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_ANDROID
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_PS2
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_PSP
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_VITA
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_N3DS
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_EMSCRIPTEN
* Fix -Wundef warnings due to use of unguarded SDL_NEON_INTRINSICS
* Fix -Wundef warnings due to use of unguarded SDL_ALTIVEC_BLITTERS
* Fix -Wundef warnings due to use of unguarded __VITA__
* Fix -Wundef warnings due to use of unguarded __3DS__
* Fix -Wundef warnings due to use of unguarded SDL_DYNAPI_PROC_NO_VARARGS
* Fix -Wundef warnings due to use of unguarded __APPLE__
* Fix -Wundef warnings due to use of unguarded __WINRT__
* Fix -Wundef warnings due to use of unguarded SDL_HIDAPI_DISABLED
* Fix -Wundef warnings due to use of unguarded __TVOS__
* Fix -Wundef warnings due to use of unguarded HAVE_DRIVER_BACKEND
* Fix -Wundef warnings due to use of unguarded SDL_JOYSTICK_XINPUT
* Fix -Wundef warnings due to use of unguarded SDL_JOYSTICK_WGI
* Fix -Wundef warnings due to use of unguarded SDL_JOYSTICK_DINPUT
* Fix -Wundef warnings due to use of unguarded SDL_JOYSTICK_MFI
* Fix -Wundef warnings due to use of unguarded SDL_JOYSTICK_EMSCRIPTEN
* Fix -Wundef warnings due to use of unguarded SDL_JOYSTICK_PS2
* Fix -Wundef warnings due to use of unguarded SDL_JOYSTICK_PSP
* Fix -Wundef warnings due to use of unguarded SDL_JOYSTICK_VITA
* Fix -Wundef warnings due to use of unguarded SDL_JOYSTICK_N3DS
* Fix -Wundef warnings due to use of unguarded __MACOS__
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_RENDER_D3D
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_WINRT
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_RPI
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_VITA_PVR_OGL
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_VIVANTE
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_RENDER_D3D11
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_RENDER_D3D12
* Fix -Wundef warnings due to use of unguarded SDL_RENDER_DISABLED
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_RENDER_METAL
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_RENDER_PS2
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_RENDER_PSP
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_RENDER_VITA_GXM
* Fix -Wundef warnings due to use of unguarded SDL_ARM_SIMD_BLITTERS
* Fix -Wundef warnings due to use of unguarded SDL_ARM_NEON_BLITTERS
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_HAIKU
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_PS2
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_PSP
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_VITA
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_N3DS
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_KMSDRM
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_RISCOS
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_EMSCRIPTEN
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_NGAGE
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_METAL
* Fix -Wundef warnings due to use of unguarded SDL_LSX_INTRINSICS
* Fix -Wundef warnings due to use of unguarded HAVE_PTHREAD_NP_H
* Fix -Wundef warnings due to use of unguarded __RISCOS__
* Fix -Wundef warnings due to use of unguarded FAKE_RECURSIVE_MUTEX
* Fix -Wundef warnings due to use of unguarded USE_POSIX_SPAWN
* textureData is only needed when SDL is built with YUV support
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_ALSA
* Fix -Wundef warnings due to use of unguarded SDL_SSE3_INTRINSICS
* Fix -Wundef warnings due to use of unguarded SDL_SSE4_2_INTRINSICS
* Fix -Wundef warnings due to use of unguarded SDL_SSE4_1_INTRINSICS
* Fix -Wundef warnings due to use of unguarded SDL_AVX512F_INTRINSICS
* Fix -Wundef warnings due to use of unguarded SDL_SSE2_INTRINSICS
* Fix -Wundef warnings due to use of unguarded SDL_AVX_INTRINSICS
* Fix -Wundef warnings due to use of unguarded SDL_AVX2_INTRINSICS
* Fix -Wundef warnings due to use of unguarded SDL_SSE_INTRINSICS
* Fix -Wundef warnings due to use of unguarded SDL_MMX_INTRINSICS
* Fix -Wundef warnings due to use of unguarded HAVE_CLOCK_GETTIME
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_DISK
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_DUMMY
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_DUMMY
* Fix -Wundef warnings due to use of unguarded HAVE_GCC_ATOMICS
* Fix -Wundef warnings due to use of unguarded HAVE_GCC_SYNC_LOCK_TEST_AND_SET
* Fix -Wundef warnings due to use of unguarded SDL_USE_LIBDBUS
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_JACK
* Fix -Wundef warnings due to use of unguarded SDL_JOYSTICK_VIRTUAL
* Fix -Wundef warnings due to use of unguarded SDL_JOYSTICK_LINUX
* Fix -Wundef warnings due to use of unguarded HAVE_LIBC
* Fix -Wundef warnings due to disabling SDL_LIBC
* Fix -Wundef warnings due to use of unguarded HAVE_PLATFORM_BACKEND
* Fix -Wundef warnings due to use of unguarded DEBUG
* Fix -Wundef warnings due to use of unguarded HAVE_LINUX_INPUT_H
* Fix -Werror=unused-variable when building with SDL_LIBC=OFF
* Fix -Wundef warnings due to use of unguqrded SDL_USE_LIBUDEV
* Use SDL alloc functions in libusb/hid.c
* Fix -Wundef warnings due to use of unguarded HAVE_LIBUDEV_H
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_VULKAN
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_OFFSCREEN
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_RENDER_OGL
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_OPENGL
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_OPENGL_GLX
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_OPENGL_ES
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_OPENGL_ES2
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_RENDER_OGL_ES2
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_OSS
* Remove SDL_AUDIO_DRIVER_SUNAUDIO reference since it is never set
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_PIPEWIRE
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_PULSEAUDIO
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_X11_XCURSOR
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_X11_XDBE
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_X11_XFIXES
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_X11_XINPUT2
* Fix -Wundef warnings due to use of unguarded #if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
* Fix -Wundef warnings due to use of unguarded #if SDL_VIDEO_DRIVER_X11_XRANDR
* Fix -Wundef warnings due to use of unguarded #if SDL_VIDEO_DRIVER_X11_XSCRNSAVER
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_X11_XSHAPE
* Don't call XShape functions when XShape is diabled
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_WAYLAND
* Fix -Wundef warnings due to use of unuarded SDL_VIDEO_DRIVER_X11
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_RISCOS
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_OPENGL_EGL
* Disable array when compiled with SDL_EVENTS=OFF
* Fix -Wundef warnings due to use of unguarded SDL_INPUT_LINUXEV
* Fix -Wundef warnings due to use of unguarded SDL_THREAD_PTHREAD
* Fix -Wundef warnings due to use of unguarded SDL_THREAD_WINDOWS
* Fix -Wundef warnings due to use of unguarded SDL_THREAD_PS2
* Fix -Wundef warnings due to use of unguarded SDL_THREAD_PSP
* Fix -Wundef warnings due to use of unguarded SDL_THREAD_VITA
* Fix -Wundef warnings due to use of unguarded SDL_THREAD_N3DS
* Fix -Wundef warnings due to use of unguarded SDL_THREAD_STDCPP
* Fix -Wundef warnings due to use of unguarded SDL_THREAD_NGAGE
* Fix -Wundef warnings due to use of unguarded __WINDOWS__
* Fix -Wundef warnings due to use of unguarded __WINGDK__
* Fix -Wundef warnings due to use of unguarded __ANDROID__
* Fix -Wundef warnings due to use of unguarded SDL_THREAD_GENERIC_COND_SUFFIX
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_VITA_PIB
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_VITA_PVR
* Fix -Wundef warnings due to use of unguarded SDL_FILE_DISABLED
* Fix -Wundef warnings due to use of unguarded __XBOXONE__
* Fix -Wundef warnings due to use of unguarded __XBOXSERIES__
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_OPENGL_WGL
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_QNX
* Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_DISK
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_QNX
* Fix -Wundef warnings due to use of unguarded DEBUG_RAZOR
* Fix -Wundef warnings due to use of unguarded WINAPI_FAMILY_PHONE_APP
* Fix -Wundef warnings due to use of unguarded SDL_MAC_NO_SANDBOX
* Fix -Wundef warnings due to use of unguarded __(IPHONE|APPLETV|MAC)_OS_VERSION_MAX_ALLOWED
* Fix C4090 warning ('function': different 'const' qualifiers)
* ci: use -isystem for include dirs of pspdev toolchain
* cmake: add -Wundef option
* Fix remaining -Wundef warnings due to use of unguarded SDL_VIDEO_VULKAN and SDL_VIDEO_METAL
* Fix -Wundef warnings due to use of unguarded __MACOS__
* DEBUG_CONVERT is guaranteed to be defined in src/audio/SDL_audiocvt.c
* Fix -Wundef warnings due to use of unguarded HAVE_NANOSLEEP
* Fix -Wundef warnings due to use of unguarded HAVE_DXGI_H
* Fix -Wundef warnings due to use of unguarded HAVE_LINUX_INPUT_H
* fix SDL_VIDEO_DRIVER_WAYLAND
* fix SDL_VIDEO_DRIVER_X11
* Fix -Wundef warnings due to use of unguarded HAVE_MMDEVICEAPI_H
* Fix -Wundef warnings due to use of unguarded HAVE_PTHREAD_SETNAME_NP
* Fix -Wundef warnings due to use of unguarded HAVE_PTHREAD_SET_NAME_NP
* Fix -Wundef warnings due to use of unguarded HAVE_SETJMP
* Fix -Wundef warnings due to use of unguarded HAVE_SIGNAL_H
* Fix -Wundef warnings due to use of unguarded HAVE_TPCSHRD_H
* Fix -Wundef warnings due to use of unguarded MACOSX_COREAUDIO
* Fix -Wundef warnings due to use of unguarded SDL_HAPTIC_DINPUT
* Fix -Wundef warnings due to use of unguarded SDL_HAPTIC_IOKIT
* Fix -Wundef warnings due to use of unguarded SDL_HAPTIC_XINPUT
* Fix -Wundef warnings due to use of unguarded SDL_IPHONE_KEYBOARD
* Fix -Wundef warnings due to use of unguarded SDL_JOYSTICK_RAWINPUT
* Fix -Wundef warnings due to use of unguarded SDL_POWER_ANDROID
* Fix -Wundef warnings due to use of unguarded SDL_POWER_EMSCRIPTEN
* Fix -Wundef warnings due to use of unguarded SDL_POWER_HAIKU
* Fix -Wundef warnings due to use of unguarded SDL_POWER_LINUX
* Fix -Wundef warnings due to use of unguarded SDL_POWER_MACOSX
* Fix -Wundef warnings due to use of unguarded SDL_POWER_PSP
* Fix -Wundef warnings due to use of unguarded SDL_POWER_UIKIT
* Fix -Wundef warnings due to use of unguarded SDL_POWER_VITA
* Fix -Wundef warnings due to use of unguarded SDL_POWER_WINDOWS
* Fix -Wundef warnings due to use of unguarded SDL_THREAD_PTHREAD_RECURSIVE_MUTEX
* Fix -Wundef warnings due to use of unguarded SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_VIVANTE_VDK
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_WAYLAND
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_OPENGL_CGL
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_OPENGL_EGL
* Fix -Wundef warnings due to use of unguarded __MACOS__
* Fix -Wundef warnings due to use of unguarded __OpenBSD__
* Fix -Wundef warnings due to use of unguarded __FreeBSD__
* Fix -Wundef warnings due to use of unguarded __MWERKS__
* Fix -Wundef warnings due to use of unguarded __WIN32__
* Fix -Wundef warnings due to use of unguarded SDL_IPHONE_LAUNCHSCREEN
* Fix -Wundef warnings due to use of unguarded SDL_VIDEO_OPENGL_ES2
* Remove unused HAVE_CONST, HAVE_INLINE and HAVE_VOLATILE
* Revert "Use SDL alloc functions in libusb/hid.c"
This reverts commit 847c64b00da12ca08bef9e947eb948e378eeaef8.
* Handle FAKE_RECURSIVE_MUTEX in similar way as SDL2
* Don't use defined in macro
This commit is contained in:
committed by
GitHub
parent
c3d3c2c672
commit
3472dc11d6
@@ -1050,7 +1050,7 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeSurfaceChanged)(JNIEnv *env, j
|
||||
{
|
||||
SDL_LockMutex(Android_ActivityMutex);
|
||||
|
||||
#if SDL_VIDEO_OPENGL_EGL
|
||||
#ifdef SDL_VIDEO_OPENGL_EGL
|
||||
if (Android_Window) {
|
||||
SDL_VideoDevice *_this = SDL_GetVideoDevice();
|
||||
SDL_WindowData *data = Android_Window->driverdata;
|
||||
@@ -1092,7 +1092,7 @@ retry:
|
||||
}
|
||||
}
|
||||
|
||||
#if SDL_VIDEO_OPENGL_EGL
|
||||
#ifdef SDL_VIDEO_OPENGL_EGL
|
||||
if (data->egl_surface != EGL_NO_SURFACE) {
|
||||
SDL_EGL_DestroySurface(_this, data->egl_surface);
|
||||
data->egl_surface = EGL_NO_SURFACE;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <Path.h>
|
||||
#include <InterfaceKit.h>
|
||||
#include <LocaleRoster.h>
|
||||
#if SDL_VIDEO_OPENGL
|
||||
#ifdef SDL_VIDEO_OPENGL
|
||||
#include <OpenGLKit.h>
|
||||
#endif
|
||||
|
||||
@@ -78,7 +78,7 @@ class SDL_BApp : public BApplication
|
||||
public:
|
||||
SDL_BApp(const char *signature) : BApplication(signature)
|
||||
{
|
||||
#if SDL_VIDEO_OPENGL
|
||||
#ifdef SDL_VIDEO_OPENGL
|
||||
_current_context = NULL;
|
||||
#endif
|
||||
}
|
||||
@@ -202,7 +202,7 @@ class SDL_BApp : public BApplication
|
||||
return _window_map[winID];
|
||||
}
|
||||
|
||||
#if SDL_VIDEO_OPENGL
|
||||
#ifdef SDL_VIDEO_OPENGL
|
||||
BGLView *GetCurrentContext()
|
||||
{
|
||||
return _current_context;
|
||||
@@ -422,7 +422,7 @@ class SDL_BApp : public BApplication
|
||||
/* Members */
|
||||
std::vector<SDL_Window *> _window_map; /* Keeps track of SDL_Windows by index-id */
|
||||
|
||||
#if SDL_VIDEO_OPENGL
|
||||
#ifdef SDL_VIDEO_OPENGL
|
||||
BGLView *_current_context;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "SDL_sandbox.h"
|
||||
#include "../../stdlib/SDL_vacopy.h"
|
||||
|
||||
#if SDL_USE_LIBDBUS
|
||||
#ifdef SDL_USE_LIBDBUS
|
||||
/* we never link directly to libdbus. */
|
||||
static const char *dbus_library = "libdbus-1.so.3";
|
||||
static void *dbus_handle = NULL;
|
||||
|
||||
@@ -124,7 +124,7 @@ static void SDL_EVDEV_sync_device(SDL_evdevlist_item *item);
|
||||
static int SDL_EVDEV_device_removed(const char *dev_path);
|
||||
|
||||
static int SDL_EVDEV_device_added(const char *dev_path, int udev_class);
|
||||
#if SDL_USE_LIBUDEV
|
||||
#ifdef SDL_USE_LIBUDEV
|
||||
static void SDL_EVDEV_udev_callback(SDL_UDEV_deviceevent udev_event, int udev_class, const char *dev_path);
|
||||
#endif /* SDL_USE_LIBUDEV */
|
||||
|
||||
@@ -153,7 +153,7 @@ int SDL_EVDEV_Init(void)
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
#if SDL_USE_LIBUDEV
|
||||
#ifdef SDL_USE_LIBUDEV
|
||||
if (SDL_UDEV_Init() < 0) {
|
||||
SDL_free(_this);
|
||||
_this = NULL;
|
||||
@@ -216,7 +216,7 @@ void SDL_EVDEV_Quit(void)
|
||||
_this->ref_count -= 1;
|
||||
|
||||
if (_this->ref_count < 1) {
|
||||
#if SDL_USE_LIBUDEV
|
||||
#ifdef SDL_USE_LIBUDEV
|
||||
SDL_UDEV_DelCallback(SDL_EVDEV_udev_callback);
|
||||
SDL_UDEV_Quit();
|
||||
#endif /* SDL_USE_LIBUDEV */
|
||||
@@ -237,7 +237,7 @@ void SDL_EVDEV_Quit(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if SDL_USE_LIBUDEV
|
||||
#ifdef SDL_USE_LIBUDEV
|
||||
static void SDL_EVDEV_udev_callback(SDL_UDEV_deviceevent udev_event, int udev_class,
|
||||
const char *dev_path)
|
||||
{
|
||||
@@ -280,7 +280,7 @@ void SDL_EVDEV_Poll(void)
|
||||
return;
|
||||
}
|
||||
|
||||
#if SDL_USE_LIBUDEV
|
||||
#ifdef SDL_USE_LIBUDEV
|
||||
SDL_UDEV_Poll();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "SDL_evdev_capabilities.h"
|
||||
|
||||
#if HAVE_LINUX_INPUT_H
|
||||
#ifdef HAVE_LINUX_INPUT_H
|
||||
|
||||
/* missing defines in older Linux kernel headers */
|
||||
#ifndef BTN_TRIGGER_HAPPY
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#ifndef SDL_evdev_capabilities_h_
|
||||
#define SDL_evdev_capabilities_h_
|
||||
|
||||
#if HAVE_LINUX_INPUT_H
|
||||
#ifdef HAVE_LINUX_INPUT_H
|
||||
|
||||
#include <linux/input.h>
|
||||
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
#ifdef HAVE_IBUS_IBUS_H
|
||||
#include "SDL_ibus.h"
|
||||
#include "SDL_dbus.h"
|
||||
|
||||
#ifdef SDL_USE_LIBDBUS
|
||||
|
||||
#include "../../video/SDL_sysvideo.h"
|
||||
#include "../../events/SDL_keyboard_c.h"
|
||||
|
||||
@@ -748,4 +751,6 @@ void SDL_IBus_PumpEvents(void)
|
||||
}
|
||||
}
|
||||
|
||||
#endif // SDL_USE_LIBDBUS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#ifdef __LINUX__
|
||||
|
||||
#if !SDL_THREADS_DISABLED
|
||||
#ifndef SDL_THREADS_DISABLED
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <pthread.h>
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#include "SDL_dbus.h"
|
||||
|
||||
#if SDL_USE_LIBDBUS
|
||||
#ifdef SDL_USE_LIBDBUS
|
||||
|
||||
/* d-bus queries to org.freedesktop.RealtimeKit1. */
|
||||
#define RTKIT_DBUS_NODE "org.freedesktop.RealtimeKit1"
|
||||
@@ -251,14 +251,14 @@ static SDL_bool rtkit_setpriority_realtime(pid_t thread, int rt_priority)
|
||||
/* this is a public symbol, so it has to exist even if threads are disabled. */
|
||||
int SDL_LinuxSetThreadPriority(Sint64 threadID, int priority)
|
||||
{
|
||||
#if SDL_THREADS_DISABLED
|
||||
#ifdef SDL_THREADS_DISABLED
|
||||
return SDL_Unsupported();
|
||||
#else
|
||||
if (setpriority(PRIO_PROCESS, (id_t)threadID, priority) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if SDL_USE_LIBDBUS
|
||||
#ifdef SDL_USE_LIBDBUS
|
||||
/* Note that this fails you most likely:
|
||||
* Have your process's scheduler incorrectly configured.
|
||||
See the requirements at:
|
||||
@@ -283,7 +283,7 @@ int SDL_LinuxSetThreadPriority(Sint64 threadID, int priority)
|
||||
/* this is a public symbol, so it has to exist even if threads are disabled. */
|
||||
int SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy)
|
||||
{
|
||||
#if SDL_THREADS_DISABLED
|
||||
#ifdef SDL_THREADS_DISABLED
|
||||
return SDL_Unsupported();
|
||||
#else
|
||||
int osPriority;
|
||||
@@ -314,7 +314,7 @@ int SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int sc
|
||||
}
|
||||
}
|
||||
|
||||
#if SDL_USE_LIBDBUS
|
||||
#ifdef SDL_USE_LIBDBUS
|
||||
/* Note that this fails you most likely:
|
||||
* Have your process's scheduler incorrectly configured.
|
||||
See the requirements at:
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#ifndef SDL_udev_h_
|
||||
#define SDL_udev_h_
|
||||
|
||||
#if HAVE_LIBUDEV_H && HAVE_LINUX_INPUT_H
|
||||
#if defined(HAVE_LIBUDEV_H) && defined(HAVE_LINUX_INPUT_H)
|
||||
|
||||
#ifndef SDL_USE_LIBUDEV
|
||||
#define SDL_USE_LIBUDEV 1
|
||||
|
||||
@@ -39,7 +39,7 @@ using namespace Windows::System;
|
||||
using namespace Windows::UI::Core;
|
||||
using namespace Windows::UI::Input;
|
||||
|
||||
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#if SDL_WINAPI_FAMILY_PHONE
|
||||
using namespace Windows::Phone::UI::Input;
|
||||
#endif
|
||||
|
||||
@@ -59,7 +59,7 @@ extern "C" {
|
||||
#include "SDL_winrtapp_common.h"
|
||||
#include "SDL_winrtapp_direct3d.h"
|
||||
|
||||
#if SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED
|
||||
#if defined(SDL_VIDEO_RENDER_D3D11) && !defined(SDL_RENDER_DISABLED)
|
||||
/* Calling IDXGIDevice3::Trim on the active Direct3D 11.x device is necessary
|
||||
* when Windows 8.1 apps are about to get suspended.
|
||||
*/
|
||||
@@ -121,7 +121,7 @@ static void WINRT_ProcessWindowSizeChange() // TODO: Pass an SDL_Window-identify
|
||||
int w = (int)SDL_floorf(data->coreWindow->Bounds.Width);
|
||||
int h = (int)SDL_floorf(data->coreWindow->Bounds.Height);
|
||||
|
||||
#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) && (NTDDI_VERSION == NTDDI_WIN8)
|
||||
#if SDL_WINAPI_FAMILY_PHONE && NTDDI_VERSION == NTDDI_WIN8
|
||||
/* WinPhone 8.0 always keeps its native window size in portrait,
|
||||
regardless of orientation. This changes in WinPhone 8.1,
|
||||
in which the native window's size changes along with
|
||||
@@ -222,7 +222,7 @@ void SDL_WinRTApp::OnOrientationChanged(Object ^ sender)
|
||||
|
||||
WINRT_ProcessWindowSizeChange();
|
||||
|
||||
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#if SDL_WINAPI_FAMILY_PHONE
|
||||
// HACK: Make sure that orientation changes
|
||||
// lead to the Direct3D renderer's viewport getting updated:
|
||||
//
|
||||
@@ -268,7 +268,7 @@ void SDL_WinRTApp::SetWindow(CoreWindow ^ window)
|
||||
window->Closed +=
|
||||
ref new TypedEventHandler<CoreWindow ^, CoreWindowEventArgs ^>(this, &SDL_WinRTApp::OnWindowClosed);
|
||||
|
||||
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
|
||||
#if !SDL_WINAPI_FAMILY_PHONE
|
||||
window->PointerCursor = ref new CoreCursor(CoreCursorType::Arrow, 0);
|
||||
#endif
|
||||
|
||||
@@ -290,7 +290,7 @@ void SDL_WinRTApp::SetWindow(CoreWindow ^ window)
|
||||
window->PointerWheelChanged +=
|
||||
ref new TypedEventHandler<CoreWindow ^, PointerEventArgs ^>(this, &SDL_WinRTApp::OnPointerWheelChanged);
|
||||
|
||||
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
|
||||
#if !SDL_WINAPI_FAMILY_PHONE
|
||||
// Retrieves relative-only mouse movements:
|
||||
Windows::Devices::Input::MouseDevice::GetForCurrentView()->MouseMoved +=
|
||||
ref new TypedEventHandler<MouseDevice ^, MouseEventArgs ^>(this, &SDL_WinRTApp::OnMouseMoved);
|
||||
@@ -308,7 +308,7 @@ void SDL_WinRTApp::SetWindow(CoreWindow ^ window)
|
||||
#if NTDDI_VERSION >= NTDDI_WIN10
|
||||
Windows::UI::Core::SystemNavigationManager::GetForCurrentView()->BackRequested +=
|
||||
ref new EventHandler<BackRequestedEventArgs ^>(this, &SDL_WinRTApp::OnBackButtonPressed);
|
||||
#elif WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#elif SDL_WINAPI_FAMILY_PHONE
|
||||
HardwareButtons::BackPressed +=
|
||||
ref new EventHandler<BackPressedEventArgs ^>(this, &SDL_WinRTApp::OnBackButtonPressed);
|
||||
#endif
|
||||
@@ -545,7 +545,7 @@ void SDL_WinRTApp::OnWindowActivated(CoreWindow ^ sender, WindowActivatedEventAr
|
||||
Don't do it on WinPhone 8.0 though, as CoreWindow's 'PointerPosition'
|
||||
property isn't available.
|
||||
*/
|
||||
#if (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) || (NTDDI_VERSION >= NTDDI_WINBLUE)
|
||||
#if !SDL_WINAPI_FAMILY_PHONE || NTDDI_VERSION >= NTDDI_WINBLUE
|
||||
Point cursorPos = WINRT_TransformCursorPosition(window, sender->PointerPosition, TransformToSDLWindowSize);
|
||||
SDL_SendMouseMotion(0, window, 0, 0, cursorPos.X, cursorPos.Y);
|
||||
#endif
|
||||
@@ -618,7 +618,7 @@ void SDL_WinRTApp::OnSuspending(Platform::Object ^ sender, SuspendingEventArgs ^
|
||||
// Let the Direct3D 11 renderer prepare for the app to be backgrounded.
|
||||
// This is necessary for Windows 8.1, possibly elsewhere in the future.
|
||||
// More details at: http://msdn.microsoft.com/en-us/library/windows/apps/Hh994929.aspx
|
||||
#if SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED
|
||||
#if defined(SDL_VIDEO_RENDER_D3D11) && !defined(SDL_RENDER_DISABLED)
|
||||
if (WINRT_GlobalSDLWindow) {
|
||||
SDL_Renderer *renderer = SDL_GetRenderer(WINRT_GlobalSDLWindow);
|
||||
if (renderer && (SDL_strcmp(renderer->info.name, "direct3d11") == 0)) {
|
||||
@@ -752,7 +752,7 @@ void SDL_WinRTApp::OnBackButtonPressed(Platform::Object ^ sender, Windows::UI::C
|
||||
{
|
||||
WINRT_OnBackButtonPressed(args);
|
||||
}
|
||||
#elif WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#elif SDL_WINAPI_FAMILY_PHONE
|
||||
void SDL_WinRTApp::OnBackButtonPressed(Platform::Object ^ sender, Windows::Phone::UI::Input::BackPressedEventArgs ^ args)
|
||||
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@ ref class SDL_WinRTApp sealed : public Windows::ApplicationModel::Core::IFramewo
|
||||
|
||||
#if NTDDI_VERSION >= NTDDI_WIN10
|
||||
void OnBackButtonPressed(Platform::Object ^ sender, Windows::UI::Core::BackRequestedEventArgs ^ args);
|
||||
#elif WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#elif SDL_WINAPI_FAMILY_PHONE
|
||||
void OnBackButtonPressed(Platform::Object ^ sender, Windows::Phone::UI::Input::BackPressedEventArgs ^ args);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ static void WINRT_OnRenderViaXAML(_In_ Platform::Object ^ sender, _In_ Platform:
|
||||
|
||||
int SDL_WinRTInitXAMLApp(int (*mainFunction)(int, char **), void *backgroundPanelAsIInspectable)
|
||||
{
|
||||
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#if SDL_WINAPI_FAMILY_PHONE
|
||||
return SDL_SetError("XAML support is not yet available in Windows Phone.");
|
||||
#else
|
||||
// Declare C++/CX namespaces:
|
||||
@@ -142,5 +142,5 @@ int SDL_WinRTInitXAMLApp(int (*mainFunction)(int, char **), void *backgroundPane
|
||||
|
||||
// All done, for now.
|
||||
return 0;
|
||||
#endif // WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP / else
|
||||
#endif // SDL_WINAPI_FAMILY_PHONE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user