Skip to content

Commit

Permalink
Fixed 'sdl2' module makefile on MacOSX Mojave
Browse files Browse the repository at this point in the history
  • Loading branch information
seyhajin committed Jun 5, 2019
1 parent 2246ff3 commit 2f4f01d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 9 deletions.
4 changes: 2 additions & 2 deletions modules/sdl2/SDL/include/SDL_config_macosx.h
Expand Up @@ -155,7 +155,7 @@

/* Enable various video drivers */
#define SDL_VIDEO_DRIVER_COCOA 1
#define SDL_VIDEO_DRIVER_DUMMY 1
#define SDL_VIDEO_DRIVER_DUMMY 0 //!\\ sey was here! (from 1 to 0)
#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"
Expand Down Expand Up @@ -188,7 +188,7 @@
#endif

#ifndef SDL_VIDEO_RENDER_OGL_ES2
#define SDL_VIDEO_RENDER_OGL_ES2 1
#define SDL_VIDEO_RENDER_OGL_ES2 0 //!\\ sey was here! (from 1 to 0)
#endif

#ifndef SDL_VIDEO_RENDER_METAL
Expand Down
2 changes: 1 addition & 1 deletion modules/sdl2/SDL/src/hidapi/mac/hid.c
Expand Up @@ -34,7 +34,7 @@
#include <sys/time.h>
#include <unistd.h>

#include "hidapi.h"
#include "../hidapi/hidapi.h"

/* Barrier implementation because Mac OSX doesn't have pthread_barrier.
It also doesn't have clock_gettime(). So much for POSIX and SUSv2.
Expand Down
36 changes: 30 additions & 6 deletions modules/sdl2/makefile_macos.monkey2
Expand Up @@ -11,6 +11,15 @@ Namespace sdl2
#Import "<CoreAudio.framework>"
#Import "<IOKit.framework>"
#Import "<ForceFeedback.framework>"
#import "<Metal.framework>"

'src
#Import "SDL/src/SDL_assert.c"
#Import "SDL/src/SDL_error.c"
#Import "SDL/src/SDL_hints.c"
#Import "SDL/src/SDL_log.c"
#Import "SDL/src/SDL_dataqueue.c" 'v2.0.9
#Import "SDL/src/SDL.c"

'atomic
#Import "SDL/src/atomic/SDL_atomic.c"
Expand All @@ -27,6 +36,8 @@ Namespace sdl2
#Import "SDL/src/audio/coreaudio/SDL_coreaudio.m"
#Import "SDL/src/audio/dummy/SDL_dummyaudio.c"

#import "SDL/src/audio/disk/SDL_diskaudio.c"

'cpuinfo
#Import "SDL/src/cpuinfo/SDL_cpuinfo.c"

Expand All @@ -53,6 +64,9 @@ Namespace sdl2

#Import "SDL/src/file/cocoa/SDL_rwopsbundlesupport.m"

'hdiapi
#import "SDL/src/hidapi/mac/hid.c"

'haptic
#Import "SDL/src/haptic/SDL_haptic.c"

Expand All @@ -64,6 +78,12 @@ Namespace sdl2

#Import "SDL/src/joystick/darwin/SDL_sysjoystick.c"

#import "SDL/src/joystick/hidapi/SDL_hidapijoystick.c" 'v2.0.9
#import "SDL/src/joystick/hidapi/SDL_hidapi_ps4.c" 'v2.0.9
#import "SDL/src/joystick/hidapi/SDL_hidapi_switch.c" 'v2.0.9
#import "SDL/src/joystick/hidapi/SDL_hidapi_xbox360.c" 'v2.0.9
#import "SDL/src/joystick/hidapi/SDL_hidapi_xboxone.c" 'v2.0.9

'loadso
#Import "SDL/src/loadso/dlopen/SDL_sysloadso.c"

Expand All @@ -85,6 +105,16 @@ Namespace sdl2
#Import "SDL/src/render/software/SDL_render_sw.c"
#Import "SDL/src/render/software/SDL_rotate.c"

#import "SDL/src/render/metal/SDL_render_metal.m" 'v2.0.9

#import "SDL/src/render/opengl/SDL_render_gl.c" 'v2.0.9
#import "SDL/src/render/opengl/SDL_shaders_gl.c" 'v2.0.9

#import "SDL/src/render/opengles/SDL_render_gles.c" 'v2.0.9

#import "SDL/src/render/opengles2/SDL_render_gles2.c" 'v2.0.9
#import "SDL/src/render/opengles2/SDL_shaders_gles2.c" 'v2.0.9

'sensor (v2.0.9)
#Import "SDL/src/sensor/SDL_sensor.c"
#Import "SDL/src/sensor/dummy/SDL_dummysensor.c"
Expand Down Expand Up @@ -149,9 +179,3 @@ Namespace sdl2
#Import "SDL/src/video/cocoa/SDL_cocoavulkan.m" 'v2.0.9
#Import "SDL/src/video/cocoa/SDL_cocoawindow.m"

'src
#Import "SDL/src/SDL_assert.c"
#Import "SDL/src/SDL_error.c"
#Import "SDL/src/SDL_hints.c"
#Import "SDL/src/SDL_log.c"
#Import "SDL/src/SDL.c"

0 comments on commit 2f4f01d

Please sign in to comment.