gosu 1.4.5.pre1 → 1.4.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/dependencies/SDL/include/SDL.h +1 -0
  3. data/dependencies/SDL/include/SDL_assert.h +4 -2
  4. data/dependencies/SDL/include/SDL_atomic.h +20 -0
  5. data/dependencies/SDL/include/SDL_audio.h +40 -4
  6. data/dependencies/SDL/include/SDL_blendmode.h +4 -6
  7. data/dependencies/SDL/include/SDL_clipboard.h +47 -0
  8. data/dependencies/SDL/include/SDL_config.h +71 -45
  9. data/dependencies/SDL/include/SDL_cpuinfo.h +39 -4
  10. data/dependencies/SDL/include/SDL_egl.h +59 -9
  11. data/dependencies/SDL/include/SDL_endian.h +34 -3
  12. data/dependencies/SDL/include/SDL_events.h +32 -1
  13. data/dependencies/SDL/include/SDL_filesystem.h +5 -1
  14. data/dependencies/SDL/include/SDL_gamecontroller.h +78 -5
  15. data/dependencies/SDL/include/SDL_guid.h +100 -0
  16. data/dependencies/SDL/include/SDL_hints.h +645 -43
  17. data/dependencies/SDL/include/SDL_joystick.h +127 -7
  18. data/dependencies/SDL/include/SDL_keyboard.h +38 -1
  19. data/dependencies/SDL/include/SDL_keycode.h +6 -1
  20. data/dependencies/SDL/include/SDL_log.h +2 -2
  21. data/dependencies/SDL/include/SDL_main.h +42 -2
  22. data/dependencies/SDL/include/SDL_metal.h +2 -1
  23. data/dependencies/SDL/include/SDL_mouse.h +12 -1
  24. data/dependencies/SDL/include/SDL_opengl.h +0 -51
  25. data/dependencies/SDL/include/SDL_opengl_glext.h +2260 -231
  26. data/dependencies/SDL/include/SDL_opengles2_gl2.h +374 -339
  27. data/dependencies/SDL/include/SDL_opengles2_gl2ext.h +3479 -1496
  28. data/dependencies/SDL/include/SDL_opengles2_gl2platform.h +6 -9
  29. data/dependencies/SDL/include/SDL_opengles2_khrplatform.h +43 -14
  30. data/dependencies/SDL/include/SDL_platform.h +32 -6
  31. data/dependencies/SDL/include/SDL_rect.h +154 -2
  32. data/dependencies/SDL/include/SDL_render.h +46 -17
  33. data/dependencies/SDL/include/SDL_revision.h +6 -1
  34. data/dependencies/SDL/include/SDL_rwops.h +1 -15
  35. data/dependencies/SDL/include/SDL_scancode.h +46 -21
  36. data/dependencies/SDL/include/SDL_sensor.h +24 -3
  37. data/dependencies/SDL/include/SDL_stdinc.h +119 -8
  38. data/dependencies/SDL/include/SDL_surface.h +3 -1
  39. data/dependencies/SDL/include/SDL_system.h +66 -6
  40. data/dependencies/SDL/include/SDL_syswm.h +2 -0
  41. data/dependencies/SDL/include/SDL_test_common.h +1 -0
  42. data/dependencies/SDL/include/SDL_test_font.h +90 -3
  43. data/dependencies/SDL/include/SDL_thread.h +3 -3
  44. data/dependencies/SDL/include/SDL_touch.h +8 -0
  45. data/dependencies/SDL/include/SDL_version.h +19 -3
  46. data/dependencies/SDL/include/SDL_video.h +71 -9
  47. data/dependencies/SDL/include/begin_code.h +4 -4
  48. data/dependencies/SDL/lib/x64/libSDL2.dll.a +0 -0
  49. data/dependencies/SDL/lib/x86/libSDL2.dll.a +0 -0
  50. data/dependencies/SDL_sound/SDL_sound.c +210 -71
  51. data/dependencies/SDL_sound/SDL_sound.h +1 -1
  52. data/dependencies/SDL_sound/SDL_sound_coreaudio.c +111 -168
  53. data/dependencies/SDL_sound/SDL_sound_flac.c +0 -6
  54. data/dependencies/SDL_sound/SDL_sound_internal.h +27 -5
  55. data/dependencies/SDL_sound/SDL_sound_modplug.c +20 -8
  56. data/dependencies/SDL_sound/SDL_sound_mp3.c +11 -7
  57. data/dependencies/SDL_sound/SDL_sound_raw.c +1 -1
  58. data/dependencies/SDL_sound/SDL_sound_shn.c +1 -5
  59. data/dependencies/SDL_sound/SDL_sound_voc.c +1 -1
  60. data/dependencies/SDL_sound/SDL_sound_vorbis.c +2 -4
  61. data/dependencies/SDL_sound/SDL_sound_wav.c +44 -20
  62. data/dependencies/SDL_sound/dr_flac.h +237 -95
  63. data/dependencies/SDL_sound/dr_mp3.h +46 -33
  64. data/dependencies/SDL_sound/libmodplug/fastmix.c +53 -39
  65. data/dependencies/SDL_sound/libmodplug/libmodplug.h +0 -12
  66. data/dependencies/SDL_sound/libmodplug/load_669.c +37 -32
  67. data/dependencies/SDL_sound/libmodplug/load_amf.c +57 -44
  68. data/dependencies/SDL_sound/libmodplug/load_ams.c +127 -100
  69. data/dependencies/SDL_sound/libmodplug/load_dbm.c +40 -37
  70. data/dependencies/SDL_sound/libmodplug/load_dmf.c +61 -49
  71. data/dependencies/SDL_sound/libmodplug/load_dsm.c +18 -13
  72. data/dependencies/SDL_sound/libmodplug/load_far.c +31 -24
  73. data/dependencies/SDL_sound/libmodplug/load_gdm.c +27 -21
  74. data/dependencies/SDL_sound/libmodplug/load_it.c +106 -91
  75. data/dependencies/SDL_sound/libmodplug/load_mdl.c +43 -35
  76. data/dependencies/SDL_sound/libmodplug/load_med.c +66 -52
  77. data/dependencies/SDL_sound/libmodplug/load_mod.c +30 -26
  78. data/dependencies/SDL_sound/libmodplug/load_mt2.c +61 -50
  79. data/dependencies/SDL_sound/libmodplug/load_mtm.c +23 -17
  80. data/dependencies/SDL_sound/libmodplug/load_okt.c +18 -16
  81. data/dependencies/SDL_sound/libmodplug/load_psm.c +44 -32
  82. data/dependencies/SDL_sound/libmodplug/load_ptm.c +18 -14
  83. data/dependencies/SDL_sound/libmodplug/load_s3m.c +59 -53
  84. data/dependencies/SDL_sound/libmodplug/load_stm.c +23 -18
  85. data/dependencies/SDL_sound/libmodplug/load_ult.c +33 -29
  86. data/dependencies/SDL_sound/libmodplug/load_xm.c +64 -57
  87. data/dependencies/SDL_sound/libmodplug/mmcmp.c +2 -1
  88. data/dependencies/SDL_sound/libmodplug/snd_dsp.c +30 -20
  89. data/dependencies/SDL_sound/libmodplug/snd_flt.c +6 -4
  90. data/dependencies/SDL_sound/libmodplug/snd_fx.c +91 -65
  91. data/dependencies/SDL_sound/libmodplug/sndfile.c +91 -66
  92. data/dependencies/SDL_sound/libmodplug/sndmix.c +58 -35
  93. data/dependencies/SDL_sound/stb_vorbis.h +14 -9
  94. data/dependencies/mojoAL/mojoal.c +41 -24
  95. data/dependencies/utf8proc/utf8proc.c +1 -1
  96. data/dependencies/utf8proc/utf8proc.h +1 -1
  97. data/dependencies/utf8proc/utf8proc_data.h +3366 -3184
  98. data/lib/SDL2.dll +0 -0
  99. data/lib64/SDL2.dll +0 -0
  100. data/src/Window.cpp +3 -0
  101. metadata +5 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44607a2ab15d11917e1a6106352fe652cd4aab595b1193d44f946a0184309647
4
- data.tar.gz: 6facb9f07929562d2d7d3a58ddcc90fa6afbda6db4d9f1fd42d629a1b4a06a0b
3
+ metadata.gz: 54dd9082a36785d56a6bc0e6f7a38d9e38c62d29bd7476dc56df29a9175a69be
4
+ data.tar.gz: a713d0c3e09e38b3a668b2bfad8353d5e94332043d7388264c2b8eb05c6ab7b2
5
5
  SHA512:
6
- metadata.gz: 83afbc1d09db1f2545ff570d7674e9f770d95353d1614ef45f2d3c1e580f191a4cb6589af161767ca942fa7309786fa06155a4c2ac342cf08864f04383078eb0
7
- data.tar.gz: 6255e2435e6e85c63adbdad2cfcf3f48b9204d982b2a3f07bbc3de7757d44850f456a4bf1863de733386edbcdd6b2800b5bae599e08964a9837a7836ee140998
6
+ metadata.gz: 85db224f6e83d63184708b74408551be45e590a20526dd795079239048d4d026320579f97195f9ff4fce42ca3adbdff1351fc53eb6491d50486f1d76950b87a1
7
+ data.tar.gz: c027c0c3b038e5bdd4a674ffe0e902f07ddb245b4d1b5419d734a3baceadbdcef20e5d38c023e0da31bbdc072e78b8731209f50b882ccae572c234dc1bd32b97
@@ -41,6 +41,7 @@
41
41
  #include "SDL_events.h"
42
42
  #include "SDL_filesystem.h"
43
43
  #include "SDL_gamecontroller.h"
44
+ #include "SDL_guid.h"
44
45
  #include "SDL_haptic.h"
45
46
  #include "SDL_hidapi.h"
46
47
  #include "SDL_hints.h"
@@ -22,7 +22,7 @@
22
22
  #ifndef SDL_assert_h_
23
23
  #define SDL_assert_h_
24
24
 
25
- #include "SDL_config.h"
25
+ #include "SDL_stdinc.h"
26
26
 
27
27
  #include "begin_code.h"
28
28
  /* Set up for C function definitions, even when using C++ */
@@ -51,6 +51,8 @@ assert can have unique static variables associated with it.
51
51
  /* Don't include intrin.h here because it contains C++ code */
52
52
  extern void __cdecl __debugbreak(void);
53
53
  #define SDL_TriggerBreakpoint() __debugbreak()
54
+ #elif _SDL_HAS_BUILTIN(__builtin_debugtrap)
55
+ #define SDL_TriggerBreakpoint() __builtin_debugtrap()
54
56
  #elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
55
57
  #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
56
58
  #elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
@@ -69,7 +71,7 @@ assert can have unique static variables associated with it.
69
71
 
70
72
  #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
71
73
  # define SDL_FUNCTION __func__
72
- #elif ((__GNUC__ >= 2) || defined(_MSC_VER) || defined (__WATCOMC__))
74
+ #elif ((defined(__GNUC__) && (__GNUC__ >= 2)) || defined(_MSC_VER) || defined (__WATCOMC__))
73
75
  # define SDL_FUNCTION __FUNCTION__
74
76
  #else
75
77
  # define SDL_FUNCTION "???"
@@ -237,6 +237,26 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
237
237
  #endif
238
238
  #endif
239
239
 
240
+ /* "REP NOP" is PAUSE, coded for tools that don't know it by that name. */
241
+ #if (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
242
+ #define SDL_CPUPauseInstruction() __asm__ __volatile__("pause\n") /* Some assemblers can't do REP NOP, so go with PAUSE. */
243
+ #elif (defined(__arm__) && __ARM_ARCH >= 7) || defined(__aarch64__)
244
+ #define SDL_CPUPauseInstruction() __asm__ __volatile__("yield" ::: "memory")
245
+ #elif (defined(__powerpc__) || defined(__powerpc64__))
246
+ #define SDL_CPUPauseInstruction() __asm__ __volatile__("or 27,27,27");
247
+ #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
248
+ #define SDL_CPUPauseInstruction() _mm_pause() /* this is actually "rep nop" and not a SIMD instruction. No inline asm in MSVC x86-64! */
249
+ #elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
250
+ #define SDL_CPUPauseInstruction() __yield()
251
+ #elif defined(__WATCOMC__) && defined(__386__)
252
+ /* watcom assembler rejects PAUSE if CPU < i686, and it refuses REP NOP as an invalid combination. Hardcode the bytes. */
253
+ extern __inline void SDL_CPUPauseInstruction(void);
254
+ #pragma aux SDL_CPUPauseInstruction = "db 0f3h,90h"
255
+ #else
256
+ #define SDL_CPUPauseInstruction()
257
+ #endif
258
+
259
+
240
260
  /**
241
261
  * \brief A type representing an atomic integer value. It is a struct
242
262
  * so people don't accidentally use numeric operations on it.
@@ -172,7 +172,7 @@ typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
172
172
  * 2: FL FR (stereo)
173
173
  * 3: FL FR LFE (2.1 surround)
174
174
  * 4: FL FR BL BR (quad)
175
- * 5: FL FR FC BL BR (quad + center)
175
+ * 5: FL FR LFE BL BR (4.1 surround)
176
176
  * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
177
177
  * 7: FL FR FC LFE BC SL SR (6.1 surround)
178
178
  * 8: FL FR FC LFE BL BR SL SR (7.1 surround)
@@ -487,6 +487,7 @@ extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture);
487
487
  * \since This function is available since SDL 2.0.0.
488
488
  *
489
489
  * \sa SDL_GetNumAudioDevices
490
+ * \sa SDL_GetDefaultAudioInfo
490
491
  */
491
492
  extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
492
493
  int iscapture);
@@ -500,9 +501,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
500
501
  * hardware.
501
502
  *
502
503
  * `spec` will be filled with the sample rate, sample format, and channel
503
- * count. All other values in the structure are filled with 0. When the
504
- * supported struct members are 0, SDL was unable to get the property from the
505
- * backend.
504
+ * count.
506
505
  *
507
506
  * \param index the index of the audio device; valid values range from 0 to
508
507
  * SDL_GetNumAudioDevices() - 1
@@ -514,12 +513,48 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
514
513
  * \since This function is available since SDL 2.0.16.
515
514
  *
516
515
  * \sa SDL_GetNumAudioDevices
516
+ * \sa SDL_GetDefaultAudioInfo
517
517
  */
518
518
  extern DECLSPEC int SDLCALL SDL_GetAudioDeviceSpec(int index,
519
519
  int iscapture,
520
520
  SDL_AudioSpec *spec);
521
521
 
522
522
 
523
+ /**
524
+ * Get the name and preferred format of the default audio device.
525
+ *
526
+ * Some (but not all!) platforms have an isolated mechanism to get information
527
+ * about the "default" device. This can actually be a completely different
528
+ * device that's not in the list you get from SDL_GetAudioDeviceSpec(). It can
529
+ * even be a network address! (This is discussed in SDL_OpenAudioDevice().)
530
+ *
531
+ * As a result, this call is not guaranteed to be performant, as it can query
532
+ * the sound server directly every time, unlike the other query functions. You
533
+ * should call this function sparingly!
534
+ *
535
+ * `spec` will be filled with the sample rate, sample format, and channel
536
+ * count, if a default device exists on the system. If `name` is provided,
537
+ * will be filled with either a dynamically-allocated UTF-8 string or NULL.
538
+ *
539
+ * \param name A pointer to be filled with the name of the default device (can
540
+ * be NULL). Please call SDL_free() when you are done with this
541
+ * pointer!
542
+ * \param spec The SDL_AudioSpec to be initialized by this function.
543
+ * \param iscapture non-zero to query the default recording device, zero to
544
+ * query the default output device.
545
+ * \returns 0 on success, nonzero on error
546
+ *
547
+ * \since This function is available since SDL 2.24.0.
548
+ *
549
+ * \sa SDL_GetAudioDeviceName
550
+ * \sa SDL_GetAudioDeviceSpec
551
+ * \sa SDL_OpenAudioDevice
552
+ */
553
+ extern DECLSPEC int SDLCALL SDL_GetDefaultAudioInfo(char **name,
554
+ SDL_AudioSpec *spec,
555
+ int iscapture);
556
+
557
+
523
558
  /**
524
559
  * Open a specific audio device.
525
560
  *
@@ -586,6 +621,7 @@ extern DECLSPEC int SDLCALL SDL_GetAudioDeviceSpec(int index,
586
621
  * - `SDL_AUDIO_ALLOW_FREQUENCY_CHANGE`
587
622
  * - `SDL_AUDIO_ALLOW_FORMAT_CHANGE`
588
623
  * - `SDL_AUDIO_ALLOW_CHANNELS_CHANGE`
624
+ * - `SDL_AUDIO_ALLOW_SAMPLES_CHANGE`
589
625
  * - `SDL_AUDIO_ALLOW_ANY_CHANGE`
590
626
  *
591
627
  * These flags specify how SDL should behave when a device cannot offer a
@@ -67,9 +67,8 @@ typedef enum
67
67
  SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
68
68
  SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
69
69
  SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
70
- SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D11 */
71
- SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D11 */
72
-
70
+ SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
71
+ SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
73
72
  } SDL_BlendOperation;
74
73
 
75
74
  /**
@@ -87,7 +86,6 @@ typedef enum
87
86
  SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */
88
87
  SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */
89
88
  SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */
90
-
91
89
  } SDL_BlendFactor;
92
90
 
93
91
  /**
@@ -135,10 +133,10 @@ typedef enum
135
133
  * SDL 2.0.6. All renderers support the four blend modes listed in the
136
134
  * SDL_BlendMode enumeration.
137
135
  *
138
- * - **direct3d**: Supports `SDL_BLENDOPERATION_ADD` with all factors.
139
- * - **direct3d11**: Supports all operations with all factors. However, some
136
+ * - **direct3d**: Supports all operations with all factors. However, some
140
137
  * factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and
141
138
  * `SDL_BLENDOPERATION_MAXIMUM`.
139
+ * - **direct3d11**: Same as Direct3D 9.
142
140
  * - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
143
141
  * factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL
144
142
  * 2.0.6.
@@ -82,6 +82,53 @@ extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
82
82
  */
83
83
  extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
84
84
 
85
+ /**
86
+ * Put UTF-8 text into the primary selection.
87
+ *
88
+ * \param text the text to store in the primary selection
89
+ * \returns 0 on success or a negative error code on failure; call
90
+ * SDL_GetError() for more information.
91
+ *
92
+ * \since This function is available since SDL 2.26.0.
93
+ *
94
+ * \sa SDL_GetPrimarySelectionText
95
+ * \sa SDL_HasPrimarySelectionText
96
+ */
97
+ extern DECLSPEC int SDLCALL SDL_SetPrimarySelectionText(const char *text);
98
+
99
+ /**
100
+ * Get UTF-8 text from the primary selection, which must be freed with
101
+ * SDL_free().
102
+ *
103
+ * This functions returns empty string if there was not enough memory left for
104
+ * a copy of the primary selection's content.
105
+ *
106
+ * \returns the primary selection text on success or an empty string on
107
+ * failure; call SDL_GetError() for more information. Caller must
108
+ * call SDL_free() on the returned pointer when done with it (even if
109
+ * there was an error).
110
+ *
111
+ * \since This function is available since SDL 2.26.0.
112
+ *
113
+ * \sa SDL_HasPrimarySelectionText
114
+ * \sa SDL_SetPrimarySelectionText
115
+ */
116
+ extern DECLSPEC char * SDLCALL SDL_GetPrimarySelectionText(void);
117
+
118
+ /**
119
+ * Query whether the primary selection exists and contains a non-empty text
120
+ * string.
121
+ *
122
+ * \returns SDL_TRUE if the primary selection has text, or SDL_FALSE if it
123
+ * does not.
124
+ *
125
+ * \since This function is available since SDL 2.26.0.
126
+ *
127
+ * \sa SDL_GetPrimarySelectionText
128
+ * \sa SDL_SetPrimarySelectionText
129
+ */
130
+ extern DECLSPEC SDL_bool SDLCALL SDL_HasPrimarySelectionText(void);
131
+
85
132
 
86
133
  /* Ends C function definitions when using C++ */
87
134
  #ifdef __cplusplus
@@ -38,12 +38,23 @@
38
38
  #include <winsdkver.h>
39
39
  #endif
40
40
 
41
+ /* sdkddkver.h defines more specific SDK version numbers. This is needed because older versions of the
42
+ * Windows 10 SDK have broken declarations for the C API for DirectX 12. */
43
+ #if !defined(HAVE_SDKDDKVER_H) && defined(__has_include)
44
+ #if __has_include(<sdkddkver.h>)
45
+ #define HAVE_SDKDDKVER_H 1
46
+ #endif
47
+ #endif
48
+
49
+ #ifdef HAVE_SDKDDKVER_H
50
+ #include <sdkddkver.h>
51
+ #endif
52
+
41
53
  /* This is a set of defines to configure the SDL features */
42
54
 
43
55
  #if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
44
- #if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__clang__) || defined(__BORLANDC__) || defined(__CODEGEARC__)
45
- #define HAVE_STDINT_H 1
46
- #elif defined(_MSC_VER)
56
+ /* Most everything except Visual Studio 2008 and earlier has stdint.h now */
57
+ #if defined(_MSC_VER) && (_MSC_VER < 1600)
47
58
  typedef signed __int8 int8_t;
48
59
  typedef unsigned __int8 uint8_t;
49
60
  typedef signed __int16 int16_t;
@@ -60,28 +71,9 @@ typedef unsigned int uintptr_t;
60
71
  #endif
61
72
  #define _UINTPTR_T_DEFINED
62
73
  #endif
63
- /* Older Visual C++ headers don't have the Win64-compatible typedefs... */
64
- #if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
65
- #define DWORD_PTR DWORD
66
- #endif
67
- #if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
68
- #define LONG_PTR LONG
69
- #endif
70
- #else /* !__GNUC__ && !_MSC_VER */
71
- typedef signed char int8_t;
72
- typedef unsigned char uint8_t;
73
- typedef signed short int16_t;
74
- typedef unsigned short uint16_t;
75
- typedef signed int int32_t;
76
- typedef unsigned int uint32_t;
77
- typedef signed long long int64_t;
78
- typedef unsigned long long uint64_t;
79
- #ifndef _SIZE_T_DEFINED_
80
- #define _SIZE_T_DEFINED_
81
- typedef unsigned int size_t;
82
- #endif
83
- typedef unsigned int uintptr_t;
84
- #endif /* __GNUC__ || _MSC_VER */
74
+ #else
75
+ #define HAVE_STDINT_H 1
76
+ #endif /* Visual Studio 2008 */
85
77
  #endif /* !_STDINT_H_ && !HAVE_STDINT_H */
86
78
 
87
79
  #ifdef _WIN64
@@ -90,9 +82,14 @@ typedef unsigned int uintptr_t;
90
82
  # define SIZEOF_VOIDP 4
91
83
  #endif
92
84
 
85
+ #ifdef __clang__
86
+ # define HAVE_GCC_ATOMICS 1
87
+ #endif
88
+
93
89
  #define HAVE_DDRAW_H 1
94
90
  #define HAVE_DINPUT_H 1
95
91
  #define HAVE_DSOUND_H 1
92
+ #ifndef __WATCOMC__
96
93
  #define HAVE_DXGI_H 1
97
94
  #define HAVE_XINPUT_H 1
98
95
  #if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0A00 /* Windows 10 SDK */
@@ -100,11 +97,19 @@ typedef unsigned int uintptr_t;
100
97
  #endif
101
98
  #if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0602 /* Windows 8 SDK */
102
99
  #define HAVE_D3D11_H 1
100
+ #define HAVE_ROAPI_H 1
101
+ #endif
102
+ #if defined(WDK_NTDDI_VERSION) && WDK_NTDDI_VERSION > 0x0A000008 /* 10.0.19041.0 */
103
+ #define HAVE_D3D12_H 1
104
+ #endif
105
+ #if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0603 /* Windows 8.1 SDK */
106
+ #define HAVE_SHELLSCALINGAPI_H 1
103
107
  #endif
104
108
  #define HAVE_MMDEVICEAPI_H 1
105
109
  #define HAVE_AUDIOCLIENT_H 1
106
110
  #define HAVE_TPCSHRD_H 1
107
111
  #define HAVE_SENSORSAPI_H 1
112
+ #endif
108
113
  #if (defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)) && (defined(_MSC_VER) && _MSC_VER >= 1600)
109
114
  #define HAVE_IMMINTRIN_H 1
110
115
  #elif defined(__has_include) && (defined(__i386__) || defined(__x86_64))
@@ -131,7 +136,11 @@ typedef unsigned int uintptr_t;
131
136
  #define HAVE_REALLOC 1
132
137
  #define HAVE_FREE 1
133
138
  #define HAVE_ALLOCA 1
139
+ /* OpenWatcom requires specific calling conventions for qsort and bsearch */
140
+ #ifndef __WATCOMC__
134
141
  #define HAVE_QSORT 1
142
+ #define HAVE_BSEARCH 1
143
+ #endif
135
144
  #define HAVE_ABS 1
136
145
  #define HAVE_MEMSET 1
137
146
  #define HAVE_MEMCPY 1
@@ -162,37 +171,40 @@ typedef unsigned int uintptr_t;
162
171
  #define HAVE__WCSNICMP 1
163
172
  #define HAVE__WCSDUP 1
164
173
  #define HAVE_ACOS 1
165
- #define HAVE_ACOSF 1
166
174
  #define HAVE_ASIN 1
167
- #define HAVE_ASINF 1
168
175
  #define HAVE_ATAN 1
169
- #define HAVE_ATANF 1
170
176
  #define HAVE_ATAN2 1
177
+ #define HAVE_CEIL 1
178
+ #define HAVE_COS 1
179
+ #define HAVE_EXP 1
180
+ #define HAVE_FABS 1
181
+ #define HAVE_FLOOR 1
182
+ #define HAVE_FMOD 1
183
+ #define HAVE_LOG 1
184
+ #define HAVE_LOG10 1
185
+ #define HAVE_POW 1
186
+ #define HAVE_SIN 1
187
+ #define HAVE_SQRT 1
188
+ #define HAVE_TAN 1
189
+ #ifndef __WATCOMC__
190
+ #define HAVE_ACOSF 1
191
+ #define HAVE_ASINF 1
192
+ #define HAVE_ATANF 1
171
193
  #define HAVE_ATAN2F 1
172
194
  #define HAVE_CEILF 1
173
195
  #define HAVE__COPYSIGN 1
174
- #define HAVE_COS 1
175
196
  #define HAVE_COSF 1
176
- #define HAVE_EXP 1
177
197
  #define HAVE_EXPF 1
178
- #define HAVE_FABS 1
179
198
  #define HAVE_FABSF 1
180
- #define HAVE_FLOOR 1
181
199
  #define HAVE_FLOORF 1
182
- #define HAVE_FMOD 1
183
200
  #define HAVE_FMODF 1
184
- #define HAVE_LOG 1
185
201
  #define HAVE_LOGF 1
186
- #define HAVE_LOG10 1
187
202
  #define HAVE_LOG10F 1
188
- #define HAVE_POW 1
189
203
  #define HAVE_POWF 1
190
- #define HAVE_SIN 1
191
204
  #define HAVE_SINF 1
192
- #define HAVE_SQRT 1
193
205
  #define HAVE_SQRTF 1
194
- #define HAVE_TAN 1
195
206
  #define HAVE_TANF 1
207
+ #endif
196
208
  #if defined(_MSC_VER)
197
209
  /* These functions were added with the VC++ 2013 C runtime library */
198
210
  #if _MSC_VER >= 1800
@@ -212,8 +224,18 @@ typedef unsigned int uintptr_t;
212
224
  #if _MSC_VER >= 1400
213
225
  #define HAVE__FSEEKI64 1
214
226
  #endif
227
+ #ifdef _USE_MATH_DEFINES
228
+ #define HAVE_M_PI 1
215
229
  #endif
216
- #if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
230
+ #elif defined(__WATCOMC__)
231
+ #define HAVE__FSEEKI64 1
232
+ #define HAVE_STRTOLL 1
233
+ #define HAVE_STRTOULL 1
234
+ #define HAVE_VSSCANF 1
235
+ #define HAVE_ROUND 1
236
+ #define HAVE_SCALBN 1
237
+ #define HAVE_TRUNC 1
238
+ #else
217
239
  #define HAVE_M_PI 1
218
240
  #endif
219
241
  #else
@@ -222,7 +244,9 @@ typedef unsigned int uintptr_t;
222
244
  #endif
223
245
 
224
246
  /* Enable various audio drivers */
247
+ #if defined(HAVE_MMDEVICEAPI_H) && defined(HAVE_AUDIOCLIENT_H)
225
248
  #define SDL_AUDIO_DRIVER_WASAPI 1
249
+ #endif
226
250
  #define SDL_AUDIO_DRIVER_DSOUND 1
227
251
  #define SDL_AUDIO_DRIVER_WINMM 1
228
252
  #define SDL_AUDIO_DRIVER_DISK 1
@@ -243,7 +267,11 @@ typedef unsigned int uintptr_t;
243
267
  #define SDL_HAPTIC_XINPUT 1
244
268
 
245
269
  /* Enable the sensor driver */
270
+ #ifdef HAVE_SENSORSAPI_H
246
271
  #define SDL_SENSOR_WINDOWS 1
272
+ #else
273
+ #define SDL_SENSOR_DUMMY 1
274
+ #endif
247
275
 
248
276
  /* Enable various shared object loading systems */
249
277
  #define SDL_LOADSO_WINDOWS 1
@@ -265,6 +293,9 @@ typedef unsigned int uintptr_t;
265
293
  #if !defined(SDL_VIDEO_RENDER_D3D11) && defined(HAVE_D3D11_H)
266
294
  #define SDL_VIDEO_RENDER_D3D11 1
267
295
  #endif
296
+ #if !defined(SDL_VIDEO_RENDER_D3D12) && defined(HAVE_D3D12_H)
297
+ #define SDL_VIDEO_RENDER_D3D12 1
298
+ #endif
268
299
 
269
300
  /* Enable OpenGL support */
270
301
  #ifndef SDL_VIDEO_OPENGL
@@ -295,11 +326,6 @@ typedef unsigned int uintptr_t;
295
326
  /* Enable filesystem support */
296
327
  #define SDL_FILESYSTEM_WINDOWS 1
297
328
 
298
- /* Enable assembly routines (Win64 doesn't have inline asm) */
299
- #ifndef _WIN64
300
- #define SDL_ASSEMBLY_ROUTINES 1
301
- #endif
302
-
303
329
  #endif /* SDL_config_windows_h_ */
304
330
 
305
331
  /* vi: set ts=4 sw=4 expandtab: */
@@ -79,7 +79,7 @@ _m_prefetch(void *__P)
79
79
  #if !defined(SDL_DISABLE_ARM_NEON_H)
80
80
  # if defined(__ARM_NEON)
81
81
  # include <arm_neon.h>
82
- # elif defined(__WINDOWS__) || defined(__WINRT__)
82
+ # elif defined(__WINDOWS__) || defined(__WINRT__) || defined(__GDK__)
83
83
  /* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
84
84
  # if defined(_M_ARM)
85
85
  # include <armintr.h>
@@ -90,6 +90,7 @@ _m_prefetch(void *__P)
90
90
  # include <arm64intr.h>
91
91
  # include <arm64_neon.h>
92
92
  # define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
93
+ # define __ARM_ARCH 8
93
94
  # endif
94
95
  # endif
95
96
  #endif
@@ -98,6 +99,14 @@ _m_prefetch(void *__P)
98
99
  #if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
99
100
  #include <mm3dnow.h>
100
101
  #endif
102
+ #if defined(__loongarch_sx) && !defined(SDL_DISABLE_LSX_H)
103
+ #include <lsxintrin.h>
104
+ #define __LSX__
105
+ #endif
106
+ #if defined(__loongarch_asx) && !defined(SDL_DISABLE_LASX_H)
107
+ #include <lasxintrin.h>
108
+ #define __LASX__
109
+ #endif
101
110
  #if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
102
111
  #include <immintrin.h>
103
112
  #else
@@ -433,10 +442,36 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
433
442
  */
434
443
  extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
435
444
 
445
+ /**
446
+ * Determine whether the CPU has LSX (LOONGARCH SIMD) features.
447
+ *
448
+ * This always returns false on CPUs that aren't using LOONGARCH instruction
449
+ * sets.
450
+ *
451
+ * \returns SDL_TRUE if the CPU has LOONGARCH LSX features or SDL_FALSE if
452
+ * not.
453
+ *
454
+ * \since This function is available since SDL 2.24.0.
455
+ */
456
+ extern DECLSPEC SDL_bool SDLCALL SDL_HasLSX(void);
457
+
458
+ /**
459
+ * Determine whether the CPU has LASX (LOONGARCH SIMD) features.
460
+ *
461
+ * This always returns false on CPUs that aren't using LOONGARCH instruction
462
+ * sets.
463
+ *
464
+ * \returns SDL_TRUE if the CPU has LOONGARCH LASX features or SDL_FALSE if
465
+ * not.
466
+ *
467
+ * \since This function is available since SDL 2.24.0.
468
+ */
469
+ extern DECLSPEC SDL_bool SDLCALL SDL_HasLASX(void);
470
+
436
471
  /**
437
472
  * Get the amount of RAM configured in the system.
438
473
  *
439
- * \returns the amount of RAM configured in the system in MB.
474
+ * \returns the amount of RAM configured in the system in MiB.
440
475
  *
441
476
  * \since This function is available since SDL 2.0.1.
442
477
  */
@@ -494,7 +529,7 @@ extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
494
529
  *
495
530
  * \since This function is available since SDL 2.0.10.
496
531
  *
497
- * \sa SDL_SIMDAlignment
532
+ * \sa SDL_SIMDGetAlignment
498
533
  * \sa SDL_SIMDRealloc
499
534
  * \sa SDL_SIMDFree
500
535
  */
@@ -518,7 +553,7 @@ extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
518
553
  *
519
554
  * \since This function is available since SDL 2.0.14.
520
555
  *
521
- * \sa SDL_SIMDAlignment
556
+ * \sa SDL_SIMDGetAlignment
522
557
  * \sa SDL_SIMDAlloc
523
558
  * \sa SDL_SIMDFree
524
559
  */