summaryrefslogtreecommitdiffhomepage
path: root/patches/sdl2-2.0.12_pre.local.patch
blob: 47caeaf3e594018018e50a58d75fd8ee533d7585 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
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)
 {