ruby2d 0.9.5 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/assets/include/SDL2/SDL.h +4 -1
  3. data/assets/include/SDL2/SDL_assert.h +3 -1
  4. data/assets/include/SDL2/SDL_atomic.h +1 -1
  5. data/assets/include/SDL2/SDL_audio.h +1 -1
  6. data/assets/include/SDL2/SDL_bits.h +1 -1
  7. data/assets/include/SDL2/SDL_blendmode.h +4 -1
  8. data/assets/include/SDL2/SDL_clipboard.h +1 -1
  9. data/assets/include/SDL2/SDL_config.h +1 -1
  10. data/assets/include/SDL2/SDL_config_android.h +7 -3
  11. data/assets/include/SDL2/SDL_config_iphoneos.h +16 -10
  12. data/assets/include/SDL2/SDL_config_macosx.h +40 -14
  13. data/assets/include/SDL2/SDL_config_minimal.h +1 -1
  14. data/assets/include/SDL2/SDL_config_os2.h +26 -8
  15. data/assets/include/SDL2/SDL_config_pandora.h +4 -2
  16. data/assets/include/SDL2/SDL_config_psp.h +2 -1
  17. data/assets/include/SDL2/SDL_config_windows.h +40 -9
  18. data/assets/include/SDL2/SDL_config_winrt.h +5 -2
  19. data/assets/include/SDL2/SDL_config_wiz.h +5 -2
  20. data/assets/include/SDL2/SDL_copying.h +1 -1
  21. data/assets/include/SDL2/SDL_cpuinfo.h +32 -3
  22. data/assets/include/SDL2/SDL_egl.h +4 -1
  23. data/assets/include/SDL2/SDL_endian.h +6 -3
  24. data/assets/include/SDL2/SDL_error.h +38 -2
  25. data/assets/include/SDL2/SDL_events.h +64 -28
  26. data/assets/include/SDL2/SDL_filesystem.h +1 -1
  27. data/assets/include/SDL2/SDL_gamecontroller.h +160 -9
  28. data/assets/include/SDL2/SDL_gesture.h +1 -1
  29. data/assets/include/SDL2/SDL_haptic.h +10 -1
  30. data/assets/include/SDL2/SDL_hints.h +316 -4
  31. data/assets/include/SDL2/SDL_joystick.h +115 -24
  32. data/assets/include/SDL2/SDL_keyboard.h +1 -1
  33. data/assets/include/SDL2/SDL_keycode.h +11 -9
  34. data/assets/include/SDL2/SDL_loadso.h +1 -1
  35. data/assets/include/SDL2/SDL_locale.h +101 -0
  36. data/assets/include/SDL2/SDL_log.h +3 -3
  37. data/assets/include/SDL2/SDL_main.h +1 -1
  38. data/assets/include/SDL2/SDL_messagebox.h +6 -4
  39. data/assets/include/SDL2/SDL_metal.h +117 -0
  40. data/assets/include/SDL2/SDL_misc.h +75 -0
  41. data/assets/include/SDL2/SDL_mouse.h +1 -1
  42. data/assets/include/SDL2/SDL_mutex.h +1 -1
  43. data/assets/include/SDL2/SDL_name.h +1 -1
  44. data/assets/include/SDL2/SDL_opengl.h +1 -1
  45. data/assets/include/SDL2/SDL_opengl_glext.h +3 -0
  46. data/assets/include/SDL2/SDL_opengles.h +1 -1
  47. data/assets/include/SDL2/SDL_opengles2.h +1 -1
  48. data/assets/include/SDL2/SDL_pixels.h +25 -16
  49. data/assets/include/SDL2/SDL_platform.h +1 -1
  50. data/assets/include/SDL2/SDL_power.h +1 -1
  51. data/assets/include/SDL2/SDL_quit.h +1 -1
  52. data/assets/include/SDL2/SDL_rect.h +1 -1
  53. data/assets/include/SDL2/SDL_render.h +63 -3
  54. data/assets/include/SDL2/SDL_revision.h +2 -2
  55. data/assets/include/SDL2/SDL_rwops.h +2 -10
  56. data/assets/include/SDL2/SDL_scancode.h +1 -1
  57. data/assets/include/SDL2/SDL_sensor.h +25 -9
  58. data/assets/include/SDL2/SDL_shape.h +1 -1
  59. data/assets/include/SDL2/SDL_stdinc.h +44 -4
  60. data/assets/include/SDL2/SDL_surface.h +11 -2
  61. data/assets/include/SDL2/SDL_system.h +50 -4
  62. data/assets/include/SDL2/SDL_syswm.h +29 -2
  63. data/assets/include/SDL2/SDL_test.h +1 -1
  64. data/assets/include/SDL2/SDL_test_assert.h +1 -1
  65. data/assets/include/SDL2/SDL_test_common.h +14 -1
  66. data/assets/include/SDL2/SDL_test_compare.h +1 -1
  67. data/assets/include/SDL2/SDL_test_crc32.h +1 -1
  68. data/assets/include/SDL2/SDL_test_font.h +1 -1
  69. data/assets/include/SDL2/SDL_test_fuzzer.h +1 -1
  70. data/assets/include/SDL2/SDL_test_harness.h +1 -1
  71. data/assets/include/SDL2/SDL_test_images.h +1 -1
  72. data/assets/include/SDL2/SDL_test_log.h +1 -1
  73. data/assets/include/SDL2/SDL_test_md5.h +1 -1
  74. data/assets/include/SDL2/SDL_test_memory.h +1 -1
  75. data/assets/include/SDL2/SDL_test_random.h +1 -1
  76. data/assets/include/SDL2/SDL_thread.h +34 -11
  77. data/assets/include/SDL2/SDL_timer.h +1 -1
  78. data/assets/include/SDL2/SDL_touch.h +1 -1
  79. data/assets/include/SDL2/SDL_types.h +1 -1
  80. data/assets/include/SDL2/SDL_version.h +2 -2
  81. data/assets/include/SDL2/SDL_video.h +11 -5
  82. data/assets/include/SDL2/SDL_vulkan.h +6 -8
  83. data/assets/include/SDL2/begin_code.h +5 -9
  84. data/assets/include/SDL2/close_code.h +1 -1
  85. data/assets/macos/lib/libFLAC.a +0 -0
  86. data/assets/macos/lib/libSDL2.a +0 -0
  87. data/assets/macos/lib/libSDL2_image.a +0 -0
  88. data/assets/macos/lib/libSDL2_mixer.a +0 -0
  89. data/assets/macos/lib/libSDL2_ttf.a +0 -0
  90. data/assets/macos/lib/libfreetype.a +0 -0
  91. data/assets/macos/lib/libjpeg.a +0 -0
  92. data/assets/macos/lib/libmpg123.a +0 -0
  93. data/assets/macos/lib/libogg.a +0 -0
  94. data/assets/macos/lib/libpng16.a +0 -0
  95. data/assets/macos/lib/libtiff.a +0 -0
  96. data/assets/macos/lib/libvorbis.a +0 -0
  97. data/assets/macos/lib/libvorbisfile.a +0 -0
  98. data/assets/macos/lib/libwebp.a +0 -0
  99. data/assets/mingw/bin/SDL2.dll +0 -0
  100. data/assets/mingw/lib/libSDL2.a +0 -0
  101. data/assets/mingw/lib/libSDL2.dll.a +0 -0
  102. data/assets/mingw/lib/libSDL2_test.a +0 -0
  103. data/assets/mingw/lib/libSDL2main.a +0 -0
  104. data/ext/ruby2d/extconf.rb +1 -1
  105. data/ext/ruby2d/gl.c +17 -0
  106. data/ext/ruby2d/gl2.c +15 -0
  107. data/ext/ruby2d/gl3.c +15 -0
  108. data/ext/ruby2d/gles.c +15 -0
  109. data/ext/ruby2d/music.c +13 -0
  110. data/ext/ruby2d/ruby2d.c +306 -168
  111. data/ext/ruby2d/ruby2d.h +32 -0
  112. data/ext/ruby2d/sound.c +25 -0
  113. data/ext/ruby2d/tileset.c +30 -0
  114. data/lib/ruby2d.rb +4 -1
  115. data/lib/ruby2d/circle.rb +18 -2
  116. data/lib/ruby2d/dsl.rb +16 -9
  117. data/lib/ruby2d/entity.rb +17 -0
  118. data/lib/ruby2d/font.rb +4 -3
  119. data/lib/ruby2d/image.rb +24 -1
  120. data/lib/ruby2d/line.rb +20 -0
  121. data/lib/ruby2d/music.rb +5 -0
  122. data/lib/ruby2d/pixel.rb +17 -0
  123. data/lib/ruby2d/quad.rb +18 -0
  124. data/lib/ruby2d/rectangle.rb +11 -2
  125. data/lib/ruby2d/renderable.rb +4 -8
  126. data/lib/ruby2d/sound.rb +5 -0
  127. data/lib/ruby2d/sprite.rb +35 -3
  128. data/lib/ruby2d/square.rb +9 -0
  129. data/lib/ruby2d/text.rb +22 -1
  130. data/lib/ruby2d/tileset.rb +69 -0
  131. data/lib/ruby2d/triangle.rb +16 -0
  132. data/lib/ruby2d/version.rb +1 -1
  133. data/lib/ruby2d/window.rb +249 -22
  134. metadata +10 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 694ff325167fe7d6ff8b61d8717fe4237d06da7d37c44d2df377c92651742537
4
- data.tar.gz: 8985f19ff3d888286bbbb1dc6ec167c5b59f0eaa98ab2f628c3960c90ba978e0
3
+ metadata.gz: '0059bb28289e915843965295b765cb9538ee1fcb167ad7614232170afe755c59'
4
+ data.tar.gz: 7b06dcf7936082f49778cd8652ed9e2475572e241031d6cd321547d8abab62c5
5
5
  SHA512:
6
- metadata.gz: b3c772f6781eaf972ddf4213e9454c8333471a127b5787da0ffd8e7b1c04f62fc091eb10c0ad1c558786ff1842b2d3b1b3c7797de8c17dfc7e84b5ab4e12c371
7
- data.tar.gz: 4b082fecf24c7a4e6269d41701f9ec13589fca93155487fd336ce8818f07eeeb251a3425f9ca9688d2be1a0fc9326280da1752750c2a198cddaec9be148df926
6
+ metadata.gz: 209a09d9d45bcdcb92c985f87a8f2696264790f5cc33e37120689af8768d8224e01811c3d093347b48899437731b48518fbac9c2f511982f7c884740503c54a6
7
+ data.tar.gz: 6fcede24174d4e97f60cf338488970cedd6990be9e4755097442b62f7346b4a1df06f86cdf98a65757683f831afedb9bf222e456af9b949387cee7c48bd141e8
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -47,6 +47,7 @@
47
47
  #include "SDL_loadso.h"
48
48
  #include "SDL_log.h"
49
49
  #include "SDL_messagebox.h"
50
+ #include "SDL_metal.h"
50
51
  #include "SDL_mutex.h"
51
52
  #include "SDL_power.h"
52
53
  #include "SDL_render.h"
@@ -58,6 +59,8 @@
58
59
  #include "SDL_timer.h"
59
60
  #include "SDL_version.h"
60
61
  #include "SDL_video.h"
62
+ #include "SDL_locale.h"
63
+ #include "SDL_misc.h"
61
64
 
62
65
  #include "begin_code.h"
63
66
  /* Set up for C function definitions, even when using C++ */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -53,6 +53,8 @@ assert can have unique static variables associated with it.
53
53
  #define SDL_TriggerBreakpoint() __debugbreak()
54
54
  #elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
55
55
  #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
56
+ #elif ( defined(__APPLE__) && defined(__arm64__) ) /* this might work on other ARM targets, but this is a known quantity... */
57
+ #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
56
58
  #elif defined(__386__) && defined(__WATCOMC__)
57
59
  #define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
58
60
  #elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -50,6 +50,9 @@ typedef enum
50
50
  SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
51
51
  dstRGB = srcRGB * dstRGB
52
52
  dstA = dstA */
53
+ SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
54
+ dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
55
+ dstA = (srcA * dstA) + (dstA * (1-srcA)) */
53
56
  SDL_BLENDMODE_INVALID = 0x7FFFFFFF
54
57
 
55
58
  /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -71,6 +71,7 @@
71
71
  #define HAVE_STRCHR 1
72
72
  #define HAVE_STRRCHR 1
73
73
  #define HAVE_STRSTR 1
74
+ #define HAVE_STRTOK_R 1
74
75
  #define HAVE_STRTOL 1
75
76
  #define HAVE_STRTOUL 1
76
77
  #define HAVE_STRTOLL 1
@@ -120,6 +121,8 @@
120
121
  #define HAVE_SQRTF 1
121
122
  #define HAVE_TAN 1
122
123
  #define HAVE_TANF 1
124
+ #define HAVE_TRUNC 1
125
+ #define HAVE_TRUNCF 1
123
126
  #define HAVE_SIGACTION 1
124
127
  #define HAVE_SETJMP 1
125
128
  #define HAVE_NANOSLEEP 1
@@ -135,8 +138,9 @@
135
138
 
136
139
  /* Enable various input drivers */
137
140
  #define SDL_JOYSTICK_ANDROID 1
138
- #define SDL_JOYSTICK_HIDAPI 1
139
- #define SDL_HAPTIC_ANDROID 1
141
+ #define SDL_JOYSTICK_HIDAPI 1
142
+ #define SDL_JOYSTICK_VIRTUAL 1
143
+ #define SDL_HAPTIC_ANDROID 1
140
144
 
141
145
  /* Enable sensor driver */
142
146
  #define SDL_SENSOR_ANDROID 1
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -71,6 +71,7 @@
71
71
  #define HAVE_STRCHR 1
72
72
  #define HAVE_STRRCHR 1
73
73
  #define HAVE_STRSTR 1
74
+ #define HAVE_STRTOK_R 1
74
75
  #define HAVE_STRTOL 1
75
76
  #define HAVE_STRTOUL 1
76
77
  #define HAVE_STRTOLL 1
@@ -121,6 +122,8 @@
121
122
  #define HAVE_SQRTF 1
122
123
  #define HAVE_TAN 1
123
124
  #define HAVE_TANF 1
125
+ #define HAVE_TRUNC 1
126
+ #define HAVE_TRUNCF 1
124
127
  #define HAVE_SIGACTION 1
125
128
  #define HAVE_SETJMP 1
126
129
  #define HAVE_NANOSLEEP 1
@@ -135,9 +138,11 @@
135
138
  /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
136
139
  #define SDL_HAPTIC_DUMMY 1
137
140
 
138
- /* Enable MFi joystick support */
139
- #define SDL_JOYSTICK_MFI 1
141
+ /* Enable joystick support */
142
+ /* Only enable HIDAPI support if you want to support Steam Controllers on iOS and tvOS */
140
143
  /*#define SDL_JOYSTICK_HIDAPI 1*/
144
+ #define SDL_JOYSTICK_MFI 1
145
+ #define SDL_JOYSTICK_VIRTUAL 1
141
146
 
142
147
  #ifdef __TVOS__
143
148
  #define SDL_SENSOR_DUMMY 1
@@ -166,8 +171,10 @@
166
171
  #define SDL_VIDEO_RENDER_OGL_ES 1
167
172
  #define SDL_VIDEO_RENDER_OGL_ES2 1
168
173
 
169
- /* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer */
170
- #if !TARGET_OS_SIMULATOR && !TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000))
174
+ /* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer
175
+ Also supported in simulator from iOS 13.0 and tvOS 13.0
176
+ */
177
+ #if (TARGET_OS_SIMULATOR && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || (__TV_OS_VERSION_MIN_REQUIRED >= 130000))) || (!TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000)))
171
178
  #define SDL_PLATFORM_SUPPORTS_METAL 1
172
179
  #else
173
180
  #define SDL_PLATFORM_SUPPORTS_METAL 0
@@ -181,6 +188,10 @@
181
188
  #define SDL_VIDEO_VULKAN 1
182
189
  #endif
183
190
 
191
+ #if SDL_PLATFORM_SUPPORTS_METAL
192
+ #define SDL_VIDEO_METAL 1
193
+ #endif
194
+
184
195
  /* Enable system power support */
185
196
  #define SDL_POWER_UIKIT 1
186
197
 
@@ -190,11 +201,6 @@
190
201
  /* enable iOS extended launch screen */
191
202
  #define SDL_IPHONE_LAUNCHSCREEN 1
192
203
 
193
- /* Set max recognized G-force from accelerometer
194
- See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed
195
- */
196
- #define SDL_IPHONE_MAX_GFORCE 5.0
197
-
198
204
  /* enable filesystem support */
199
205
  #define SDL_FILESYSTEM_COCOA 1
200
206
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -74,6 +74,7 @@
74
74
  #define HAVE_STRCHR 1
75
75
  #define HAVE_STRRCHR 1
76
76
  #define HAVE_STRSTR 1
77
+ #define HAVE_STRTOK_R 1
77
78
  #define HAVE_STRTOL 1
78
79
  #define HAVE_STRTOUL 1
79
80
  #define HAVE_STRTOLL 1
@@ -124,22 +125,32 @@
124
125
  #define HAVE_SQRTF 1
125
126
  #define HAVE_TAN 1
126
127
  #define HAVE_TANF 1
128
+ #define HAVE_TRUNC 1
129
+ #define HAVE_TRUNCF 1
127
130
  #define HAVE_SIGACTION 1
128
131
  #define HAVE_SETJMP 1
129
132
  #define HAVE_NANOSLEEP 1
130
133
  #define HAVE_SYSCONF 1
131
134
  #define HAVE_SYSCTLBYNAME 1
132
135
 
136
+ #define HAVE_GCC_ATOMICS 1
137
+
133
138
  /* Enable various audio drivers */
134
139
  #define SDL_AUDIO_DRIVER_COREAUDIO 1
135
140
  #define SDL_AUDIO_DRIVER_DISK 1
136
141
  #define SDL_AUDIO_DRIVER_DUMMY 1
137
142
 
138
143
  /* Enable various input drivers */
144
+ #define SDL_JOYSTICK_HIDAPI 1
139
145
  #define SDL_JOYSTICK_IOKIT 1
140
- #define SDL_JOYSTICK_HIDAPI 1
146
+ #define SDL_JOYSTICK_VIRTUAL 1
141
147
  #define SDL_HAPTIC_IOKIT 1
142
148
 
149
+ /* The MFI controller support requires ARC Objective C runtime */
150
+ #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !defined(__i386__)
151
+ #define SDL_JOYSTICK_MFI 1
152
+ #endif
153
+
143
154
  /* Enable the dummy sensor driver */
144
155
  #define SDL_SENSOR_DUMMY 1
145
156
 
@@ -157,13 +168,13 @@
157
168
  #define SDL_VIDEO_DRIVER_COCOA 1
158
169
  #define SDL_VIDEO_DRIVER_DUMMY 1
159
170
  #undef SDL_VIDEO_DRIVER_X11
160
- #define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
161
- #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
162
- #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib"
163
- #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib"
164
- #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
165
- #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
166
- #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
171
+ #define SDL_VIDEO_DRIVER_X11_DYNAMIC "/opt/X11/lib/libX11.6.dylib"
172
+ #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/opt/X11/lib/libXext.6.dylib"
173
+ #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/opt/X11/lib/libXinerama.1.dylib"
174
+ #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/opt/X11/lib/libXi.6.dylib"
175
+ #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/opt/X11/lib/libXrandr.2.dylib"
176
+ #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/opt/X11/lib/libXss.1.dylib"
177
+ #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/opt/X11/lib/libXxf86vm.1.dylib"
167
178
  #define SDL_VIDEO_DRIVER_X11_XDBE 1
168
179
  #define SDL_VIDEO_DRIVER_X11_XINERAMA 1
169
180
  #define SDL_VIDEO_DRIVER_X11_XRANDR 1
@@ -191,9 +202,15 @@
191
202
  #define SDL_VIDEO_RENDER_OGL_ES2 1
192
203
  #endif
193
204
 
194
- #ifndef SDL_VIDEO_RENDER_METAL
195
205
  /* Metal only supported on 64-bit architectures with 10.11+ */
196
- #if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
206
+ #if TARGET_RT_64_BIT && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
207
+ #define SDL_PLATFORM_SUPPORTS_METAL 1
208
+ #else
209
+ #define SDL_PLATFORM_SUPPORTS_METAL 0
210
+ #endif
211
+
212
+ #ifndef SDL_VIDEO_RENDER_METAL
213
+ #if SDL_PLATFORM_SUPPORTS_METAL
197
214
  #define SDL_VIDEO_RENDER_METAL 1
198
215
  #else
199
216
  #define SDL_VIDEO_RENDER_METAL 0
@@ -217,13 +234,22 @@
217
234
  #define SDL_VIDEO_OPENGL_GLX 1
218
235
  #endif
219
236
 
220
- /* Enable Vulkan support */
221
- /* Metal/Vulkan Portability only supported on 64-bit architectures with 10.11+ */
222
- #if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
237
+ /* Enable Vulkan and Metal support */
238
+ #ifndef SDL_VIDEO_VULKAN
239
+ #if SDL_PLATFORM_SUPPORTS_METAL
223
240
  #define SDL_VIDEO_VULKAN 1
224
241
  #else
225
242
  #define SDL_VIDEO_VULKAN 0
226
243
  #endif
244
+ #endif
245
+
246
+ #ifndef SDL_VIDEO_METAL
247
+ #if SDL_PLATFORM_SUPPORTS_METAL
248
+ #define SDL_VIDEO_METAL 1
249
+ #else
250
+ #define SDL_VIDEO_METAL 0
251
+ #endif
252
+ #endif
227
253
 
228
254
  /* Enable system power support */
229
255
  #define SDL_POWER_MACOSX 1
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -27,14 +27,17 @@
27
27
 
28
28
  #define SDL_AUDIO_DRIVER_DUMMY 1
29
29
  #define SDL_AUDIO_DRIVER_DISK 1
30
+ #define SDL_AUDIO_DRIVER_OS2 1
30
31
 
31
32
  #define SDL_POWER_DISABLED 1
32
33
  #define SDL_JOYSTICK_DISABLED 1
33
34
  #define SDL_HAPTIC_DISABLED 1
34
35
  /*#undef SDL_JOYSTICK_HIDAPI */
36
+ /*#undef SDL_JOYSTICK_VIRTUAL */
35
37
 
36
38
  #define SDL_SENSOR_DUMMY 1
37
39
  #define SDL_VIDEO_DRIVER_DUMMY 1
40
+ #define SDL_VIDEO_DRIVER_OS2 1
38
41
 
39
42
  /* Enable OpenGL support */
40
43
  /* #undef SDL_VIDEO_OPENGL */
@@ -42,18 +45,19 @@
42
45
  /* Enable Vulkan support */
43
46
  /* #undef SDL_VIDEO_VULKAN */
44
47
 
45
- #define SDL_LOADSO_DISABLED 1
46
- #define SDL_THREADS_DISABLED 1
47
- #define SDL_TIMERS_DISABLED 1
48
- #define SDL_FILESYSTEM_DUMMY 1
48
+ #define SDL_THREAD_OS2 1
49
+ #define SDL_LOADSO_OS2 1
50
+ #define SDL_TIMER_OS2 1
51
+ #define SDL_FILESYSTEM_OS2 1
49
52
 
50
53
  /* Enable assembly routines */
51
54
  #define SDL_ASSEMBLY_ROUTINES 1
52
55
 
53
- /* #undef HAVE_LIBSAMPLERATE_H */
56
+ /* use libsamplerate for audio rate conversion. */
57
+ /*#define HAVE_LIBSAMPLERATE_H 1 */
54
58
 
55
59
  /* Enable dynamic libsamplerate support */
56
- /* #undef SDL_LIBSAMPLERATE_DYNAMIC */
60
+ #define SDL_LIBSAMPLERATE_DYNAMIC "SAMPRATE.DLL"
57
61
 
58
62
  #define HAVE_LIBC 1
59
63
 
@@ -99,6 +103,8 @@
99
103
  #define HAVE_WCSLCPY 1
100
104
  #define HAVE_WCSLCAT 1
101
105
  #define HAVE_WCSCMP 1
106
+ #define HAVE__WCSICMP 1
107
+ #define HAVE__WCSNICMP 1
102
108
  #define HAVE_STRLEN 1
103
109
  #define HAVE_STRLCPY 1
104
110
  #define HAVE_STRLCAT 1
@@ -110,6 +116,7 @@
110
116
  #define HAVE_STRCHR 1
111
117
  #define HAVE_STRRCHR 1
112
118
  #define HAVE_STRSTR 1
119
+ /* #undef HAVE_STRTOK_R */
113
120
  #define HAVE_ITOA 1
114
121
  #define HAVE__LTOA 1
115
122
  #define HAVE__ULTOA 1
@@ -122,12 +129,21 @@
122
129
  #define HAVE_STRTOD 1
123
130
  #define HAVE_ATOI 1
124
131
  #define HAVE_ATOF 1
132
+ #define HAVE_WCSLEN 1
133
+ #define HAVE_WCSLCPY 1
134
+ #define HAVE_WCSLCAT 1
135
+ /* #define HAVE_WCSDUP 1 */
136
+ /* #define wcsdup _wcsdup */
137
+ #define HAVE_WCSSTR 1
138
+ #define HAVE_WCSCMP 1
139
+ #define HAVE_WCSNCMP 1
125
140
  #define HAVE_STRCMP 1
126
141
  #define HAVE_STRNCMP 1
127
142
  #define HAVE_STRICMP 1
128
143
  #define HAVE_STRCASECMP 1
129
144
  #define HAVE_STRNCASECMP 1
130
- #define HAVE_SSCANF 1
145
+ #define HAVE_SSCANF 1
146
+ #define HAVE_VSSCANF 1
131
147
  #define HAVE_SNPRINTF 1
132
148
  #define HAVE_VSNPRINTF 1
133
149
  #define HAVE_SETJMP 1
@@ -166,5 +182,7 @@
166
182
  /* #undef HAVE_SQRTF */
167
183
  #define HAVE_TAN 1
168
184
  /* #undef HAVE_TANF */
185
+ /* #undef HAVE_TRUNC */
186
+ /* #undef HAVE_TRUNCF */
169
187
 
170
188
  #endif /* SDL_config_os2_h_ */