ruby2d 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/README.md +7 -9
- data/assets/Rakefile +85 -0
- data/assets/include/SDL2/SDL.h +1 -1
- data/assets/include/SDL2/SDL_assert.h +1 -1
- data/assets/include/SDL2/SDL_atomic.h +20 -2
- data/assets/include/SDL2/SDL_audio.h +47 -14
- data/assets/include/SDL2/SDL_bits.h +10 -1
- data/assets/include/SDL2/SDL_blendmode.h +7 -7
- data/assets/include/SDL2/SDL_clipboard.h +1 -1
- data/assets/include/SDL2/SDL_config.h +24 -390
- data/assets/include/SDL2/SDL_config_android.h +178 -0
- data/assets/include/SDL2/SDL_config_iphoneos.h +201 -0
- data/assets/include/SDL2/SDL_config_macosx.h +240 -0
- data/assets/include/SDL2/SDL_config_minimal.h +85 -0
- data/assets/include/SDL2/SDL_config_os2.h +170 -0
- data/assets/include/SDL2/SDL_config_pandora.h +133 -0
- data/assets/include/SDL2/SDL_config_psp.h +164 -0
- data/assets/include/SDL2/SDL_config_windows.h +257 -0
- data/assets/include/SDL2/SDL_config_winrt.h +240 -0
- data/assets/include/SDL2/SDL_config_wiz.h +146 -0
- data/assets/include/SDL2/SDL_copying.h +20 -0
- data/assets/include/SDL2/SDL_cpuinfo.h +90 -8
- data/assets/include/SDL2/SDL_egl.h +1 -1
- data/assets/include/SDL2/SDL_endian.h +1 -1
- data/assets/include/SDL2/SDL_error.h +1 -1
- data/assets/include/SDL2/SDL_events.h +4 -1
- data/assets/include/SDL2/SDL_filesystem.h +1 -1
- data/assets/include/SDL2/SDL_gamecontroller.h +1 -1
- data/assets/include/SDL2/SDL_gesture.h +1 -1
- data/assets/include/SDL2/SDL_haptic.h +1 -1
- data/assets/include/SDL2/SDL_hints.h +145 -14
- data/assets/include/SDL2/SDL_image.h +2 -2
- data/assets/include/SDL2/SDL_joystick.h +1 -1
- data/assets/include/SDL2/SDL_keyboard.h +1 -1
- data/assets/include/SDL2/SDL_keycode.h +1 -1
- data/assets/include/SDL2/SDL_loadso.h +1 -1
- data/assets/include/SDL2/SDL_log.h +1 -1
- data/assets/include/SDL2/SDL_main.h +28 -16
- data/assets/include/SDL2/SDL_messagebox.h +1 -1
- data/assets/include/SDL2/SDL_mouse.h +1 -1
- data/assets/include/SDL2/SDL_mutex.h +1 -1
- data/assets/include/SDL2/SDL_name.h +1 -1
- data/assets/include/SDL2/SDL_opengl.h +1 -1
- data/assets/include/SDL2/SDL_opengles.h +1 -1
- data/assets/include/SDL2/SDL_opengles2.h +1 -1
- data/assets/include/SDL2/SDL_pixels.h +3 -3
- data/assets/include/SDL2/SDL_platform.h +1 -1
- data/assets/include/SDL2/SDL_power.h +1 -1
- data/assets/include/SDL2/SDL_quit.h +1 -1
- data/assets/include/SDL2/SDL_rect.h +29 -3
- data/assets/include/SDL2/SDL_render.h +168 -1
- data/assets/include/SDL2/SDL_revision.h +2 -2
- data/assets/include/SDL2/SDL_rwops.h +50 -13
- data/assets/include/SDL2/SDL_scancode.h +2 -2
- data/assets/include/SDL2/SDL_sensor.h +4 -4
- data/assets/include/SDL2/SDL_shape.h +1 -1
- data/assets/include/SDL2/SDL_stdinc.h +1 -1
- data/assets/include/SDL2/SDL_surface.h +2 -1
- data/assets/include/SDL2/SDL_system.h +1 -1
- data/assets/include/SDL2/SDL_syswm.h +11 -8
- data/assets/include/SDL2/SDL_test.h +1 -1
- data/assets/include/SDL2/SDL_test_assert.h +1 -1
- data/assets/include/SDL2/SDL_test_common.h +22 -5
- data/assets/include/SDL2/SDL_test_compare.h +1 -1
- data/assets/include/SDL2/SDL_test_crc32.h +1 -1
- data/assets/include/SDL2/SDL_test_font.h +1 -1
- data/assets/include/SDL2/SDL_test_fuzzer.h +1 -1
- data/assets/include/SDL2/SDL_test_harness.h +1 -1
- data/assets/include/SDL2/SDL_test_images.h +1 -1
- data/assets/include/SDL2/SDL_test_log.h +1 -1
- data/assets/include/SDL2/SDL_test_md5.h +1 -1
- data/assets/include/SDL2/SDL_test_memory.h +3 -3
- data/assets/include/SDL2/SDL_test_random.h +1 -1
- data/assets/include/SDL2/SDL_thread.h +1 -1
- data/assets/include/SDL2/SDL_timer.h +1 -1
- data/assets/include/SDL2/SDL_touch.h +17 -1
- data/assets/include/SDL2/SDL_types.h +1 -1
- data/assets/include/SDL2/SDL_version.h +2 -2
- data/assets/include/SDL2/SDL_video.h +1 -1
- data/assets/include/SDL2/SDL_vulkan.h +3 -3
- data/assets/include/SDL2/begin_code.h +4 -1
- data/assets/include/SDL2/close_code.h +4 -1
- data/assets/include/simple2d.h +22 -0
- data/assets/linux/simple2d/Makefile +11 -8
- data/assets/linux/simple2d/bin/simple2d.sh +13 -7
- data/assets/linux/simple2d/include/simple2d.h +22 -0
- data/assets/linux/simple2d/src/gl.c +17 -13
- data/assets/linux/simple2d/src/gl3.c +105 -32
- data/assets/linux/simple2d/src/sound.c +37 -0
- data/assets/linux/simple2d/src/window.c +11 -0
- data/assets/macos/lib/libFLAC.a +0 -0
- data/assets/macos/lib/libSDL2.a +0 -0
- data/assets/macos/lib/libSDL2_image.a +0 -0
- data/assets/macos/lib/libSDL2_mixer.a +0 -0
- data/assets/macos/lib/libSDL2_ttf.a +0 -0
- data/assets/macos/lib/libfreetype.a +0 -0
- data/assets/macos/lib/libjpeg.a +0 -0
- data/assets/macos/lib/libmpg123.a +0 -0
- data/assets/macos/lib/libogg.a +0 -0
- data/assets/macos/lib/libpng16.a +0 -0
- data/assets/macos/lib/libsimple2d.a +0 -0
- data/assets/macos/lib/libtiff.a +0 -0
- data/assets/macos/lib/libwebp.a +0 -0
- data/assets/mingw/bin/SDL2.dll +0 -0
- data/assets/mingw/bin/SDL2_image.dll +0 -0
- data/assets/mingw/bin/libpng16-16.dll +0 -0
- data/assets/mingw/bin/libtiff-5.dll +0 -0
- data/assets/mingw/bin/libwebp-7.dll +0 -0
- data/assets/mingw/lib/libSDL2.a +0 -0
- data/assets/mingw/lib/libSDL2.dll.a +0 -0
- data/assets/mingw/lib/libSDL2_image.a +0 -0
- data/assets/mingw/lib/libSDL2_image.dll.a +0 -0
- data/assets/mingw/lib/libSDL2_test.a +0 -0
- data/assets/mingw/lib/libSDL2main.a +0 -0
- data/assets/mingw/lib/libsimple2d.a +0 -0
- data/ext/ruby2d/extconf.rb +1 -1
- data/lib/ruby2d/version.rb +1 -1
- metadata +14 -2
@@ -0,0 +1,146 @@
|
|
1
|
+
/*
|
2
|
+
Simple DirectMedia Layer
|
3
|
+
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
4
|
+
|
5
|
+
This software is provided 'as-is', without any express or implied
|
6
|
+
warranty. In no event will the authors be held liable for any damages
|
7
|
+
arising from the use of this software.
|
8
|
+
|
9
|
+
Permission is granted to anyone to use this software for any purpose,
|
10
|
+
including commercial applications, and to alter it and redistribute it
|
11
|
+
freely, subject to the following restrictions:
|
12
|
+
|
13
|
+
1. The origin of this software must not be misrepresented; you must not
|
14
|
+
claim that you wrote the original software. If you use this software
|
15
|
+
in a product, an acknowledgment in the product documentation would be
|
16
|
+
appreciated but is not required.
|
17
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
18
|
+
misrepresented as being the original software.
|
19
|
+
3. This notice may not be removed or altered from any source distribution.
|
20
|
+
*/
|
21
|
+
|
22
|
+
#ifndef SDL_config_wiz_h_
|
23
|
+
#define SDL_config_wiz_h_
|
24
|
+
#define SDL_config_h_
|
25
|
+
|
26
|
+
/* This is a set of defines to configure the SDL features */
|
27
|
+
|
28
|
+
/* General platform specific identifiers */
|
29
|
+
#include "SDL_platform.h"
|
30
|
+
|
31
|
+
#define SDL_BYTEORDER 1234
|
32
|
+
|
33
|
+
#define STDC_HEADERS 1
|
34
|
+
#define HAVE_ALLOCA_H 1
|
35
|
+
#define HAVE_CTYPE_H 1
|
36
|
+
#define HAVE_ICONV_H 1
|
37
|
+
#define HAVE_INTTYPES_H 1
|
38
|
+
#define HAVE_LIMITS_H 1
|
39
|
+
#define HAVE_MALLOC_H 1
|
40
|
+
#define HAVE_MATH_H 1
|
41
|
+
#define HAVE_MEMORY_H 1
|
42
|
+
#define HAVE_SIGNAL_H 1
|
43
|
+
#define HAVE_STDARG_H 1
|
44
|
+
#define HAVE_STDINT_H 1
|
45
|
+
#define HAVE_STDIO_H 1
|
46
|
+
#define HAVE_STDLIB_H 1
|
47
|
+
#define HAVE_STRINGS_H 1
|
48
|
+
#define HAVE_STRING_H 1
|
49
|
+
#define HAVE_SYS_TYPES_H 1
|
50
|
+
|
51
|
+
#define HAVE_MALLOC 1
|
52
|
+
#define HAVE_CALLOC 1
|
53
|
+
#define HAVE_REALLOC 1
|
54
|
+
#define HAVE_FREE 1
|
55
|
+
#define HAVE_ALLOCA 1
|
56
|
+
#define HAVE_GETENV 1
|
57
|
+
#define HAVE_SETENV 1
|
58
|
+
#define HAVE_PUTENV 1
|
59
|
+
#define HAVE_UNSETENV 1
|
60
|
+
#define HAVE_QSORT 1
|
61
|
+
#define HAVE_ABS 1
|
62
|
+
#define HAVE_BCOPY 1
|
63
|
+
#define HAVE_MEMSET 1
|
64
|
+
#define HAVE_MEMCPY 1
|
65
|
+
#define HAVE_MEMMOVE 1
|
66
|
+
#define HAVE_STRLEN 1
|
67
|
+
#define HAVE_STRCHR 1
|
68
|
+
#define HAVE_STRRCHR 1
|
69
|
+
#define HAVE_STRSTR 1
|
70
|
+
#define HAVE_STRTOL 1
|
71
|
+
#define HAVE_STRTOUL 1
|
72
|
+
#define HAVE_STRTOLL 1
|
73
|
+
#define HAVE_STRTOULL 1
|
74
|
+
#define HAVE_ATOI 1
|
75
|
+
#define HAVE_ATOF 1
|
76
|
+
#define HAVE_STRCMP 1
|
77
|
+
#define HAVE_STRNCMP 1
|
78
|
+
#define HAVE_STRCASECMP 1
|
79
|
+
#define HAVE_STRNCASECMP 1
|
80
|
+
#define HAVE_VSSCANF 1
|
81
|
+
#define HAVE_VSNPRINTF 1
|
82
|
+
#define HAVE_M_PI 1
|
83
|
+
#define HAVE_ACOS 1
|
84
|
+
#define HAVE_ACOSF 1
|
85
|
+
#define HAVE_ASIN 1
|
86
|
+
#define HAVE_ASINF 1
|
87
|
+
#define HAVE_ATAN 1
|
88
|
+
#define HAVE_ATANF 1
|
89
|
+
#define HAVE_ATAN2 1
|
90
|
+
#define HAVE_ATAN2F 1
|
91
|
+
#define HAVE_CEIL 1
|
92
|
+
#define HAVE_CEILF 1
|
93
|
+
#define HAVE_COPYSIGN 1
|
94
|
+
#define HAVE_COPYSIGNF 1
|
95
|
+
#define HAVE_COS 1
|
96
|
+
#define HAVE_COSF 1
|
97
|
+
#define HAVE_EXP 1
|
98
|
+
#define HAVE_EXPF 1
|
99
|
+
#define HAVE_FABS 1
|
100
|
+
#define HAVE_FABSF 1
|
101
|
+
#define HAVE_FLOOR 1
|
102
|
+
#define HAVE_FLOORF 1
|
103
|
+
#define HAVE_FMOD 1
|
104
|
+
#define HAVE_FMODF 1
|
105
|
+
#define HAVE_LOG 1
|
106
|
+
#define HAVE_LOGF 1
|
107
|
+
#define HAVE_LOG10 1
|
108
|
+
#define HAVE_LOG10F 1
|
109
|
+
#define HAVE_POW 1
|
110
|
+
#define HAVE_POWF 1
|
111
|
+
#define HAVE_SCALBN 1
|
112
|
+
#define HAVE_SCALBNF 1
|
113
|
+
#define HAVE_SIN 1
|
114
|
+
#define HAVE_SINF 1
|
115
|
+
#define HAVE_SQRT 1
|
116
|
+
#define HAVE_SQRTF 1
|
117
|
+
#define HAVE_TAN 1
|
118
|
+
#define HAVE_TANF 1
|
119
|
+
#define HAVE_SIGACTION 1
|
120
|
+
#define HAVE_SETJMP 1
|
121
|
+
#define HAVE_NANOSLEEP 1
|
122
|
+
#define HAVE_POW 1
|
123
|
+
|
124
|
+
#define SDL_AUDIO_DRIVER_DUMMY 1
|
125
|
+
#define SDL_AUDIO_DRIVER_OSS 1
|
126
|
+
|
127
|
+
#define SDL_INPUT_LINUXEV 1
|
128
|
+
#define SDL_INPUT_TSLIB 1
|
129
|
+
#define SDL_JOYSTICK_LINUX 1
|
130
|
+
#define SDL_HAPTIC_LINUX 1
|
131
|
+
|
132
|
+
#define SDL_SENSOR_DUMMY 1
|
133
|
+
|
134
|
+
#define SDL_LOADSO_DLOPEN 1
|
135
|
+
|
136
|
+
#define SDL_THREAD_PTHREAD 1
|
137
|
+
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1
|
138
|
+
|
139
|
+
#define SDL_TIMER_UNIX 1
|
140
|
+
|
141
|
+
#define SDL_VIDEO_DRIVER_DUMMY 1
|
142
|
+
#define SDL_VIDEO_DRIVER_PANDORA 1
|
143
|
+
#define SDL_VIDEO_RENDER_OGL_ES 1
|
144
|
+
#define SDL_VIDEO_OPENGL_ES 1
|
145
|
+
|
146
|
+
#endif /* SDL_config_wiz_h_ */
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/*
|
2
|
+
Simple DirectMedia Layer
|
3
|
+
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
4
|
+
|
5
|
+
This software is provided 'as-is', without any express or implied
|
6
|
+
warranty. In no event will the authors be held liable for any damages
|
7
|
+
arising from the use of this software.
|
8
|
+
|
9
|
+
Permission is granted to anyone to use this software for any purpose,
|
10
|
+
including commercial applications, and to alter it and redistribute it
|
11
|
+
freely, subject to the following restrictions:
|
12
|
+
|
13
|
+
1. The origin of this software must not be misrepresented; you must not
|
14
|
+
claim that you wrote the original software. If you use this software
|
15
|
+
in a product, an acknowledgment in the product documentation would be
|
16
|
+
appreciated but is not required.
|
17
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
18
|
+
misrepresented as being the original software.
|
19
|
+
3. This notice may not be removed or altered from any source distribution.
|
20
|
+
*/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
Simple DirectMedia Layer
|
3
|
-
Copyright (C) 1997-
|
3
|
+
Copyright (C) 1997-2019 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
|
@@ -41,24 +41,43 @@
|
|
41
41
|
#else
|
42
42
|
#include <intrin.h>
|
43
43
|
#ifndef _WIN64
|
44
|
+
#ifndef __MMX__
|
44
45
|
#define __MMX__
|
46
|
+
#endif
|
47
|
+
#ifndef __3dNOW__
|
45
48
|
#define __3dNOW__
|
46
49
|
#endif
|
50
|
+
#endif
|
51
|
+
#ifndef __SSE__
|
47
52
|
#define __SSE__
|
53
|
+
#endif
|
54
|
+
#ifndef __SSE2__
|
48
55
|
#define __SSE2__
|
56
|
+
#endif
|
49
57
|
#endif /* __clang__ */
|
50
58
|
#elif defined(__MINGW64_VERSION_MAJOR)
|
51
59
|
#include <intrin.h>
|
52
60
|
#else
|
53
|
-
|
54
|
-
#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_ALTIVEC__) &&
|
61
|
+
/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
|
62
|
+
#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
|
55
63
|
#include <altivec.h>
|
56
|
-
#undef pixel
|
57
|
-
#undef bool
|
58
64
|
#endif
|
59
|
-
#
|
60
|
-
#if defined(
|
61
|
-
#include <arm_neon.h>
|
65
|
+
#if !defined(SDL_DISABLE_ARM_NEON_H)
|
66
|
+
# if defined(__ARM_NEON)
|
67
|
+
# include <arm_neon.h>
|
68
|
+
# elif defined(__WINDOWS__) || defined(__WINRT__)
|
69
|
+
/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
|
70
|
+
# if defined(_M_ARM)
|
71
|
+
# include <armintr.h>
|
72
|
+
# include <arm_neon.h>
|
73
|
+
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
74
|
+
# endif
|
75
|
+
# if defined (_M_ARM64)
|
76
|
+
# include <armintr.h>
|
77
|
+
# include <arm_neon.h>
|
78
|
+
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
79
|
+
# endif
|
80
|
+
# endif
|
62
81
|
#endif
|
63
82
|
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
|
64
83
|
#include <mm3dnow.h>
|
@@ -177,6 +196,69 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
|
|
177
196
|
*/
|
178
197
|
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
179
198
|
|
199
|
+
/**
|
200
|
+
* \brief Report the alignment this system needs for SIMD allocations.
|
201
|
+
*
|
202
|
+
* This will return the minimum number of bytes to which a pointer must be
|
203
|
+
* aligned to be compatible with SIMD instructions on the current machine.
|
204
|
+
* For example, if the machine supports SSE only, it will return 16, but if
|
205
|
+
* it supports AVX-512F, it'll return 64 (etc). This only reports values for
|
206
|
+
* instruction sets SDL knows about, so if your SDL build doesn't have
|
207
|
+
* SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
|
208
|
+
* not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
|
209
|
+
* Plan accordingly.
|
210
|
+
*/
|
211
|
+
extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
|
212
|
+
|
213
|
+
/**
|
214
|
+
* \brief Allocate memory in a SIMD-friendly way.
|
215
|
+
*
|
216
|
+
* This will allocate a block of memory that is suitable for use with SIMD
|
217
|
+
* instructions. Specifically, it will be properly aligned and padded for
|
218
|
+
* the system's supported vector instructions.
|
219
|
+
*
|
220
|
+
* The memory returned will be padded such that it is safe to read or write
|
221
|
+
* an incomplete vector at the end of the memory block. This can be useful
|
222
|
+
* so you don't have to drop back to a scalar fallback at the end of your
|
223
|
+
* SIMD processing loop to deal with the final elements without overflowing
|
224
|
+
* the allocated buffer.
|
225
|
+
*
|
226
|
+
* You must free this memory with SDL_FreeSIMD(), not free() or SDL_free()
|
227
|
+
* or delete[], etc.
|
228
|
+
*
|
229
|
+
* Note that SDL will only deal with SIMD instruction sets it is aware of;
|
230
|
+
* for example, SDL 2.0.8 knows that SSE wants 16-byte vectors
|
231
|
+
* (SDL_HasSSE()), and AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't
|
232
|
+
* know that AVX-512 wants 64. To be clear: if you can't decide to use an
|
233
|
+
* instruction set with an SDL_Has*() function, don't use that instruction
|
234
|
+
* set with memory allocated through here.
|
235
|
+
*
|
236
|
+
* SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
|
237
|
+
* out of memory.
|
238
|
+
*
|
239
|
+
* \param len The length, in bytes, of the block to allocated. The actual
|
240
|
+
* allocated block might be larger due to padding, etc.
|
241
|
+
* \return Pointer to newly-allocated block, NULL if out of memory.
|
242
|
+
*
|
243
|
+
* \sa SDL_SIMDAlignment
|
244
|
+
* \sa SDL_SIMDFree
|
245
|
+
*/
|
246
|
+
extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
|
247
|
+
|
248
|
+
/**
|
249
|
+
* \brief Deallocate memory obtained from SDL_SIMDAlloc
|
250
|
+
*
|
251
|
+
* It is not valid to use this function on a pointer from anything but
|
252
|
+
* SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
|
253
|
+
* SDL_malloc, memalign, new[], etc.
|
254
|
+
*
|
255
|
+
* However, SDL_SIMDFree(NULL) is a legal no-op.
|
256
|
+
*
|
257
|
+
* \sa SDL_SIMDAlloc
|
258
|
+
*/
|
259
|
+
extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
|
260
|
+
|
261
|
+
/* vi: set ts=4 sw=4 expandtab: */
|
180
262
|
/* Ends C function definitions when using C++ */
|
181
263
|
#ifdef __cplusplus
|
182
264
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
Simple DirectMedia Layer
|
3
|
-
Copyright (C) 1997-
|
3
|
+
Copyright (C) 1997-2019 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-
|
3
|
+
Copyright (C) 1997-2019 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-
|
3
|
+
Copyright (C) 1997-2019 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-
|
3
|
+
Copyright (C) 1997-2019 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
|
@@ -594,6 +594,9 @@ typedef union SDL_Event
|
|
594
594
|
Uint8 padding[56];
|
595
595
|
} SDL_Event;
|
596
596
|
|
597
|
+
/* Make sure we haven't broken binary compatibility */
|
598
|
+
SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == 56);
|
599
|
+
|
597
600
|
|
598
601
|
/* Function prototypes */
|
599
602
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
Simple DirectMedia Layer
|
3
|
-
Copyright (C) 1997-
|
3
|
+
Copyright (C) 1997-2019 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-
|
3
|
+
Copyright (C) 1997-2019 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-
|
3
|
+
Copyright (C) 1997-2019 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-
|
3
|
+
Copyright (C) 1997-2019 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-
|
3
|
+
Copyright (C) 1997-2019 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
|
@@ -315,6 +315,16 @@ extern "C" {
|
|
315
315
|
*/
|
316
316
|
#define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
|
317
317
|
|
318
|
+
/**
|
319
|
+
* \brief A variable controlling whether mouse events should generate synthetic touch events
|
320
|
+
*
|
321
|
+
* This variable can be set to the following values:
|
322
|
+
* "0" - Mouse events will not generate touch events (default for desktop platforms)
|
323
|
+
* "1" - Mouse events will generate touch events (default for mobile platforms, such as Android and iOS)
|
324
|
+
*/
|
325
|
+
|
326
|
+
#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
|
327
|
+
|
318
328
|
/**
|
319
329
|
* \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
|
320
330
|
*
|
@@ -436,6 +446,16 @@ extern "C" {
|
|
436
446
|
*/
|
437
447
|
#define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
|
438
448
|
|
449
|
+
/**
|
450
|
+
* \brief A variable that lets you provide a file with extra gamecontroller db entries.
|
451
|
+
*
|
452
|
+
* The file should contain lines of gamecontroller config data, see SDL_gamecontroller.h
|
453
|
+
*
|
454
|
+
* This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
|
455
|
+
* You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
|
456
|
+
*/
|
457
|
+
#define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
|
458
|
+
|
439
459
|
/**
|
440
460
|
* \brief A variable containing a list of devices to skip when scanning for game controllers.
|
441
461
|
*
|
@@ -836,19 +856,7 @@ extern "C" {
|
|
836
856
|
*/
|
837
857
|
#define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
|
838
858
|
|
839
|
-
|
840
|
-
* \brief A variable to control whether mouse and touch events are to be treated together or separately
|
841
|
-
*
|
842
|
-
* The variable can be set to the following values:
|
843
|
-
* "0" - Mouse events will be handled as touch events, and touch will raise fake mouse
|
844
|
-
* events. This is the behaviour of SDL <= 2.0.3. (default)
|
845
|
-
* "1" - Mouse events will be handled separately from pure touch events.
|
846
|
-
*
|
847
|
-
* The value of this hint is used at runtime, so it can be changed at any time.
|
848
|
-
*/
|
849
|
-
#define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH"
|
850
|
-
|
851
|
-
/**
|
859
|
+
/**
|
852
860
|
* \brief A variable to control whether we trap the Android back button to handle it manually.
|
853
861
|
* This is necessary for the right mouse button to work on some Android devices, or
|
854
862
|
* to be able to trap the back button for use in your code reliably. If set to true,
|
@@ -865,6 +873,17 @@ extern "C" {
|
|
865
873
|
*/
|
866
874
|
#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
|
867
875
|
|
876
|
+
/**
|
877
|
+
* \brief A variable to control whether the event loop will block itself when the app is paused.
|
878
|
+
*
|
879
|
+
* The variable can be set to the following values:
|
880
|
+
* "0" - Non blocking.
|
881
|
+
* "1" - Blocking. (default)
|
882
|
+
*
|
883
|
+
* The value should be set before SDL is initialized.
|
884
|
+
*/
|
885
|
+
#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
|
886
|
+
|
868
887
|
/**
|
869
888
|
* \brief A variable to control whether the return key on the soft keyboard
|
870
889
|
* should hide the soft keyboard on Android and iOS.
|
@@ -1043,6 +1062,118 @@ extern "C" {
|
|
1043
1062
|
*/
|
1044
1063
|
#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
|
1045
1064
|
|
1065
|
+
/**
|
1066
|
+
* \brief A variable controlling whether the 2D render API is compatible or efficient.
|
1067
|
+
*
|
1068
|
+
* This variable can be set to the following values:
|
1069
|
+
*
|
1070
|
+
* "0" - Don't use batching to make rendering more efficient.
|
1071
|
+
* "1" - Use batching, but might cause problems if app makes its own direct OpenGL calls.
|
1072
|
+
*
|
1073
|
+
* Up to SDL 2.0.9, the render API would draw immediately when requested. Now
|
1074
|
+
* it batches up draw requests and sends them all to the GPU only when forced
|
1075
|
+
* to (during SDL_RenderPresent, when changing render targets, by updating a
|
1076
|
+
* texture that the batch needs, etc). This is significantly more efficient,
|
1077
|
+
* but it can cause problems for apps that expect to render on top of the
|
1078
|
+
* render API's output. As such, SDL will disable batching if a specific
|
1079
|
+
* render backend is requested (since this might indicate that the app is
|
1080
|
+
* planning to use the underlying graphics API directly). This hint can
|
1081
|
+
* be used to explicitly request batching in this instance. It is a contract
|
1082
|
+
* that you will either never use the underlying graphics API directly, or
|
1083
|
+
* if you do, you will call SDL_RenderFlush() before you do so any current
|
1084
|
+
* batch goes to the GPU before your work begins. Not following this contract
|
1085
|
+
* will result in undefined behavior.
|
1086
|
+
*/
|
1087
|
+
#define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
|
1088
|
+
|
1089
|
+
|
1090
|
+
/**
|
1091
|
+
* \brief A variable controlling whether SDL logs all events pushed onto its internal queue.
|
1092
|
+
*
|
1093
|
+
* This variable can be set to the following values:
|
1094
|
+
*
|
1095
|
+
* "0" - Don't log any events (default)
|
1096
|
+
* "1" - Log all events except mouse and finger motion, which are pretty spammy.
|
1097
|
+
* "2" - Log all events.
|
1098
|
+
*
|
1099
|
+
* This is generally meant to be used to debug SDL itself, but can be useful
|
1100
|
+
* for application developers that need better visibility into what is going
|
1101
|
+
* on in the event queue. Logged events are sent through SDL_Log(), which
|
1102
|
+
* means by default they appear on stdout on most platforms or maybe
|
1103
|
+
* OutputDebugString() on Windows, and can be funneled by the app with
|
1104
|
+
* SDL_LogSetOutputFunction(), etc.
|
1105
|
+
*
|
1106
|
+
* This hint can be toggled on and off at runtime, if you only need to log
|
1107
|
+
* events for a small subset of program execution.
|
1108
|
+
*/
|
1109
|
+
#define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
|
1110
|
+
|
1111
|
+
|
1112
|
+
|
1113
|
+
/**
|
1114
|
+
* \brief Controls how the size of the RIFF chunk affects the loading of a WAVE file.
|
1115
|
+
*
|
1116
|
+
* The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
|
1117
|
+
* file) is not always reliable. In case the size is wrong, it's possible to
|
1118
|
+
* just ignore it and step through the chunks until a fixed limit is reached.
|
1119
|
+
*
|
1120
|
+
* Note that files that have trailing data unrelated to the WAVE file or
|
1121
|
+
* corrupt files may slow down the loading process without a reliable boundary.
|
1122
|
+
* By default, SDL stops after 10000 chunks to prevent wasting time. Use the
|
1123
|
+
* environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.
|
1124
|
+
*
|
1125
|
+
* This variable can be set to the following values:
|
1126
|
+
*
|
1127
|
+
* "force" - Always use the RIFF chunk size as a boundary for the chunk search
|
1128
|
+
* "ignorezero" - Like "force", but a zero size searches up to 4 GiB (default)
|
1129
|
+
* "ignore" - Ignore the RIFF chunk size and always search up to 4 GiB
|
1130
|
+
* "maximum" - Search for chunks until the end of file (not recommended)
|
1131
|
+
*/
|
1132
|
+
#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
|
1133
|
+
|
1134
|
+
/**
|
1135
|
+
* \brief Controls how a truncated WAVE file is handled.
|
1136
|
+
*
|
1137
|
+
* A WAVE file is considered truncated if any of the chunks are incomplete or
|
1138
|
+
* the data chunk size is not a multiple of the block size. By default, SDL
|
1139
|
+
* decodes until the first incomplete block, as most applications seem to do.
|
1140
|
+
*
|
1141
|
+
* This variable can be set to the following values:
|
1142
|
+
*
|
1143
|
+
* "verystrict" - Raise an error if the file is truncated
|
1144
|
+
* "strict" - Like "verystrict", but the size of the RIFF chunk is ignored
|
1145
|
+
* "dropframe" - Decode until the first incomplete sample frame
|
1146
|
+
* "dropblock" - Decode until the first incomplete block (default)
|
1147
|
+
*/
|
1148
|
+
#define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
|
1149
|
+
|
1150
|
+
/**
|
1151
|
+
* \brief Controls how the fact chunk affects the loading of a WAVE file.
|
1152
|
+
*
|
1153
|
+
* The fact chunk stores information about the number of samples of a WAVE
|
1154
|
+
* file. The Standards Update from Microsoft notes that this value can be used
|
1155
|
+
* to 'determine the length of the data in seconds'. This is especially useful
|
1156
|
+
* for compressed formats (for which this is a mandatory chunk) if they produce
|
1157
|
+
* multiple sample frames per block and truncating the block is not allowed.
|
1158
|
+
* The fact chunk can exactly specify how many sample frames there should be
|
1159
|
+
* in this case.
|
1160
|
+
*
|
1161
|
+
* Unfortunately, most application seem to ignore the fact chunk and so SDL
|
1162
|
+
* ignores it by default as well.
|
1163
|
+
*
|
1164
|
+
* This variable can be set to the following values:
|
1165
|
+
*
|
1166
|
+
* "truncate" - Use the number of samples to truncate the wave data if
|
1167
|
+
* the fact chunk is present and valid
|
1168
|
+
* "strict" - Like "truncate", but raise an error if the fact chunk
|
1169
|
+
* is invalid, not present for non-PCM formats, or if the
|
1170
|
+
* data chunk doesn't have that many samples
|
1171
|
+
* "ignorezero" - Like "truncate", but ignore fact chunk if the number of
|
1172
|
+
* samples is zero
|
1173
|
+
* "ignore" - Ignore fact chunk entirely (default)
|
1174
|
+
*/
|
1175
|
+
#define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
|
1176
|
+
|
1046
1177
|
/**
|
1047
1178
|
* \brief An enumeration of hint priorities
|
1048
1179
|
*/
|