Skip to content

Commit

Permalink
Port NME_LOCAL_TOOLKIT to mac
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugh Sanderson committed Jun 7, 2024
1 parent d8b4115 commit 25a61f6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions project/ToolkitBuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@
<compilerflag value="-DNME_SIMD_D" if="NME_SIMD_D" />
<compilerflag value="${NME_SIMD_D}" if="NME_SIMD_D" />
<compilerflag value="-I${ANGLE_DIR}/include" if="NME_ANGLE" />
<mflag value="-fobjc-arc" if="NME_LOCAL_TOOLKIT" />


<cache value="1" unless="winrpi" />
<cache value="1" asLibrary="true" if="winrpi NME_STATIC_LINK" />
Expand Down
10 changes: 8 additions & 2 deletions project/toolkit/sdl/configs/mac/SDL_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,15 @@
#ifndef SDL_VIDEO_OPENGL_ES2
#define SDL_VIDEO_OPENGL_ES2 1
#endif
#ifndef SDL_VIDEO_OPENGL_EGL
#define SDL_VIDEO_OPENGL_EGL 0

#ifdef SDL_VIDEO_OPENGL_EGL
#undef SDL_VIDEO_OPENGL_EGL
#endif

//#ifndef SDL_VIDEO_OPENGL_EGL
//#define SDL_VIDEO_OPENGL_EGL 0
//#endif

#ifndef SDL_VIDEO_OPENGL_CGL
#define SDL_VIDEO_OPENGL_CGL 1
#endif
Expand Down
8 changes: 5 additions & 3 deletions project/toolkit/sdl/files.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@
<compilerflag value="-msse2" unless="HXCPP_ARM64" />
<compilerflag value="-msse3" unless="HXCPP_ARM64" />
<compilerflag value="-mssse3" unless="HXCPP_ARM64" />
<compilerflag value="-fobjc-arc" />
<compilerflag value="-Wno-deprecated-register" />

</section>

Expand Down Expand Up @@ -313,7 +315,7 @@
</section>

<section if="android || ios || windows || rpi || tvos" >

<error value="poo" />
<file name="${NME_LIBSDL}src/video/SDL_egl.c" />
<file name="${NME_LIBSDL}src/render/opengles/SDL_render_gles.c" />
<file name="${NME_LIBSDL}src/render/opengles2/SDL_render_gles2.c" />
Expand Down Expand Up @@ -543,8 +545,9 @@
<section if="mac">

<file name="${NME_LIBSDL}src/audio/coreaudio/SDL_coreaudio.m" />
<file name="${NME_LIBSDL}src/joystick/darwin/SDL_sysjoystick.c" />
<file name="${NME_LIBSDL}src/haptic/darwin/SDL_syshaptic.c" />
<file name="${NME_LIBSDL}src/joystick/darwin/SDL_iokitjoystick.c" />
<file name="${NME_LIBSDL}src/joystick/iphoneos/SDL_mfijoystick.m" />
<file name="${NME_LIBSDL}src/hidapi/mac/hid.c" />
<file name="${NME_LIBSDL}src/power/macosx/SDL_syspower.c" />
<file name="${NME_LIBSDL}src/file/cocoa/SDL_rwopsbundlesupport.m" />
Expand All @@ -556,7 +559,6 @@
<file name="${NME_LIBSDL}src/video/cocoa/SDL_cocoametalview.m" />
<file name="${NME_LIBSDL}src/video/cocoa/SDL_cocoamodes.m" />
<file name="${NME_LIBSDL}src/video/cocoa/SDL_cocoamouse.m" />
<file name="${NME_LIBSDL}src/video/cocoa/SDL_cocoamousetap.m" />
<file name="${NME_LIBSDL}src/video/cocoa/SDL_cocoaopengl.m" />
<file name="${NME_LIBSDL}src/video/cocoa/SDL_cocoaopengles.m" />
<file name="${NME_LIBSDL}src/video/cocoa/SDL_cocoashape.m" />
Expand Down

0 comments on commit 25a61f6

Please sign in to comment.