Bläddra i källkod

Cleaned up SDL2 makefiles a bit.

Mark Sibly 9 år sedan
förälder
incheckning
b7415974ff

+ 2 - 0
modules/sdl2/SDL/MARKS_FIXES.TXt

@@ -5,3 +5,5 @@
 
 * SDL_timer.c - fixed 'slippage' bug.
 
+* SDL_dynapi_procs.h - commented out references to direct3d.
+

+ 0 - 8
modules/sdl2/SDL/TWEAKS.txt

@@ -1,8 +0,0 @@
-
-Added acceptsFirstMouse to SDLView in SDL_cocoawindows.m...
-
-- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
-{
-    return YES;
-}
-

+ 3 - 39
modules/sdl2/SDL/include/SDL_config_macosx.h

@@ -110,9 +110,9 @@
 #define HAVE_ASIN 1
 
 /* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_COREAUDIO  1
 #define SDL_AUDIO_DRIVER_DISK   1
 #define SDL_AUDIO_DRIVER_DUMMY  1
+#define SDL_AUDIO_DRIVER_COREAUDIO  1
 
 /* Enable various input drivers */
 #define SDL_JOYSTICK_IOKIT  1
@@ -129,49 +129,13 @@
 #define SDL_TIMER_UNIX  1
 
 /* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_COCOA  1
 #define SDL_VIDEO_DRIVER_DUMMY  1
-#undef SDL_VIDEO_DRIVER_X11
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
-#define SDL_VIDEO_DRIVER_X11_XDBE 1
-#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
-#define SDL_VIDEO_DRIVER_X11_XRANDR 1
-#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
-#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
-#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
-#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
-
-#ifdef MAC_OS_X_VERSION_10_8
-/*
- * No matter the versions targeted, this is the 10.8 or later SDK, so you have
- *  to use the external Xquartz, which is a more modern Xlib. Previous SDKs
- *  used an older Xlib.
- */
-#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
-#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
-#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1
-#endif
-
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL    1
-#endif
+#define SDL_VIDEO_DRIVER_COCOA  1
 
 /* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
 #define SDL_VIDEO_OPENGL    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_CGL
 #define SDL_VIDEO_OPENGL_CGL    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_GLX
-#define SDL_VIDEO_OPENGL_GLX    1
-#endif
+#define SDL_VIDEO_RENDER_OGL    1
 
 /* Enable system power support */
 #define SDL_POWER_MACOSX 1

+ 17 - 17
modules/sdl2/SDL/include/SDL_config_windows.h

@@ -176,36 +176,36 @@ typedef unsigned int uintptr_t;
 #define SDL_TIMER_WINDOWS   1
 
 /* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_DUMMY  1
+#define SDL_VIDEO_DRIVER_DUMMY  	1
 #define SDL_VIDEO_DRIVER_WINDOWS    1
 
-#ifndef SDL_VIDEO_RENDER_D3D
-#define SDL_VIDEO_RENDER_D3D    0 // 1
+/* Enable OpenGL support */
+#ifndef SDL_VIDEO_OPENGL_ES2
+#define SDL_VIDEO_OPENGL_ES2    1
 #endif
-#ifndef SDL_VIDEO_RENDER_D3D11
-#define SDL_VIDEO_RENDER_D3D11	0
+#ifndef SDL_VIDEO_OPENGL_EGL
+#define SDL_VIDEO_OPENGL_EGL    1
 #endif
-
-/* Enable OpenGL support */
 #ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL    0 // 1
+#define SDL_VIDEO_OPENGL    	0
 #endif
 #ifndef SDL_VIDEO_OPENGL_WGL
-#define SDL_VIDEO_OPENGL_WGL    0 // 1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL    0 // 1
+#define SDL_VIDEO_OPENGL_WGL    0
 #endif
+
+/* Render support */
 #ifndef SDL_VIDEO_RENDER_OGL_ES2
 #define SDL_VIDEO_RENDER_OGL_ES2    1
 #endif
-#ifndef SDL_VIDEO_OPENGL_ES2
-#define SDL_VIDEO_OPENGL_ES2    1
+#ifndef SDL_VIDEO_RENDER_D3D
+#define SDL_VIDEO_RENDER_D3D    0
 #endif
-#ifndef SDL_VIDEO_OPENGL_EGL
-#define SDL_VIDEO_OPENGL_EGL    1
+#ifndef SDL_VIDEO_RENDER_D3D11
+#define SDL_VIDEO_RENDER_D3D11	0
+#endif
+#ifndef SDL_VIDEO_RENDER_OGL
+#define SDL_VIDEO_RENDER_OGL    0
 #endif
-
 
 /* Enable system power support */
 #define SDL_POWER_WINDOWS 1

+ 2 - 2
modules/sdl2/SDL/src/dynapi/SDL_dynapi_procs.h

@@ -69,8 +69,8 @@ SDL_DYNAPI_PROC(void,SDL_MemoryBarrierAcquire,(void),(),)
 #ifdef __WIN32__
 SDL_DYNAPI_PROC(int,SDL_RegisterApp,(char *a, Uint32 b, void *c),(a,b,c),return)
 SDL_DYNAPI_PROC(void,SDL_UnregisterApp,(void),(),)
-SDL_DYNAPI_PROC(int,SDL_Direct3D9GetAdapterIndex,(int a),(a),return)
-SDL_DYNAPI_PROC(IDirect3DDevice9*,SDL_RenderGetD3D9Device,(SDL_Renderer *a),(a),return)
+//SDL_DYNAPI_PROC(int,SDL_Direct3D9GetAdapterIndex,(int a),(a),return)
+//SDL_DYNAPI_PROC(IDirect3DDevice9*,SDL_RenderGetD3D9Device,(SDL_Renderer *a),(a),return)
 #endif
 
 #if defined(__IPHONEOS__) && __IPHONEOS__

+ 0 - 29
modules/sdl2/makefile_macos.monkey2

@@ -12,16 +12,12 @@ Namespace sdl2
 #Import "<IOKit.framework>"
 #Import "<ForceFeedback.framework>"
 
-'source files
 #Import "SDL/src/atomic/SDL_atomic.c"
 #Import "SDL/src/atomic/SDL_spinlock.c"
 
 #Import "SDL/src/audio/disk/SDL_diskaudio.c"
-
 #Import "SDL/src/audio/dummy/SDL_dummyaudio.c"
-
 #Import "SDL/src/audio/coreaudio/SDL_coreaudio.c"
-
 #Import "SDL/src/audio/SDL_audio.c"
 #Import "SDL/src/audio/SDL_audiocvt.c"
 #Import "SDL/src/audio/SDL_audiodev.c"
@@ -44,24 +40,19 @@ Namespace sdl2
 #Import "SDL/src/events/SDL_windowevents.c"
 
 #Import "SDL/src/filesystem/cocoa/SDL_sysfilesystem.m"
-
 #Import "SDL/src/file/cocoa/SDL_rwopsbundlesupport.m"
-
 #Import "SDL/src/file/SDL_rwops.c"
 
 #Import "SDL/src/haptic/darwin/SDL_syshaptic.c"
-
 #Import "SDL/src/haptic/SDL_haptic.c"
 
 #Import "SDL/src/joystick/darwin/SDL_sysjoystick.c"
-
 #Import "SDL/src/joystick/SDL_joystick.c"
 #Import "SDL/src/joystick/SDL_gamecontroller.c"
 
 #Import "SDL/src/loadso/dlopen/SDL_sysloadso.c"
 
 #Import "SDL/src/power/macosx/SDL_syspower.c"
-
 #Import "SDL/src/power/SDL_power.c"
 
 #Import "SDL/src/render/opengl/SDL_render_gl.c"
@@ -95,7 +86,6 @@ Namespace sdl2
 #Import "SDL/src/thread/SDL_thread.c"
 
 #Import "SDL/src/timer/unix/SDL_systimer.c"
-
 #Import "SDL/src/timer/SDL_timer.c"
 
 #Import "SDL/src/video/cocoa/SDL_cocoaclipboard.m"
@@ -109,28 +99,9 @@ Namespace sdl2
 #Import "SDL/src/video/cocoa/SDL_cocoashape.m"
 #Import "SDL/src/video/cocoa/SDL_cocoavideo.m"
 #Import "SDL/src/video/cocoa/SDL_cocoawindow.m"
-
 #Import "SDL/src/video/dummy/SDL_nullevents.c"
 #Import "SDL/src/video/dummy/SDL_nullframebuffer.c"
 #Import "SDL/src/video/dummy/SDL_nullvideo.c"
-
-#Import "SDL/src/video/x11/imKStoUCS.c"
-#Import "SDL/src/video/x11/SDL_x11clipboard.c"
-#Import "SDL/src/video/x11/SDL_x11dyn.c"
-#Import "SDL/src/video/x11/SDL_x11events.c"
-#Import "SDL/src/video/x11/SDL_x11framebuffer.c"
-#Import "SDL/src/video/x11/SDL_x11keyboard.c"
-#Import "SDL/src/video/x11/SDL_x11messagebox.c"
-#Import "SDL/src/video/x11/SDL_x11modes.c"
-#Import "SDL/src/video/x11/SDL_x11mouse.c"
-#Import "SDL/src/video/x11/SDL_x11opengl.c"
-#Import "SDL/src/video/x11/SDL_x11opengles.c"
-#Import "SDL/src/video/x11/SDL_x11shape.c"
-#Import "SDL/src/video/x11/SDL_x11touch.c"
-#Import "SDL/src/video/x11/SDL_x11video.c"
-#Import "SDL/src/video/x11/SDL_x11window.c"
-#Import "SDL/src/video/x11/SDL_x11xinput2.c"
-
 #Import "SDL/src/video/SDL_blit.c"
 #Import "SDL/src/video/SDL_blit_0.c"
 #Import "SDL/src/video/SDL_blit_1.c"

+ 48 - 53
modules/sdl2/makefile_windows.monkey2

@@ -21,16 +21,15 @@ Namespace sdl2
 #import "SDL/src/audio/disk/SDL_diskaudio.c"
 
 #import "SDL/src/audio/dummy/SDL_dummyaudio.c"
-
 #Import "SDL/src/audio/directsound/SDL_directsound.c"
-'#Import "SDL/src/audio/xaudio2/SDL_xaudio2.c"	'xaudio2.h is missing from MINGW!
+'#Import "SDL/src/audio/xaudio2/SDL_xaudio2.c"	'xaudio2.h is missing from MINGW?
 '#import "SDL/src/audio/winmm/SDL_winmm.c"
 
-#import "SDL/src/audio/SDL_audio.c"
-#import "SDL/src/audio/SDL_audiocvt.c"
-#import "SDL/src/audio/SDL_audiodev.c"
-#import "SDL/src/audio/SDL_audiotypecvt.c"
-#import "SDL/src/audio/SDL_mixer.c"
+#Import "SDL/src/audio/SDL_audio.c"
+#Import "SDL/src/audio/SDL_audiocvt.c"
+#Import "SDL/src/audio/SDL_audiodev.c"
+#Import "SDL/src/audio/SDL_audiotypecvt.c"
+#Import "SDL/src/audio/SDL_mixer.c"
 #import "SDL/src/audio/SDL_wave.c"
 
 #import "SDL/src/core/windows/SDL_windows.c"
@@ -72,45 +71,41 @@ Namespace sdl2
 
 #import "SDL/src/power/windows/SDL_syspower.c"
 
-#import "SDL/src/power/SDL_power.c"
-
-#Import "SDL/src/render/opengl/SDL_render_gl.c"
-#Import "SDL/src/render/opengl/SDL_shaders_gl.c"
+#Import "SDL/src/power/SDL_power.c"
 
+'GLES20 renderer...not used by mojo, but there if ya want it.
 #Import "SDL/src/render/opengles2/SDL_render_gles2.c"
 #Import "SDL/src/render/opengles2/SDL_shaders_gles2.c"
 
-#Import "SDL/src/render/direct3d/SDL_render_d3d.c"
-#Import "SDL/src/render/direct3d11/SDL_render_d3d11.c"
-
-#import "SDL/src/render/software/SDL_blendfillrect.c"
-#import "SDL/src/render/software/SDL_blendline.c"
-#import "SDL/src/render/software/SDL_blendpoint.c"
-#import "SDL/src/render/software/SDL_drawline.c"
-#import "SDL/src/render/software/SDL_drawpoint.c"
-#import "SDL/src/render/software/SDL_render_sw.c"
-#import "SDL/src/render/software/SDL_rotate.c"
+'Have to include SW renderer...?
+#Import "SDL/src/render/software/SDL_blendfillrect.c"
+#Import "SDL/src/render/software/SDL_blendline.c"
+#Import "SDL/src/render/software/SDL_blendpoint.c"
+#Import "SDL/src/render/software/SDL_drawline.c"
+#Import "SDL/src/render/software/SDL_drawpoint.c"
+#Import "SDL/src/render/software/SDL_render_sw.c"
+#Import "SDL/src/render/software/SDL_rotate.c"
 
-#import "SDL/src/render/SDL_d3dmath.c"
-#import "SDL/src/render/SDL_render.c"
-#import "SDL/src/render/SDL_yuv_mmx.c"
-#import "SDL/src/render/SDL_yuv_sw.c"
+#Import "SDL/src/render/SDL_d3dmath.c"
+#Import "SDL/src/render/SDL_render.c"
+#Import "SDL/src/render/SDL_yuv_mmx.c"
+#Import "SDL/src/render/SDL_yuv_sw.c"
 
 #Import "SDL/src/stdlib/SDL_getenv.c"
-#import "SDL/src/stdlib/SDL_iconv.c"
-#import "SDL/src/stdlib/SDL_malloc.c"
-#import "SDL/src/stdlib/SDL_qsort.c"
+#Import "SDL/src/stdlib/SDL_iconv.c"
+#Import "SDL/src/stdlib/SDL_malloc.c"
+#Import "SDL/src/stdlib/SDL_qsort.c"
 #Import "SDL/src/stdlib/SDL_stdlib.c"
-#import "SDL/src/stdlib/SDL_string.c"
+#Import "SDL/src/stdlib/SDL_string.c"
 
-#import "SDL/src/thread/generic/SDL_syscond.c"
+#Import "SDL/src/thread/generic/SDL_syscond.c"
 
-#import "SDL/src/thread/windows/SDL_sysmutex.c"
-#import "SDL/src/thread/windows/SDL_syssem.c"
-#import "SDL/src/thread/windows/SDL_systhread.c"
-#import "SDL/src/thread/windows/SDL_systls.c"
+#Import "SDL/src/thread/windows/SDL_sysmutex.c"
+#Import "SDL/src/thread/windows/SDL_syssem.c"
+#Import "SDL/src/thread/windows/SDL_systhread.c"
+#Import "SDL/src/thread/windows/SDL_systls.c"
 
-#import "SDL/src/thread/SDL_thread.c"
+#Import "SDL/src/thread/SDL_thread.c"
 
 #import "SDL/src/timer/windows/SDL_systimer.c"
 
@@ -149,7 +144,7 @@ Namespace sdl2
 #import "SDL/src/video/SDL_rect.c"
 #import "SDL/src/video/SDL_RLEaccel.c"
 #import "SDL/src/video/SDL_shape.c"
-#import "SDL/src/video/SDL_stretch.c"
+#Import "SDL/src/video/SDL_stretch.c"
 #import "SDL/src/video/SDL_surface.c"
 #import "SDL/src/video/SDL_video.c"
 
@@ -160,20 +155,20 @@ Namespace sdl2
 #Import "SDL/src/SDL.c"
 
 'Really?!?...
-#import "SDL/src/libm/e_atan2.c"
-#import "SDL/src/libm/e_log.c"
-#import "SDL/src/libm/e_pow.c"
-#import "SDL/src/libm/e_rem_pio2.c"
-#import "SDL/src/libm/e_sqrt.c"
-#import "SDL/src/libm/k_cos.c"
-#import "SDL/src/libm/k_rem_pio2.c"
-#import "SDL/src/libm/k_sin.c"
-#import "SDL/src/libm/k_tan.c"
-#import "SDL/src/libm/s_atan.c"
-#import "SDL/src/libm/s_copysign.c"
-#import "SDL/src/libm/s_cos.c"
-#import "SDL/src/libm/s_fabs.c"
-#import "SDL/src/libm/s_floor.c"
-#import "SDL/src/libm/s_scalbn.c"
-#import "SDL/src/libm/s_sin.c"
-#import "SDL/src/libm/s_tan.c"
+#Import "SDL/src/libm/e_atan2.c"
+#Import "SDL/src/libm/e_log.c"
+#Import "SDL/src/libm/e_pow.c"
+#Import "SDL/src/libm/e_rem_pio2.c"
+#Import "SDL/src/libm/e_sqrt.c"
+#Import "SDL/src/libm/k_cos.c"
+#Import "SDL/src/libm/k_rem_pio2.c"
+#Import "SDL/src/libm/k_sin.c"
+#Import "SDL/src/libm/k_tan.c"
+#Import "SDL/src/libm/s_atan.c"
+#Import "SDL/src/libm/s_copysign.c"
+#Import "SDL/src/libm/s_cos.c"
+#Import "SDL/src/libm/s_fabs.c"
+#Import "SDL/src/libm/s_floor.c"
+#Import "SDL/src/libm/s_scalbn.c"
+#Import "SDL/src/libm/s_sin.c"
+#Import "SDL/src/libm/s_tan.c"