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
@@ -294,7 +294,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
textwin = SDLTest_TextWindowCreate(0, 0, 640, 480);
|
||||
|
||||
#if __IOS__
|
||||
#ifdef __IOS__
|
||||
/* Creating the context creates the view, which we need to show keyboard */
|
||||
SDL_GL_CreateContext(window);
|
||||
#endif
|
||||
|
||||
@@ -277,7 +277,7 @@ int main(int argc, char *argv[])
|
||||
renderer = SDL_CreateRenderer(window, NULL, 0);
|
||||
SDL_RenderPresent(renderer);
|
||||
|
||||
#if __IOS__
|
||||
#ifdef __IOS__
|
||||
/* Creating the context creates the view, which we need to show keyboard */
|
||||
SDL_GL_CreateContext(window);
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <SDL3/SDL_main.h>
|
||||
#include <SDL3/SDL_test.h>
|
||||
|
||||
#if HAVE_SIGNAL_H
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
wave.spec.callback = NULL; /* we'll push audio. */
|
||||
|
||||
#if HAVE_SIGNAL_H
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
/* Set the signals */
|
||||
#ifdef SIGHUP
|
||||
(void)signal(SIGHUP, poked);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if HAVE_SIGNAL_H
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
@@ -196,7 +196,7 @@ int main(int argc, char *argv[])
|
||||
quit(1);
|
||||
}
|
||||
|
||||
#if HAVE_SIGNAL_H
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
/* Set the signals */
|
||||
#ifdef SIGHUP
|
||||
(void)signal(SIGHUP, poked);
|
||||
|
||||
@@ -193,7 +193,7 @@ static void kernel_doubles_add_cpu(double *dest, const double *a, const double *
|
||||
}
|
||||
}
|
||||
|
||||
#if SDL_MMX_INTRINSICS
|
||||
#if defined(SDL_MMX_INTRINSICS)
|
||||
SDL_TARGETING("mmx") static void kernel_ints_add_mmx(Sint32 *dest, const Sint32 *a, const Sint32 *b, size_t size) {
|
||||
for (; size >= 2; size -= 2, dest += 2, a += 2, b += 2) {
|
||||
*(__m64*)dest = _mm_add_pi32(*(__m64*)a, *(__m64*)b);
|
||||
@@ -205,7 +205,7 @@ SDL_TARGETING("mmx") static void kernel_ints_add_mmx(Sint32 *dest, const Sint32
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SDL_SSE_INTRINSICS
|
||||
#if defined(SDL_SSE_INTRINSICS)
|
||||
SDL_TARGETING("sse") static void kernel_floats_add_sse(float *dest, const float *a, const float *b, size_t size) {
|
||||
for (; size >= 4; size -= 4, dest += 4, a += 4, b += 4) {
|
||||
_mm_storeu_ps(dest, _mm_add_ps(_mm_loadu_ps(a), _mm_loadu_ps (b)));
|
||||
@@ -216,7 +216,7 @@ SDL_TARGETING("sse") static void kernel_floats_add_sse(float *dest, const float
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SDL_SSE2_INTRINSICS
|
||||
#if defined(SDL_SSE2_INTRINSICS)
|
||||
SDL_TARGETING("sse2") static void kernel_doubles_add_sse2(double *dest, const double *a, const double *b, size_t size) {
|
||||
for (; size >= 2; size -= 2, dest += 2, a += 2, b += 2) {
|
||||
_mm_storeu_pd(dest, _mm_add_pd(_mm_loadu_pd(a), _mm_loadu_pd(b)));
|
||||
@@ -227,7 +227,7 @@ SDL_TARGETING("sse2") static void kernel_doubles_add_sse2(double *dest, const do
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SDL_SSE3_INTRINSICS
|
||||
#if defined(SDL_SSE3_INTRINSICS)
|
||||
SDL_TARGETING("sse3") static void kernel_ints_add_sse3(Sint32 *dest, const Sint32 *a, const Sint32 *b, size_t size) {
|
||||
for (; size >= 4; size -= 4, dest += 4, a += 4, b += 4) {
|
||||
_mm_storeu_si128((__m128i*)dest, _mm_add_epi32(_mm_lddqu_si128((__m128i*)a), _mm_lddqu_si128((__m128i*)b)));
|
||||
@@ -238,7 +238,7 @@ SDL_TARGETING("sse3") static void kernel_ints_add_sse3(Sint32 *dest, const Sint3
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SDL_SSE4_1_INTRINSICS
|
||||
#if defined(SDL_SSE4_1_INTRINSICS)
|
||||
SDL_TARGETING("sse4.1") static void kernel_ints_mul_sse4_1(Sint32 *dest, const Sint32 *a, const Sint32 *b, size_t size) {
|
||||
for (; size >= 4; size -= 4, dest += 4, a += 4, b += 4) {
|
||||
_mm_storeu_si128((__m128i*)dest, _mm_mullo_epi32(_mm_lddqu_si128((__m128i*)a), _mm_lddqu_si128((__m128i*)b)));
|
||||
@@ -249,7 +249,7 @@ SDL_TARGETING("sse4.1") static void kernel_ints_mul_sse4_1(Sint32 *dest, const S
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SDL_SSE4_2_INTRINSICS
|
||||
#if defined(SDL_SSE4_2_INTRINSICS)
|
||||
SDL_TARGETING("sse4.2") static Uint32 calculate_crc32c_sse4_2(const char *text) {
|
||||
Uint32 crc32c = ~0;
|
||||
size_t len = SDL_strlen(text);
|
||||
@@ -280,7 +280,7 @@ SDL_TARGETING("sse4.2") static Uint32 calculate_crc32c_sse4_2(const char *text)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SDL_AVX_INTRINSICS
|
||||
#if defined(SDL_AVX_INTRINSICS)
|
||||
SDL_TARGETING("avx") static void kernel_floats_add_avx(float *dest, const float *a, const float *b, size_t size) {
|
||||
for (; size >= 8; size -= 8, dest += 8, a += 8, b += 8) {
|
||||
_mm256_storeu_ps(dest, _mm256_add_ps(_mm256_loadu_ps(a), _mm256_loadu_ps(b)));
|
||||
@@ -291,7 +291,7 @@ SDL_TARGETING("avx") static void kernel_floats_add_avx(float *dest, const float
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SDL_AVX2_INTRINSICS
|
||||
#if defined(SDL_AVX2_INTRINSICS)
|
||||
SDL_TARGETING("avx2") static void kernel_ints_add_avx2(Sint32 *dest, const Sint32 *a, const Sint32 *b, size_t size) {
|
||||
for (; size >= 8; size -= 8, dest += 8, a += 8, b += 8) {
|
||||
_mm256_storeu_si256((__m256i*)dest, _mm256_add_epi32(_mm256_loadu_si256((__m256i*)a), _mm256_loadu_si256((__m256i*)b)));
|
||||
@@ -302,7 +302,7 @@ SDL_TARGETING("avx2") static void kernel_ints_add_avx2(Sint32 *dest, const Sint3
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SDL_AVX512F_INTRINSICS
|
||||
#if defined(SDL_AVX512F_INTRINSICS)
|
||||
SDL_TARGETING("avx512f") static void kernel_floats_add_avx512f(float *dest, const float *a, const float *b, size_t size) {
|
||||
for (; size >= 16; size -= 16, dest += 16, a += 16, b += 16) {
|
||||
_mm512_storeu_ps(dest, _mm512_add_ps(_mm512_loadu_ps(a), _mm512_loadu_ps(b)));
|
||||
@@ -364,7 +364,7 @@ static int intrinsics_testMMX(void *arg)
|
||||
{
|
||||
if (SDL_HasMMX()) {
|
||||
SDLTest_AssertCheck(SDL_TRUE, "CPU of test machine has MMX support.");
|
||||
#if SDL_MMX_INTRINSICS
|
||||
#if defined(SDL_MMX_INTRINSICS)
|
||||
{
|
||||
size_t size;
|
||||
Sint32 *dest, *a, *b;
|
||||
@@ -392,7 +392,7 @@ static int intrinsics_testSSE(void *arg)
|
||||
{
|
||||
if (SDL_HasSSE()) {
|
||||
SDLTest_AssertCheck(SDL_TRUE, "CPU of test machine has SSE support.");
|
||||
#if SDL_SSE_INTRINSICS
|
||||
#if defined(SDL_SSE_INTRINSICS)
|
||||
{
|
||||
size_t size;
|
||||
float *dest, *a, *b;
|
||||
@@ -420,7 +420,7 @@ static int intrinsics_testSSE2(void *arg)
|
||||
{
|
||||
if (SDL_HasSSE2()) {
|
||||
SDLTest_AssertCheck(SDL_TRUE, "CPU of test machine has SSE2 support.");
|
||||
#if SDL_SSE2_INTRINSICS
|
||||
#if defined(SDL_SSE2_INTRINSICS)
|
||||
{
|
||||
size_t size;
|
||||
double *dest, *a, *b;
|
||||
@@ -448,7 +448,7 @@ static int intrinsics_testSSE3(void *arg)
|
||||
{
|
||||
if (SDL_HasSSE3()) {
|
||||
SDLTest_AssertCheck(SDL_TRUE, "CPU of test machine has SSE3 support.");
|
||||
#if SDL_SSE3_INTRINSICS
|
||||
#if defined(SDL_SSE3_INTRINSICS)
|
||||
{
|
||||
size_t size;
|
||||
Sint32 *dest, *a, *b;
|
||||
@@ -476,7 +476,7 @@ static int intrinsics_testSSE4_1(void *arg)
|
||||
{
|
||||
if (SDL_HasSSE41()) {
|
||||
SDLTest_AssertCheck(SDL_TRUE, "CPU of test machine has SSE4.1 support.");
|
||||
#if SDL_SSE4_1_INTRINSICS
|
||||
#if defined(SDL_SSE4_1_INTRINSICS)
|
||||
{
|
||||
size_t size;
|
||||
Sint32 *dest, *a, *b;
|
||||
@@ -504,7 +504,7 @@ static int intrinsics_testSSE4_2(void *arg)
|
||||
{
|
||||
if (SDL_HasSSE42()) {
|
||||
SDLTest_AssertCheck(SDL_TRUE, "CPU of test machine has SSE4.2 support.");
|
||||
#if SDL_SSE4_2_INTRINSICS
|
||||
#if defined(SDL_SSE4_2_INTRINSICS)
|
||||
{
|
||||
struct {
|
||||
const char *input;
|
||||
@@ -539,7 +539,7 @@ static int intrinsics_testAVX(void *arg)
|
||||
{
|
||||
if (SDL_HasAVX()) {
|
||||
SDLTest_AssertCheck(SDL_TRUE, "CPU of test machine has AVX support.");
|
||||
#if SDL_AVX_INTRINSICS
|
||||
#if defined(SDL_AVX_INTRINSICS)
|
||||
{
|
||||
size_t size;
|
||||
float *dest, *a, *b;
|
||||
@@ -567,7 +567,7 @@ static int intrinsics_testAVX2(void *arg)
|
||||
{
|
||||
if (SDL_HasAVX2()) {
|
||||
SDLTest_AssertCheck(SDL_TRUE, "CPU of test machine has AVX2 support.");
|
||||
#if SDL_AVX2_INTRINSICS
|
||||
#if defined(SDL_AVX2_INTRINSICS)
|
||||
{
|
||||
size_t size;
|
||||
Sint32 *dest, *a, *b;
|
||||
@@ -595,7 +595,7 @@ static int intrinsics_testAVX512F(void *arg)
|
||||
{
|
||||
if (SDL_HasAVX512F()) {
|
||||
SDLTest_AssertCheck(SDL_TRUE, "CPU of test machine has AVX512F support.");
|
||||
#if SDL_AVX512F_INTRINSICS
|
||||
#if defined(SDL_AVX512F_INTRINSICS)
|
||||
{
|
||||
size_t size;
|
||||
float *dest, *a, *b;
|
||||
|
||||
@@ -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 SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS) || defined(SDL_VIDEO_DRIVER_ANDROID) || defined(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 SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS) || defined(SDL_VIDEO_DRIVER_ANDROID) || defined(SDL_VIDEO_DRIVER_COCOA)
|
||||
error = SDL_GetError();
|
||||
SDLTest_AssertPass("Call to SDL_GetError()");
|
||||
SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
|
||||
|
||||
@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
|
||||
(void)SDL_snprintf(prefix, sizeof(prefix), " MODE %d", m);
|
||||
print_mode(prefix, modes[m]);
|
||||
}
|
||||
SDL_free(modes);
|
||||
SDL_free((void*)modes);
|
||||
|
||||
SDL_Log("\n");
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifdef SDL_DYNAMIC_API
|
||||
#undef SDL_DYNAMIC_API
|
||||
#endif
|
||||
#define SDL_DYNAMIC_API 0
|
||||
|
||||
#include "../src/SDL_internal.h"
|
||||
|
||||
@@ -29,7 +30,7 @@
|
||||
static int run_test(void);
|
||||
|
||||
/* FIXME: Need CMake tests for this */
|
||||
#if (HAVE_LIBUDEV_H || defined(SDL_JOYSTICK_LINUX)) && HAVE_LINUX_INPUT_H
|
||||
#if (defined(HAVE_LIBUDEV_H) || defined(SDL_JOYSTICK_LINUX)) && defined(HAVE_LINUX_INPUT_H)
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@ static GL_Context ctx;
|
||||
|
||||
static int LoadContext(GL_Context *data)
|
||||
{
|
||||
#if SDL_VIDEO_DRIVER_UIKIT
|
||||
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
#elif SDL_VIDEO_DRIVER_ANDROID
|
||||
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
#endif
|
||||
|
||||
|
||||
@@ -60,9 +60,9 @@ static GLES2_Context ctx;
|
||||
|
||||
static int LoadContext(GLES2_Context *data)
|
||||
{
|
||||
#if SDL_VIDEO_DRIVER_UIKIT
|
||||
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
#elif SDL_VIDEO_DRIVER_ANDROID
|
||||
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
#endif
|
||||
|
||||
|
||||
@@ -62,9 +62,9 @@ static GLES2_Context ctx;
|
||||
|
||||
static int LoadContext(GLES2_Context *data)
|
||||
{
|
||||
#if SDL_VIDEO_DRIVER_UIKIT
|
||||
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
#elif SDL_VIDEO_DRIVER_ANDROID
|
||||
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
#endif
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#ifdef HAVE_SDL_TTF
|
||||
#ifdef __MACOS__
|
||||
#define DEFAULT_FONT "/System/Library/Fonts/华文细黑.ttf"
|
||||
#elif __WIN32__
|
||||
#elif defined(__WIN32__)
|
||||
/* Some japanese font present on at least Windows 8.1. */
|
||||
#define DEFAULT_FONT "C:\\Windows\\Fonts\\yugothic.ttf"
|
||||
#else
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifdef SDL_DYNAMIC_API
|
||||
#undef SDL_DYNAMIC_API
|
||||
#endif
|
||||
#define SDL_DYNAMIC_API 0
|
||||
|
||||
#include "../src/SDL_internal.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user