Blob Blame History Raw
diff -ru SDL2-2.0.12.orig/configure.ac SDL2-2.0.12/configure.ac
--- SDL2-2.0.12.orig/configure.ac       2020-03-11 02:36:18.000000000 +0100
+++ SDL2-2.0.12/configure.ac    2020-10-07 12:42:16.906014070 +0200
@@ -1332,7 +1332,7 @@
         CFLAGS="$save_CFLAGS"

         if test x$have_arm_simd = xyes; then
-            AC_DEFINE(SDL_ARM_SIMD_BLITTERS)
+            AC_DEFINE([SDL_ARM_SIMD_BLITTERS], [1], [ ])
 dnl            SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.c"
             SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.S"
             WARN_ABOUT_ARM_SIMD_ASM_MIT="yes"
@@ -1371,7 +1371,7 @@
         CFLAGS="$save_CFLAGS"

         if test x$have_arm_neon = xyes; then
-            AC_DEFINE(SDL_ARM_NEON_BLITTERS)
+            AC_DEFINE([SDL_ARM_NEON_BLITTERS], [1], [ ])
 dnl            SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.c"
             SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.S"
             WARN_ABOUT_ARM_NEON_ASM_MIT="yes"
@@ -1927,7 +1927,7 @@
 XITouchClassInfo *t;
                     ],[
                     have_xinput2_multitouch=yes
-                    AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [])
+                    AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], [1], [ ])
                     SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
                     ])
                 AC_MSG_RESULT($have_xinput2_multitouch)
@@ -3094,11 +3094,11 @@

     AC_CHECK_HEADER(mmdeviceapi.h, have_wasapi=yes)
     if test x$have_wasapi = xyes; then
-        AC_DEFINE(HAVE_MMDEVICEAPI_H,1,[])
+        AC_DEFINE([HAVE_MMDEVICEAPI_H], [1], [ ])
     fi
     AC_CHECK_HEADER(audioclient.h,,have_wasapi=no)
     if test x$have_wasapi = xyes; then
-        AC_DEFINE(HAVE_AUDIOCLIENT_H,1,[])
+        AC_DEFINE([HAVE_AUDIOCLIENT_H], [1], [ ])
     fi

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