Blame patches/sdl2-2.0.12_pre.local.patch

d7cf18
diff -ru SDL2-2.0.12.orig/configure.ac SDL2-2.0.12/configure.ac
d7cf18
--- SDL2-2.0.12.orig/configure.ac       2020-03-11 02:36:18.000000000 +0100
d7cf18
+++ SDL2-2.0.12/configure.ac    2020-10-07 12:42:16.906014070 +0200
d7cf18
@@ -1332,7 +1332,7 @@
d7cf18
         CFLAGS="$save_CFLAGS"
d7cf18
d7cf18
         if test x$have_arm_simd = xyes; then
d7cf18
-            AC_DEFINE(SDL_ARM_SIMD_BLITTERS)
d7cf18
+            AC_DEFINE([SDL_ARM_SIMD_BLITTERS], [1], [ ])
d7cf18
 dnl            SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.c"
d7cf18
             SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.S"
d7cf18
             WARN_ABOUT_ARM_SIMD_ASM_MIT="yes"
d7cf18
@@ -1371,7 +1371,7 @@
d7cf18
         CFLAGS="$save_CFLAGS"
d7cf18
d7cf18
         if test x$have_arm_neon = xyes; then
d7cf18
-            AC_DEFINE(SDL_ARM_NEON_BLITTERS)
d7cf18
+            AC_DEFINE([SDL_ARM_NEON_BLITTERS], [1], [ ])
d7cf18
 dnl            SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.c"
d7cf18
             SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.S"
d7cf18
             WARN_ABOUT_ARM_NEON_ASM_MIT="yes"
d7cf18
@@ -1927,7 +1927,7 @@
d7cf18
 XITouchClassInfo *t;
d7cf18
                     ],[
d7cf18
                     have_xinput2_multitouch=yes
d7cf18
-                    AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [])
d7cf18
+                    AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], [1], [ ])
d7cf18
                     SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
d7cf18
                     ])
d7cf18
                 AC_MSG_RESULT($have_xinput2_multitouch)
d7cf18
@@ -3094,11 +3094,11 @@
d7cf18
d7cf18
     AC_CHECK_HEADER(mmdeviceapi.h, have_wasapi=yes)
d7cf18
     if test x$have_wasapi = xyes; then
d7cf18
-        AC_DEFINE(HAVE_MMDEVICEAPI_H,1,[])
d7cf18
+        AC_DEFINE([HAVE_MMDEVICEAPI_H], [1], [ ])
d7cf18
     fi
d7cf18
     AC_CHECK_HEADER(audioclient.h,,have_wasapi=no)
d7cf18
     if test x$have_wasapi = xyes; then
d7cf18
-        AC_DEFINE(HAVE_AUDIOCLIENT_H,1,[])
d7cf18
+        AC_DEFINE([HAVE_AUDIOCLIENT_H], [1], [ ])
d7cf18
     fi
d7cf18
d7cf18
     AC_ARG_ENABLE(wasapi,
213fe0
diff -ru SDL2-2.0.8.orig/configure.in SDL2-2.0.8/configure.in
213fe0
--- SDL2-2.0.8.orig/configure.in	2018-03-01 17:34:41.000000000 +0100
d7cf18
+++ SDL2-2.0.8/configure.ac	2020-09-27 15:02:24.837099348 +0200
213fe0
@@ -2770,6 +2769,10 @@
213fe0
             pthread_cflags="-D_REENTRANT"
213fe0
             pthread_lib="-lpthread"
213fe0
             ;;
213fe0
+        *-*-midipix*)
213fe0
+            pthread_cflags="-D_REENTRANT"
213fe0
+            pthread_lib=""
213fe0
+            ;;
213fe0
         *-*-bsdi*)
213fe0
             pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
213fe0
             pthread_lib=""
213fe0
@@ -3484,6 +3487,67 @@
213fe0
         # Set up other core UNIX files
213fe0
         SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
213fe0
         ;;
213fe0
+    *-*-midipix*)
213fe0
+        ARCH=midipix
213fe0
+
213fe0
+        CheckWINDOWS
213fe0
+        # TODO: oh dear.
213fe0
+        #CheckWINDOWSGL
213fe0
+        #CheckWINDOWSGLES
213fe0
+        #CheckVulkan
213fe0
+        CheckDIRECTX
213fe0
+        CheckVisibilityHidden
213fe0
+        CheckDeclarationAfterStatement
213fe0
+        CheckDummyVideo
213fe0
+        CheckDiskAudio
213fe0
+        CheckDummyAudio
213fe0
+        CheckDLOPEN
213fe0
+        CheckPTHREAD
213fe0
+        CheckClockGettime
213fe0
+
213fe0
+        # Set up files for the video library
213fe0
+        if test x$enable_video = xyes; then
213fe0
+            AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS, 1, [ ])
213fe0
+            SOURCES="$SOURCES $srcdir/src/video/windows/*.c"
213fe0
+            have_video=yes
213fe0
+            AC_ARG_ENABLE(render-d3d,
213fe0
+AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]),
213fe0
+                                , enable_render_d3d=yes)
213fe0
+            if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then
213fe0
+                AC_DEFINE(SDL_VIDEO_RENDER_D3D, 1, [ ])
213fe0
+            fi
213fe0
+            if test x$enable_render_d3d = xyes -a x$have_d3d11 = xyes; then
213fe0
+                AC_DEFINE(SDL_VIDEO_RENDER_D3D11, 1, [ ])
213fe0
+            fi
213fe0
+        fi
213fe0
+
213fe0
+        # Set up files for the audio library
213fe0
+        # TODO: wasapi is missing entirely still
213fe0
+
213fe0
+        # Set up files for the haptic library
213fe0
+	# TODO: not sure.
213fe0
+
213fe0
+        # Set up files for the power library
213fe0
+        if test x$enable_power = xyes; then
213fe0
+            AC_DEFINE(SDL_POWER_WINDOWS, 1, [ ])
213fe0
+            SOURCES="$SOURCES $srcdir/src/power/windows/*.c"
213fe0
+            have_power=yes
213fe0
+        fi
213fe0
+        # Set up files for the filesystem library
213fe0
+        if test x$enable_filesystem = xyes; then
213fe0
+            AC_DEFINE(SDL_FILESYSTEM_UNIX, 1, [ ])
213fe0
+            SOURCES="$SOURCES $srcdir/src/filesystem/unix/*.c"
213fe0
+            have_filesystem=yes
213fe0
+        fi
213fe0
+        # Set up files for the timer library
213fe0
+        if test x$enable_timers = xyes; then
213fe0
+            AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
213fe0
+            SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
213fe0
+            have_timers=yes
213fe0
+        fi
213fe0
+
213fe0
+        SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
213fe0
+        ;;
213fe0
     *-*-cygwin* | *-*-mingw32*)
213fe0
         ARCH=win32
213fe0
         if test "$build" != "$host"; then # cross-compiling
213fe0
diff -ru SDL2-2.0.8.orig/src/dynapi/SDL_dynapi.c SDL2-2.0.8/src/dynapi/SDL_dynapi.c
213fe0
--- SDL2-2.0.8.orig/src/dynapi/SDL_dynapi.c	2018-03-01 17:34:42.000000000 +0100
213fe0
+++ SDL2-2.0.8/src/dynapi/SDL_dynapi.c	2020-09-27 14:14:34.616542401 +0200
213fe0
@@ -222,7 +222,7 @@
213fe0
     return retval;
213fe0
 }
213fe0
 
213fe0
-#elif defined(unix) || defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__) || defined(__QNX__)
213fe0
+#elif defined(unix) || defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__) || defined(__QNX__) || defined(__midipix__)
213fe0
 #include <dlfcn.h>
213fe0
 static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
213fe0
 {