summaryrefslogtreecommitdiffhomepage
path: root/patches/sdl2-2.0.8_pre.local.patch
blob: 5e870924d074a2ad6a58c7f7bd530268e7f7061a (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
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.in	2020-09-27 15:02:24.837099348 +0200
@@ -1868,7 +1868,6 @@
 XITouchClassInfo *t;
             	],[
             	have_xinput2_multitouch=yes
-            	AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [])
                 SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
             	])
             	AC_MSG_RESULT($have_xinput2_multitouch)
@@ -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/Makefile.in SDL2-2.0.8/Makefile.in
--- SDL2-2.0.8.orig/Makefile.in	2018-03-01 17:34:41.000000000 +0100
+++ SDL2-2.0.8/Makefile.in	2020-09-27 14:14:34.616542401 +0200
@@ -124,7 +124,7 @@
 LT_REVISION = @LT_REVISION@
 LT_LDFLAGS  = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
 
-all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
+all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
 
 $(srcdir)/configure: $(srcdir)/configure.in
 	@echo "Warning, configure is out of date, please re-run autogen.sh"
@@ -167,11 +167,10 @@
 	    $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
 	fi
 
-install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
+install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
-	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
 install-data:
 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
 	$(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
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)
 {