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
@@ -1,20 +1,17 @@
1
1
  #ifndef __gl2platform_h_
2
2
  #define __gl2platform_h_
3
3
 
4
- /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
5
-
6
4
  /*
7
- * This document is licensed under the SGI Free Software B License Version
8
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
9
- */
5
+ ** Copyright 2017-2020 The Khronos Group Inc.
6
+ ** SPDX-License-Identifier: Apache-2.0
7
+ */
10
8
 
11
9
  /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
12
10
  *
13
11
  * Adopters may modify khrplatform.h and this file to suit their platform.
14
- * You are encouraged to submit all modifications to the Khronos group so that
15
- * they can be included in future versions of this file. Please submit changes
16
- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
17
- * by filing a bug against product "OpenGL-ES" component "Registry".
12
+ * Please contribute modifications back to Khronos as pull requests on the
13
+ * public github repository:
14
+ * https://github.com/KhronosGroup/OpenGL-Registry
18
15
  */
19
16
 
20
17
  /*#include <KHR/khrplatform.h>*/
@@ -2,7 +2,7 @@
2
2
  #define __khrplatform_h_
3
3
 
4
4
  /*
5
- ** Copyright (c) 2008-2009 The Khronos Group Inc.
5
+ ** Copyright (c) 2008-2018 The Khronos Group Inc.
6
6
  **
7
7
  ** Permission is hereby granted, free of charge, to any person obtaining a
8
8
  ** copy of this software and/or associated documentation files (the
@@ -26,18 +26,16 @@
26
26
 
27
27
  /* Khronos platform-specific types and definitions.
28
28
  *
29
- * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
29
+ * The master copy of khrplatform.h is maintained in the Khronos EGL
30
+ * Registry repository at https://github.com/KhronosGroup/EGL-Registry
31
+ * The last semantic modification to khrplatform.h was at commit ID:
32
+ * 67a3e0864c2d75ea5287b9f3d2eb74a745936692
30
33
  *
31
34
  * Adopters may modify this file to suit their platform. Adopters are
32
35
  * encouraged to submit platform specific modifications to the Khronos
33
36
  * group so that they can be included in future versions of this file.
34
- * Please submit changes by sending them to the public Khronos Bugzilla
35
- * (http://khronos.org/bugzilla) by filing a bug against product
36
- * "Khronos (general)" component "Registry".
37
- *
38
- * A predefined template which fills in some of the bug fields can be
39
- * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
40
- * must create a Bugzilla login first.
37
+ * Please submit changes by filing pull requests or issues on
38
+ * the EGL Registry repository linked above.
41
39
  *
42
40
  *
43
41
  * See the Implementer's Guidelines for information about where this file
@@ -92,15 +90,25 @@
92
90
  * int arg2) KHRONOS_APIATTRIBUTES;
93
91
  */
94
92
 
93
+ #if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
94
+ # define KHRONOS_STATIC 1
95
+ #endif
96
+
95
97
  /*-------------------------------------------------------------------------
96
98
  * Definition of KHRONOS_APICALL
97
99
  *-------------------------------------------------------------------------
98
100
  * This precedes the return type of the function in the function prototype.
99
101
  */
100
- #if defined(_WIN32) && !defined(__SCITECH_SNAP__)
102
+ #if defined(KHRONOS_STATIC)
103
+ /* If the preprocessor constant KHRONOS_STATIC is defined, make the
104
+ * header compatible with static linking. */
105
+ # define KHRONOS_APICALL
106
+ #elif defined(_WIN32)
101
107
  # define KHRONOS_APICALL __declspec(dllimport)
102
108
  #elif defined (__SYMBIAN32__)
103
109
  # define KHRONOS_APICALL IMPORT_C
110
+ #elif defined(__ANDROID__)
111
+ # define KHRONOS_APICALL __attribute__((visibility("default")))
104
112
  #else
105
113
  # define KHRONOS_APICALL
106
114
  #endif
@@ -145,6 +153,20 @@ typedef int64_t khronos_int64_t;
145
153
  typedef uint64_t khronos_uint64_t;
146
154
  #define KHRONOS_SUPPORT_INT64 1
147
155
  #define KHRONOS_SUPPORT_FLOAT 1
156
+ /*
157
+ * To support platform where unsigned long cannot be used interchangeably with
158
+ * inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t.
159
+ * Ideally, we could just use (u)intptr_t everywhere, but this could result in
160
+ * ABI breakage if khronos_uintptr_t is changed from unsigned long to
161
+ * unsigned long long or similar (this results in different C++ name mangling).
162
+ * To avoid changes for existing platforms, we restrict usage of intptr_t to
163
+ * platforms where the size of a pointer is larger than the size of long.
164
+ */
165
+ #if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__)
166
+ #if __SIZEOF_POINTER__ > __SIZEOF_LONG__
167
+ #define KHRONOS_USE_INTPTR_T
168
+ #endif
169
+ #endif
148
170
 
149
171
  #elif defined(__VMS ) || defined(__sgi)
150
172
 
@@ -223,18 +245,25 @@ typedef signed short int khronos_int16_t;
223
245
  typedef unsigned short int khronos_uint16_t;
224
246
 
225
247
  /*
226
- * Types that differ between LLP64 and LP64 architectures - in LLP64,
248
+ * Types that differ between LLP64 and LP64 architectures - in LLP64,
227
249
  * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
228
250
  * to be the only LLP64 architecture in current use.
229
251
  */
230
- #ifdef _WIN64
252
+ #ifdef KHRONOS_USE_INTPTR_T
253
+ typedef intptr_t khronos_intptr_t;
254
+ typedef uintptr_t khronos_uintptr_t;
255
+ #elif defined(_WIN64)
231
256
  typedef signed long long int khronos_intptr_t;
232
257
  typedef unsigned long long int khronos_uintptr_t;
233
- typedef signed long long int khronos_ssize_t;
234
- typedef unsigned long long int khronos_usize_t;
235
258
  #else
236
259
  typedef signed long int khronos_intptr_t;
237
260
  typedef unsigned long int khronos_uintptr_t;
261
+ #endif
262
+
263
+ #if defined(_WIN64)
264
+ typedef signed long long int khronos_ssize_t;
265
+ typedef unsigned long long int khronos_usize_t;
266
+ #else
238
267
  typedef signed long int khronos_ssize_t;
239
268
  typedef unsigned long int khronos_usize_t;
240
269
  #endif
@@ -65,11 +65,15 @@
65
65
  #undef __LINUX__ /* do we need to do this? */
66
66
  #define __ANDROID__ 1
67
67
  #endif
68
+ #if defined(__NGAGE__)
69
+ #undef __NGAGE__
70
+ #define __NGAGE__ 1
71
+ #endif
68
72
 
69
73
  #if defined(__APPLE__)
70
74
  /* lets us know what version of Mac OS X we're compiling on */
71
- #include "AvailabilityMacros.h"
72
- #include "TargetConditionals.h"
75
+ #include <AvailabilityMacros.h>
76
+ #include <TargetConditionals.h>
73
77
 
74
78
  /* Fix building with older SDKs that don't define these
75
79
  See this for more information:
@@ -104,9 +108,9 @@
104
108
  /* if not compiling for iOS */
105
109
  #undef __MACOSX__
106
110
  #define __MACOSX__ 1
107
- #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
108
- # error SDL for Mac OS X only supports deploying on 10.6 and above.
109
- #endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
111
+ #if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
112
+ # error SDL for Mac OS X only supports deploying on 10.7 and above.
113
+ #endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1070 */
110
114
  #endif /* TARGET_OS_IPHONE */
111
115
  #endif /* defined(__APPLE__) */
112
116
 
@@ -140,7 +144,7 @@
140
144
  #endif
141
145
 
142
146
  #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
143
- /* Try to find out if we're compiling for WinRT or non-WinRT */
147
+ /* Try to find out if we're compiling for WinRT, GDK or non-WinRT/GDK */
144
148
  #if defined(_MSC_VER) && defined(__has_include)
145
149
  #if __has_include(<winapifamily.h>)
146
150
  #define HAVE_WINAPIFAMILY_H 1
@@ -165,6 +169,15 @@
165
169
  #if WINAPI_FAMILY_WINRT
166
170
  #undef __WINRT__
167
171
  #define __WINRT__ 1
172
+ #elif defined(_GAMING_DESKTOP) /* GDK project configuration always defines _GAMING_XXX */
173
+ #undef __WINGDK__
174
+ #define __WINGDK__ 1
175
+ #elif defined(_GAMING_XBOX_XBOXONE)
176
+ #undef __XBOXONE__
177
+ #define __XBOXONE__ 1
178
+ #elif defined(_GAMING_XBOX_SCARLETT)
179
+ #undef __XBOXSERIES__
180
+ #define __XBOXSERIES__ 1
168
181
  #else
169
182
  #undef __WINDOWS__
170
183
  #define __WINDOWS__ 1
@@ -175,10 +188,18 @@
175
188
  #undef __WIN32__
176
189
  #define __WIN32__ 1
177
190
  #endif
191
+ /* This is to support generic "any GDK" separate from a platform-specific GDK */
192
+ #if defined(__WINGDK__) || defined(__XBOXONE__) || defined(__XBOXSERIES__)
193
+ #undef __GDK__
194
+ #define __GDK__ 1
195
+ #endif
178
196
  #if defined(__PSP__)
179
197
  #undef __PSP__
180
198
  #define __PSP__ 1
181
199
  #endif
200
+ #if defined(PS2)
201
+ #define __PS2__ 1
202
+ #endif
182
203
 
183
204
  /* The NACL compiler defines __native_client__ and __pnacl__
184
205
  * Ref: http://www.chromium.org/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi
@@ -200,6 +221,11 @@
200
221
  #define __VITA__ 1
201
222
  #endif
202
223
 
224
+ #if defined(__3DS__)
225
+ #undef __3DS__
226
+ #define __3DS__ 1
227
+ #endif
228
+
203
229
  #include "begin_code.h"
204
230
  /* Set up for C function definitions, even when using C++ */
205
231
  #ifdef __cplusplus
@@ -54,8 +54,8 @@ typedef struct SDL_Point
54
54
  /**
55
55
  * The structure that defines a point (floating point)
56
56
  *
57
- * \sa SDL_EnclosePoints
58
- * \sa SDL_PointInRect
57
+ * \sa SDL_EncloseFPoints
58
+ * \sa SDL_PointInFRect
59
59
  */
60
60
  typedef struct SDL_FPoint
61
61
  {
@@ -71,6 +71,7 @@ typedef struct SDL_FPoint
71
71
  * \sa SDL_RectEquals
72
72
  * \sa SDL_HasIntersection
73
73
  * \sa SDL_IntersectRect
74
+ * \sa SDL_IntersectRectAndLine
74
75
  * \sa SDL_UnionRect
75
76
  * \sa SDL_EnclosePoints
76
77
  */
@@ -83,6 +84,16 @@ typedef struct SDL_Rect
83
84
 
84
85
  /**
85
86
  * A rectangle, with the origin at the upper left (floating point).
87
+ *
88
+ * \sa SDL_FRectEmpty
89
+ * \sa SDL_FRectEquals
90
+ * \sa SDL_FRectEqualsEpsilon
91
+ * \sa SDL_HasIntersectionF
92
+ * \sa SDL_IntersectFRect
93
+ * \sa SDL_IntersectFRectAndLine
94
+ * \sa SDL_UnionFRect
95
+ * \sa SDL_EncloseFPoints
96
+ * \sa SDL_PointInFRect
86
97
  */
87
98
  typedef struct SDL_FRect
88
99
  {
@@ -213,6 +224,147 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *
213
224
  int *Y1, int *X2,
214
225
  int *Y2);
215
226
 
227
+
228
+ /* SDL_FRect versions... */
229
+
230
+ /**
231
+ * Returns true if point resides inside a rectangle.
232
+ */
233
+ SDL_FORCE_INLINE SDL_bool SDL_PointInFRect(const SDL_FPoint *p, const SDL_FRect *r)
234
+ {
235
+ return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
236
+ (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
237
+ }
238
+
239
+ /**
240
+ * Returns true if the rectangle has no area.
241
+ */
242
+ SDL_FORCE_INLINE SDL_bool SDL_FRectEmpty(const SDL_FRect *r)
243
+ {
244
+ return ((!r) || (r->w <= 0.0f) || (r->h <= 0.0f)) ? SDL_TRUE : SDL_FALSE;
245
+ }
246
+
247
+ /**
248
+ * Returns true if the two rectangles are equal, within some given epsilon.
249
+ *
250
+ * \since This function is available since SDL 2.0.22.
251
+ */
252
+ SDL_FORCE_INLINE SDL_bool SDL_FRectEqualsEpsilon(const SDL_FRect *a, const SDL_FRect *b, const float epsilon)
253
+ {
254
+ return (a && b && ((a == b) ||
255
+ ((SDL_fabsf(a->x - b->x) <= epsilon) &&
256
+ (SDL_fabsf(a->y - b->y) <= epsilon) &&
257
+ (SDL_fabsf(a->w - b->w) <= epsilon) &&
258
+ (SDL_fabsf(a->h - b->h) <= epsilon))))
259
+ ? SDL_TRUE : SDL_FALSE;
260
+ }
261
+
262
+ /**
263
+ * Returns true if the two rectangles are equal, using a default epsilon.
264
+ *
265
+ * \since This function is available since SDL 2.0.22.
266
+ */
267
+ SDL_FORCE_INLINE SDL_bool SDL_FRectEquals(const SDL_FRect *a, const SDL_FRect *b)
268
+ {
269
+ return SDL_FRectEqualsEpsilon(a, b, SDL_FLT_EPSILON);
270
+ }
271
+
272
+ /**
273
+ * Determine whether two rectangles intersect with float precision.
274
+ *
275
+ * If either pointer is NULL the function will return SDL_FALSE.
276
+ *
277
+ * \param A an SDL_FRect structure representing the first rectangle
278
+ * \param B an SDL_FRect structure representing the second rectangle
279
+ * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
280
+ *
281
+ * \since This function is available since SDL 2.0.22.
282
+ *
283
+ * \sa SDL_IntersectRect
284
+ */
285
+ extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersectionF(const SDL_FRect * A,
286
+ const SDL_FRect * B);
287
+
288
+ /**
289
+ * Calculate the intersection of two rectangles with float precision.
290
+ *
291
+ * If `result` is NULL then this function will return SDL_FALSE.
292
+ *
293
+ * \param A an SDL_FRect structure representing the first rectangle
294
+ * \param B an SDL_FRect structure representing the second rectangle
295
+ * \param result an SDL_FRect structure filled in with the intersection of
296
+ * rectangles `A` and `B`
297
+ * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
298
+ *
299
+ * \since This function is available since SDL 2.0.22.
300
+ *
301
+ * \sa SDL_HasIntersectionF
302
+ */
303
+ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRect(const SDL_FRect * A,
304
+ const SDL_FRect * B,
305
+ SDL_FRect * result);
306
+
307
+ /**
308
+ * Calculate the union of two rectangles with float precision.
309
+ *
310
+ * \param A an SDL_FRect structure representing the first rectangle
311
+ * \param B an SDL_FRect structure representing the second rectangle
312
+ * \param result an SDL_FRect structure filled in with the union of rectangles
313
+ * `A` and `B`
314
+ *
315
+ * \since This function is available since SDL 2.0.22.
316
+ */
317
+ extern DECLSPEC void SDLCALL SDL_UnionFRect(const SDL_FRect * A,
318
+ const SDL_FRect * B,
319
+ SDL_FRect * result);
320
+
321
+ /**
322
+ * Calculate a minimal rectangle enclosing a set of points with float
323
+ * precision.
324
+ *
325
+ * If `clip` is not NULL then only points inside of the clipping rectangle are
326
+ * considered.
327
+ *
328
+ * \param points an array of SDL_FPoint structures representing points to be
329
+ * enclosed
330
+ * \param count the number of structures in the `points` array
331
+ * \param clip an SDL_FRect used for clipping or NULL to enclose all points
332
+ * \param result an SDL_FRect structure filled in with the minimal enclosing
333
+ * rectangle
334
+ * \returns SDL_TRUE if any points were enclosed or SDL_FALSE if all the
335
+ * points were outside of the clipping rectangle.
336
+ *
337
+ * \since This function is available since SDL 2.0.22.
338
+ */
339
+ extern DECLSPEC SDL_bool SDLCALL SDL_EncloseFPoints(const SDL_FPoint * points,
340
+ int count,
341
+ const SDL_FRect * clip,
342
+ SDL_FRect * result);
343
+
344
+ /**
345
+ * Calculate the intersection of a rectangle and line segment with float
346
+ * precision.
347
+ *
348
+ * This function is used to clip a line segment to a rectangle. A line segment
349
+ * contained entirely within the rectangle or that does not intersect will
350
+ * remain unchanged. A line segment that crosses the rectangle at either or
351
+ * both ends will be clipped to the boundary of the rectangle and the new
352
+ * coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary.
353
+ *
354
+ * \param rect an SDL_FRect structure representing the rectangle to intersect
355
+ * \param X1 a pointer to the starting X-coordinate of the line
356
+ * \param Y1 a pointer to the starting Y-coordinate of the line
357
+ * \param X2 a pointer to the ending X-coordinate of the line
358
+ * \param Y2 a pointer to the ending Y-coordinate of the line
359
+ * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
360
+ *
361
+ * \since This function is available since SDL 2.0.22.
362
+ */
363
+ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRectAndLine(const SDL_FRect *
364
+ rect, float *X1,
365
+ float *Y1, float *X2,
366
+ float *Y2);
367
+
216
368
  /* Ends C function definitions when using C++ */
217
369
  #ifdef __cplusplus
218
370
  }
@@ -261,6 +261,17 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface *
261
261
  */
262
262
  extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window);
263
263
 
264
+ /**
265
+ * Get the window associated with a renderer.
266
+ *
267
+ * \param renderer the renderer to query
268
+ * \returns the window on success or NULL on failure; call SDL_GetError() for
269
+ * more information.
270
+ *
271
+ * \since This function is available since SDL 2.0.22.
272
+ */
273
+ extern DECLSPEC SDL_Window * SDLCALL SDL_RenderGetWindow(SDL_Renderer *renderer);
274
+
264
275
  /**
265
276
  * Get information about a rendering context.
266
277
  *
@@ -356,11 +367,15 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer
356
367
  * \param texture the texture to query
357
368
  * \param format a pointer filled in with the raw format of the texture; the
358
369
  * actual format may differ, but pixel transfers will use this
359
- * format (one of the SDL_PixelFormatEnum values)
370
+ * format (one of the SDL_PixelFormatEnum values). This argument
371
+ * can be NULL if you don't need this information.
360
372
  * \param access a pointer filled in with the actual access to the texture
361
- * (one of the SDL_TextureAccess values)
362
- * \param w a pointer filled in with the width of the texture in pixels
363
- * \param h a pointer filled in with the height of the texture in pixels
373
+ * (one of the SDL_TextureAccess values). This argument can be
374
+ * NULL if you don't need this information.
375
+ * \param w a pointer filled in with the width of the texture in pixels. This
376
+ * argument can be NULL if you don't need this information.
377
+ * \param h a pointer filled in with the height of the texture in pixels. This
378
+ * argument can be NULL if you don't need this information.
364
379
  * \returns 0 on success or a negative error code on failure; call
365
380
  * SDL_GetError() for more information.
366
381
  *
@@ -810,9 +825,13 @@ extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, in
810
825
  /**
811
826
  * Get device independent resolution for rendering.
812
827
  *
813
- * This may return 0 for `w` and `h` if the SDL_Renderer has never had its
814
- * logical size set by SDL_RenderSetLogicalSize() and never had a render
815
- * target set.
828
+ * When using the main rendering target (eg no target texture is set): this
829
+ * may return 0 for `w` and `h` if the SDL_Renderer has never had its logical
830
+ * size set by SDL_RenderSetLogicalSize(). Otherwise it returns the logical
831
+ * width and height.
832
+ *
833
+ * When using a target texture: Never return 0 for `w` and `h` at first. Then
834
+ * it returns the logical width and height that are set.
816
835
  *
817
836
  * \param renderer a rendering context
818
837
  * \param w an int to be filled with the width
@@ -985,7 +1004,7 @@ extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer,
985
1004
  * and logical renderer size set
986
1005
  *
987
1006
  * \param renderer the renderer from which the logical coordinates should be
988
- * calcualted
1007
+ * calculated
989
1008
  * \param windowX the real X coordinate in the window
990
1009
  * \param windowY the real Y coordinate in the window
991
1010
  * \param logicalX the pointer filled with the logical x coordinate
@@ -1002,19 +1021,23 @@ extern DECLSPEC void SDLCALL SDL_RenderWindowToLogical(SDL_Renderer * renderer,
1002
1021
  int windowX, int windowY,
1003
1022
  float *logicalX, float *logicalY);
1004
1023
 
1005
- /**
1006
- * Get real coordinates of point in window when given logical coordinates of point in renderer.
1007
- * Logical coordinates will differ from real coordinates when render is scaled and logical renderer size set
1008
- *
1009
- * \param renderer the renderer from which the window coordinates should be calculated
1024
+
1025
+ /**
1026
+ * Get real coordinates of point in window when given logical coordinates of
1027
+ * point in renderer.
1028
+ *
1029
+ * Logical coordinates will differ from real coordinates when render is scaled
1030
+ * and logical renderer size set
1031
+ *
1032
+ * \param renderer the renderer from which the window coordinates should be
1033
+ * calculated
1010
1034
  * \param logicalX the logical x coordinate
1011
1035
  * \param logicalY the logical y coordinate
1012
1036
  * \param windowX the pointer filled with the real X coordinate in the window
1013
1037
  * \param windowY the pointer filled with the real Y coordinate in the window
1014
-
1015
- *
1038
+ *
1016
1039
  * \since This function is available since SDL 2.0.18.
1017
- *
1040
+ *
1018
1041
  * \sa SDL_RenderGetScale
1019
1042
  * \sa SDL_RenderSetScale
1020
1043
  * \sa SDL_RenderGetLogicalSize
@@ -1603,6 +1626,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer,
1603
1626
  * vertex array Color and alpha modulation is done per vertex
1604
1627
  * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
1605
1628
  *
1629
+ * \param renderer The rendering context.
1606
1630
  * \param texture (optional) The SDL texture to use.
1607
1631
  * \param vertices Vertices.
1608
1632
  * \param num_vertices Number of vertices.
@@ -1627,6 +1651,7 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer,
1627
1651
  * vertex arrays Color and alpha modulation is done per vertex
1628
1652
  * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
1629
1653
  *
1654
+ * \param renderer The rendering context.
1630
1655
  * \param texture (optional) The SDL texture to use.
1631
1656
  * \param xy Vertex positions
1632
1657
  * \param xy_stride Byte size to move from one element to the next element
@@ -1658,7 +1683,8 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer,
1658
1683
  * Read pixels from the current rendering target to an array of pixels.
1659
1684
  *
1660
1685
  * **WARNING**: This is a very slow operation, and should not be used
1661
- * frequently.
1686
+ * frequently. If you're using this on the main rendering target, it should be
1687
+ * called after rendering and before SDL_RenderPresent().
1662
1688
  *
1663
1689
  * `pitch` specifies the number of bytes between rows in the destination
1664
1690
  * `pixels` data. This allows you to write to a subrectangle or have padded
@@ -1739,6 +1765,9 @@ extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);
1739
1765
  /**
1740
1766
  * Destroy the rendering context for a window and free associated textures.
1741
1767
  *
1768
+ * If `renderer` is NULL, this function will return immediately after setting
1769
+ * the SDL error message to "Invalid renderer". See SDL_GetError().
1770
+ *
1742
1771
  * \param renderer the rendering context
1743
1772
  *
1744
1773
  * \since This function is available since SDL 2.0.0.
@@ -1,2 +1,7 @@
1
- #define SDL_REVISION "https://github.com/libsdl-org/SDL.git@b424665e0899769b200231ba943353a5fee1b6b6"
1
+ /* Generated by updaterev.sh, do not edit */
2
+ #ifdef SDL_VENDOR_INFO
3
+ #define SDL_REVISION "SDL-release-2.26.1-0-gf17058b56 (" SDL_VENDOR_INFO ")"
4
+ #else
5
+ #define SDL_REVISION "SDL-release-2.26.1-0-gf17058b56"
6
+ #endif
2
7
  #define SDL_REVISION_NUMBER 0
@@ -45,9 +45,6 @@ extern "C" {
45
45
  #define SDL_RWOPS_JNIFILE 3U /**< Android asset */
46
46
  #define SDL_RWOPS_MEMORY 4U /**< Memory stream */
47
47
  #define SDL_RWOPS_MEMORY_RO 5U /**< Read-Only memory stream */
48
- #if defined(__VITA__)
49
- #define SDL_RWOPS_VITAFILE 6U /**< Vita file */
50
- #endif
51
48
 
52
49
  /**
53
50
  * This is the read/write operation structure -- very basic.
@@ -101,7 +98,7 @@ typedef struct SDL_RWops
101
98
  {
102
99
  void *asset;
103
100
  } androidio;
104
- #elif defined(__WIN32__)
101
+ #elif defined(__WIN32__) || defined(__GDK__)
105
102
  struct
106
103
  {
107
104
  SDL_bool append;
@@ -113,17 +110,6 @@ typedef struct SDL_RWops
113
110
  size_t left;
114
111
  } buffer;
115
112
  } windowsio;
116
- #elif defined(__VITA__)
117
- struct
118
- {
119
- int h;
120
- struct
121
- {
122
- void *data;
123
- size_t size;
124
- size_t left;
125
- } buffer;
126
- } vitaio;
127
113
  #endif
128
114
 
129
115
  #ifdef HAVE_STDIO_H