summaryrefslogtreecommitdiff
path: root/src/contrib/SDL-2.30.2/docs
diff options
context:
space:
mode:
Diffstat (limited to 'src/contrib/SDL-2.30.2/docs')
-rw-r--r--src/contrib/SDL-2.30.2/docs/CONTRIBUTING.md97
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-android.md483
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-cmake.md163
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-directfb.md123
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-dynapi.md138
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-emscripten.md374
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-gdk.md176
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-gesture.md71
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-git.md19
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-hg.md4
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-ios.md307
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-kmsbsd.md27
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-linux.md96
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-macos.md285
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-n3ds.md28
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-nacl.md103
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-ngage.md44
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-os2.md92
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-pandora.md17
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-platforms.md8
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-porting.md68
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-ps2.md51
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-psp.md36
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-raspberrypi.md180
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-riscos.md41
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-touch.md86
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-versions.md60
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-visualc.md114
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-vita.md33
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-wince.md10
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-windows.md58
-rw-r--r--src/contrib/SDL-2.30.2/docs/README-winrt.md519
-rw-r--r--src/contrib/SDL-2.30.2/docs/README.md63
-rw-r--r--src/contrib/SDL-2.30.2/docs/doxyfile1561
-rw-r--r--src/contrib/SDL-2.30.2/docs/release_checklist.md49
35 files changed, 5584 insertions, 0 deletions
diff --git a/src/contrib/SDL-2.30.2/docs/CONTRIBUTING.md b/src/contrib/SDL-2.30.2/docs/CONTRIBUTING.md
new file mode 100644
index 0000000..969ce8b
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/CONTRIBUTING.md
@@ -0,0 +1,97 @@
1# Contributing to SDL
2
3We appreciate your interest in contributing to SDL, this document will describe how to report bugs, contribute code or ideas or edit documentation.
4
5**Table Of Contents**
6
7- [Filing a GitHub issue](#filing-a-github-issue)
8 - [Reporting a bug](#reporting-a-bug)
9 - [Suggesting enhancements](#suggesting-enhancements)
10- [Contributing code](#contributing-code)
11 - [Forking the project](#forking-the-project)
12 - [Following the style guide](#following-the-style-guide)
13 - [Running the tests](#running-the-tests)
14 - [Opening a pull request](#opening-a-pull-request)
15- [Contributing to the documentation](#contributing-to-the-documentation)
16 - [Editing a function documentation](#editing-a-function-documentation)
17 - [Editing the wiki](#editing-the-wiki)
18
19## Filing a GitHub issue
20
21### Reporting a bug
22
23If you think you have found a bug and would like to report it, here are the steps you should take:
24
25- Before opening a new issue, ensure your bug has not already been reported on the [GitHub Issues page](https://github.com/libsdl-org/SDL/issues).
26- On the issue tracker, click on [New Issue](https://github.com/libsdl-org/SDL/issues/new).
27- Include details about your environment, such as your Operating System and SDL version.
28- If possible, provide a small example that reproduces your bug.
29
30### Suggesting enhancements
31
32If you want to suggest changes for the project, here are the steps you should take:
33
34- Check if the suggestion has already been made on:
35 - the [issue tracker](https://github.com/libsdl-org/SDL/issues);
36 - the [discourse forum](https://discourse.libsdl.org/);
37 - or if a [pull request](https://github.com/libsdl-org/SDL/pulls) already exists.
38- On the issue tracker, click on [New Issue](https://github.com/libsdl-org/SDL/issues/new).
39- Describe what change you would like to happen.
40
41## Contributing code
42
43This section will cover how the process of forking the project, making a change and opening a pull request.
44
45### Forking the project
46
47The first step consists in making a fork of the project, this is only necessary for the first contribution.
48
49Head over to https://github.com/libsdl-org/SDL and click on the `Fork` button in the top right corner of your screen, you may leave the fields unchanged and click `Create Fork`.
50
51You will be redirected to your fork of the repository, click the green `Code` button and copy the git clone link.
52
53If you had already forked the repository, you may update it from the web page using the `Fetch upstream` button.
54
55### Following the style guide
56
57Code formatting is done using a custom `.clang-format` file, you can learn more about how to run it [here](https://clang.llvm.org/docs/ClangFormat.html).
58
59Some legacy code may not be formatted, as such avoid formatting the whole file at once and only format around your changes.
60
61For your commit message to be properly displayed on GitHub, it should contain:
62
63- A short description of the commit of 50 characters or less on the first line.
64- If necessary, add a blank line followed by a long description, each line should be 72 characters or less.
65
66For example:
67
68```
69Fix crash in SDL_FooBar.
70
71This addresses the issue #123456 by making sure Foo was successful
72before calling Bar.
73```
74
75### Running the tests
76
77Tests allow you to verify if your changes did not break any behaviour, here are the steps to follow:
78
79- Before pushing, run the `testautomation` suite on your machine, there should be no more failing tests after your change than before.
80- After pushing to your fork, Continuous Integration (GitHub Actions) will ensure compilation and tests still pass on other systems.
81
82### Opening a pull request
83
84- Head over to your fork's GitHub page.
85- Click on the `Contribute` button and `Open Pull Request`.
86- Fill out the pull request template.
87- If any changes are requested, you can add new commits to your fork and they will be automatically added to the pull request.
88
89## Contributing to the documentation
90
91### Editing a function documentation
92
93The wiki documentation for API functions is synchronised from the headers' doxygen comments. As such, all modifications to syntax; function parameters; return value; version; related functions should be done in the header directly.
94
95### Editing the wiki
96
97Other changes to the wiki should done directly from https://wiki.libsdl.org/
diff --git a/src/contrib/SDL-2.30.2/docs/README-android.md b/src/contrib/SDL-2.30.2/docs/README-android.md
new file mode 100644
index 0000000..b886f06
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-android.md
@@ -0,0 +1,483 @@
1Android
2================================================================================
3
4Matt Styles wrote a tutorial on building SDL for Android with Visual Studio:
5http://trederia.blogspot.de/2017/03/building-sdl2-for-android-with-visual.html
6
7The rest of this README covers the Android gradle style build process.
8
9If you are using the older ant build process, it is no longer officially
10supported, but you can use the "android-project-ant" directory as a template.
11
12
13Requirements
14================================================================================
15
16Android SDK (version 34 or later)
17https://developer.android.com/sdk/index.html
18
19Android NDK r15c or later
20https://developer.android.com/tools/sdk/ndk/index.html
21
22Minimum API level supported by SDL: 19 (Android 4.4)
23
24
25How the port works
26================================================================================
27
28- Android applications are Java-based, optionally with parts written in C
29- As SDL apps are C-based, we use a small Java shim that uses JNI to talk to
30 the SDL library
31- This means that your application C code must be placed inside an Android
32 Java project, along with some C support code that communicates with Java
33- This eventually produces a standard Android .apk package
34
35The Android Java code implements an "Activity" and can be found in:
36android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
37
38The Java code loads your game code, the SDL shared library, and
39dispatches to native functions implemented in the SDL library:
40src/core/android/SDL_android.c
41
42
43Building an app
44================================================================================
45
46For simple projects you can use the script located at build-scripts/androidbuild.sh
47
48There's two ways of using it:
49
50 androidbuild.sh com.yourcompany.yourapp < sources.list
51 androidbuild.sh com.yourcompany.yourapp source1.c source2.c ...sourceN.c
52
53sources.list should be a text file with a source file name in each line
54Filenames should be specified relative to the current directory, for example if
55you are in the build-scripts directory and want to create the testgles.c test, you'll
56run:
57
58 ./androidbuild.sh org.libsdl.testgles ../test/testgles.c
59
60One limitation of this script is that all sources provided will be aggregated into
61a single directory, thus all your source files should have a unique name.
62
63Once the project is complete the script will tell you where the debug APK is located.
64If you want to create a signed release APK, you can use the project created by this
65utility to generate it.
66
67Finally, a word of caution: re running androidbuild.sh wipes any changes you may have
68done in the build directory for the app!
69
70
71
72For more complex projects, follow these instructions:
73
741. Get the source code for SDL and copy the 'android-project' directory located at SDL/android-project to a suitable location. Also make sure to rename it to your project name (In these examples: YOURPROJECT).
75
76 (The 'android-project' directory can basically be seen as a sort of starting point for the android-port of your project. It contains the glue code between the Android Java 'frontend' and the SDL code 'backend'. It also contains some standard behaviour, like how events should be handled, which you will be able to change.)
77
782. Move or [symlink](https://en.wikipedia.org/wiki/Symbolic_link) the SDL directory into the "YOURPROJECT/app/jni" directory
79
80(This is needed as the source of SDL has to be compiled by the Android compiler)
81
823. Edit "YOURPROJECT/app/jni/src/Android.mk" to include your source files.
83
84(They should be separated by spaces after the "LOCAL_SRC_FILES := " declaration)
85
864a. If you want to use Android Studio, simply open your 'YOURPROJECT' directory and start building.
87
884b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device
89
90
91If you already have a project that uses CMake, the instructions change somewhat:
92
931. Do points 1 and 2 from the instruction above.
942. Edit "YOURPROJECT/app/build.gradle" to comment out or remove sections containing ndk-build
95 and uncomment the cmake sections. Add arguments to the CMake invocation as needed.
963. Edit "YOURPROJECT/app/jni/CMakeLists.txt" to include your project (it defaults to
97 adding the "src" subdirectory). Note that you'll have SDL2, SDL2main and SDL2-static
98 as targets in your project, so you should have "target_link_libraries(yourgame SDL2 SDL2main)"
99 in your CMakeLists.txt file. Also be aware that you should use add_library() instead of
100 add_executable() for the target containing your "main" function.
101
102If you wish to use Android Studio, you can skip the last step.
103
1044. Run './gradlew installDebug' or './gradlew installRelease' in the project directory. It will build and install your .apk on any
105 connected Android device
106
107Here's an explanation of the files in the Android project, so you can customize them:
108
109 android-project/app
110 build.gradle - build info including the application version and SDK
111 src/main/AndroidManifest.xml - package manifest. Among others, it contains the class name of the main Activity and the package name of the application.
112 jni/ - directory holding native code
113 jni/Application.mk - Application JNI settings, including target platform and STL library
114 jni/Android.mk - Android makefile that can call recursively the Android.mk files in all subdirectories
115 jni/CMakeLists.txt - Top-level CMake project that adds SDL as a subproject
116 jni/SDL/ - (symlink to) directory holding the SDL library files
117 jni/SDL/Android.mk - Android makefile for creating the SDL shared library
118 jni/src/ - directory holding your C/C++ source
119 jni/src/Android.mk - Android makefile that you should customize to include your source code and any library references
120 jni/src/CMakeLists.txt - CMake file that you may customize to include your source code and any library references
121 src/main/assets/ - directory holding asset files for your application
122 src/main/res/ - directory holding resources for your application
123 src/main/res/mipmap-* - directories holding icons for different phone hardware
124 src/main/res/values/strings.xml - strings used in your application, including the application name
125 src/main/java/org/libsdl/app/SDLActivity.java - the Java class handling the initialization and binding to SDL. Be very careful changing this, as the SDL library relies on this implementation. You should instead subclass this for your application.
126
127
128Customizing your application name
129================================================================================
130
131To customize your application name, edit AndroidManifest.xml and replace
132"org.libsdl.app" with an identifier for your product package.
133
134Then create a Java class extending SDLActivity and place it in a directory
135under src matching your package, e.g.
136
137 src/com/gamemaker/game/MyGame.java
138
139Here's an example of a minimal class file:
140
141 --- MyGame.java --------------------------
142 package com.gamemaker.game;
143
144 import org.libsdl.app.SDLActivity;
145
146 /**
147 * A sample wrapper class that just calls SDLActivity
148 */
149
150 public class MyGame extends SDLActivity { }
151
152 ------------------------------------------
153
154Then replace "SDLActivity" in AndroidManifest.xml with the name of your
155class, .e.g. "MyGame"
156
157
158Customizing your application icon
159================================================================================
160
161Conceptually changing your icon is just replacing the "ic_launcher.png" files in
162the drawable directories under the res directory. There are several directories
163for different screen sizes.
164
165
166Loading assets
167================================================================================
168
169Any files you put in the "app/src/main/assets" directory of your project
170directory will get bundled into the application package and you can load
171them using the standard functions in SDL_rwops.h.
172
173There are also a few Android specific functions that allow you to get other
174useful paths for saving and loading data:
175* SDL_AndroidGetInternalStoragePath()
176* SDL_AndroidGetExternalStorageState()
177* SDL_AndroidGetExternalStoragePath()
178
179See SDL_system.h for more details on these functions.
180
181The asset packaging system will, by default, compress certain file extensions.
182SDL includes two asset file access mechanisms, the preferred one is the so
183called "File Descriptor" method, which is faster and doesn't involve the Dalvik
184GC, but given this method does not work on compressed assets, there is also the
185"Input Stream" method, which is automatically used as a fall back by SDL. You
186may want to keep this fact in mind when building your APK, specially when large
187files are involved.
188For more information on which extensions get compressed by default and how to
189disable this behaviour, see for example:
190
191http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/
192
193
194Pause / Resume behaviour
195================================================================================
196
197If SDL_HINT_ANDROID_BLOCK_ON_PAUSE hint is set (the default),
198the event loop will block itself when the app is paused (ie, when the user
199returns to the main Android dashboard). Blocking is better in terms of battery
200use, and it allows your app to spring back to life instantaneously after resume
201(versus polling for a resume message).
202
203Upon resume, SDL will attempt to restore the GL context automatically.
204In modern devices (Android 3.0 and up) this will most likely succeed and your
205app can continue to operate as it was.
206
207However, there's a chance (on older hardware, or on systems under heavy load),
208where the GL context can not be restored. In that case you have to listen for
209a specific message (SDL_RENDER_DEVICE_RESET) and restore your textures
210manually or quit the app.
211
212You should not use the SDL renderer API while the app going in background:
213- SDL_APP_WILLENTERBACKGROUND:
214 after you read this message, GL context gets backed-up and you should not
215 use the SDL renderer API.
216
217 When this event is received, you have to set the render target to NULL, if you're using it.
218 (eg call SDL_SetRenderTarget(renderer, NULL))
219
220- SDL_APP_DIDENTERFOREGROUND:
221 GL context is restored, and the SDL renderer API is available (unless you
222 receive SDL_RENDER_DEVICE_RESET).
223
224Mouse / Touch events
225================================================================================
226
227In some case, SDL generates synthetic mouse (resp. touch) events for touch
228(resp. mouse) devices.
229To enable/disable this behavior, see SDL_hints.h:
230- SDL_HINT_TOUCH_MOUSE_EVENTS
231- SDL_HINT_MOUSE_TOUCH_EVENTS
232
233Misc
234================================================================================
235
236For some device, it appears to works better setting explicitly GL attributes
237before creating a window:
238 SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
239 SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 6);
240 SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
241
242Threads and the Java VM
243================================================================================
244
245For a quick tour on how Linux native threads interoperate with the Java VM, take
246a look here: https://developer.android.com/guide/practices/jni.html
247
248If you want to use threads in your SDL app, it's strongly recommended that you
249do so by creating them using SDL functions. This way, the required attach/detach
250handling is managed by SDL automagically. If you have threads created by other
251means and they make calls to SDL functions, make sure that you call
252Android_JNI_SetupThread() before doing anything else otherwise SDL will attach
253your thread automatically anyway (when you make an SDL call), but it'll never
254detach it.
255
256
257If you ever want to use JNI in a native thread (created by "SDL_CreateThread()"),
258it won't be able to find your java class and method because of the java class loader
259which is different for native threads, than for java threads (eg your "main()").
260
261the work-around is to find class/method, in you "main()" thread, and to use them
262in your native thread.
263
264see:
265https://developer.android.com/training/articles/perf-jni#faq:-why-didnt-findclass-find-my-class
266
267Using STL
268================================================================================
269
270You can use STL in your project by creating an Application.mk file in the jni
271folder and adding the following line:
272
273 APP_STL := c++_shared
274
275For more information go here:
276 https://developer.android.com/ndk/guides/cpp-support
277
278
279Using the emulator
280================================================================================
281
282There are some good tips and tricks for getting the most out of the
283emulator here: https://developer.android.com/tools/devices/emulator.html
284
285Especially useful is the info on setting up OpenGL ES 2.0 emulation.
286
287Notice that this software emulator is incredibly slow and needs a lot of disk space.
288Using a real device works better.
289
290
291Troubleshooting
292================================================================================
293
294You can see if adb can see any devices with the following command:
295
296 adb devices
297
298You can see the output of log messages on the default device with:
299
300 adb logcat
301
302You can push files to the device with:
303
304 adb push local_file remote_path_and_file
305
306You can push files to the SD Card at /sdcard, for example:
307
308 adb push moose.dat /sdcard/moose.dat
309
310You can see the files on the SD card with a shell command:
311
312 adb shell ls /sdcard/
313
314You can start a command shell on the default device with:
315
316 adb shell
317
318You can remove the library files of your project (and not the SDL lib files) with:
319
320 ndk-build clean
321
322You can do a build with the following command:
323
324 ndk-build
325
326You can see the complete command line that ndk-build is using by passing V=1 on the command line:
327
328 ndk-build V=1
329
330If your application crashes in native code, you can use ndk-stack to get a symbolic stack trace:
331 https://developer.android.com/ndk/guides/ndk-stack
332
333If you want to go through the process manually, you can use addr2line to convert the
334addresses in the stack trace to lines in your code.
335
336For example, if your crash looks like this:
337
338 I/DEBUG ( 31): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 400085d0
339 I/DEBUG ( 31): r0 00000000 r1 00001000 r2 00000003 r3 400085d4
340 I/DEBUG ( 31): r4 400085d0 r5 40008000 r6 afd41504 r7 436c6a7c
341 I/DEBUG ( 31): r8 436c6b30 r9 435c6fb0 10 435c6f9c fp 4168d82c
342 I/DEBUG ( 31): ip 8346aff0 sp 436c6a60 lr afd1c8ff pc afd1c902 cpsr 60000030
343 I/DEBUG ( 31): #00 pc 0001c902 /system/lib/libc.so
344 I/DEBUG ( 31): #01 pc 0001ccf6 /system/lib/libc.so
345 I/DEBUG ( 31): #02 pc 000014bc /data/data/org.libsdl.app/lib/libmain.so
346 I/DEBUG ( 31): #03 pc 00001506 /data/data/org.libsdl.app/lib/libmain.so
347
348You can see that there's a crash in the C library being called from the main code.
349I run addr2line with the debug version of my code:
350
351 arm-eabi-addr2line -C -f -e obj/local/armeabi/libmain.so
352
353and then paste in the number after "pc" in the call stack, from the line that I care about:
354000014bc
355
356I get output from addr2line showing that it's in the quit function, in testspriteminimal.c, on line 23.
357
358You can add logging to your code to help show what's happening:
359
360 #include <android/log.h>
361
362 __android_log_print(ANDROID_LOG_INFO, "foo", "Something happened! x = %d", x);
363
364If you need to build without optimization turned on, you can create a file called
365"Application.mk" in the jni directory, with the following line in it:
366
367 APP_OPTIM := debug
368
369
370Memory debugging
371================================================================================
372
373The best (and slowest) way to debug memory issues on Android is valgrind.
374Valgrind has support for Android out of the box, just grab code using:
375
376 svn co svn://svn.valgrind.org/valgrind/trunk valgrind
377
378... and follow the instructions in the file README.android to build it.
379
380One thing I needed to do on Mac OS X was change the path to the toolchain,
381and add ranlib to the environment variables:
382export RANLIB=$NDKROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-ranlib
383
384Once valgrind is built, you can create a wrapper script to launch your
385application with it, changing org.libsdl.app to your package identifier:
386
387 --- start_valgrind_app -------------------
388 #!/system/bin/sh
389 export TMPDIR=/data/data/org.libsdl.app
390 exec /data/local/Inst/bin/valgrind --log-file=/sdcard/valgrind.log --error-limit=no $*
391 ------------------------------------------
392
393Then push it to the device:
394
395 adb push start_valgrind_app /data/local
396
397and make it executable:
398
399 adb shell chmod 755 /data/local/start_valgrind_app
400
401and tell Android to use the script to launch your application:
402
403 adb shell setprop wrap.org.libsdl.app "logwrapper /data/local/start_valgrind_app"
404
405If the setprop command says "could not set property", it's likely that
406your package name is too long and you should make it shorter by changing
407AndroidManifest.xml and the path to your class file in android-project/src
408
409You can then launch your application normally and waaaaaaaiiittt for it.
410You can monitor the startup process with the logcat command above, and
411when it's done (or even while it's running) you can grab the valgrind
412output file:
413
414 adb pull /sdcard/valgrind.log
415
416When you're done instrumenting with valgrind, you can disable the wrapper:
417
418 adb shell setprop wrap.org.libsdl.app ""
419
420
421Graphics debugging
422================================================================================
423
424If you are developing on a compatible Tegra-based tablet, NVidia provides
425Tegra Graphics Debugger at their website. Because SDL2 dynamically loads EGL
426and GLES libraries, you must follow their instructions for installing the
427interposer library on a rooted device. The non-rooted instructions are not
428compatible with applications that use SDL2 for video.
429
430The Tegra Graphics Debugger is available from NVidia here:
431https://developer.nvidia.com/tegra-graphics-debugger
432
433
434Why is API level 19 the minimum required?
435================================================================================
436
437The latest NDK toolchain doesn't support targeting earlier than API level 19.
438As of this writing, according to https://www.composables.com/tools/distribution-chart
439about 99.7% of the Android devices accessing Google Play support API level 19 or
440higher (August 2023).
441
442
443A note regarding the use of the "dirty rectangles" rendering technique
444================================================================================
445
446If your app uses a variation of the "dirty rectangles" rendering technique,
447where you only update a portion of the screen on each frame, you may notice a
448variety of visual glitches on Android, that are not present on other platforms.
449This is caused by SDL's use of EGL as the support system to handle OpenGL ES/ES2
450contexts, in particular the use of the eglSwapBuffers function. As stated in the
451documentation for the function "The contents of ancillary buffers are always
452undefined after calling eglSwapBuffers".
453Setting the EGL_SWAP_BEHAVIOR attribute of the surface to EGL_BUFFER_PRESERVED
454is not possible for SDL as it requires EGL 1.4, available only on the API level
45517+, so the only workaround available on this platform is to redraw the entire
456screen each frame.
457
458Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html
459
460
461Ending your application
462================================================================================
463
464Two legitimate ways:
465
466- return from your main() function. Java side will automatically terminate the
467Activity by calling Activity.finish().
468
469- Android OS can decide to terminate your application by calling onDestroy()
470(see Activity life cycle). Your application will receive a SDL_QUIT event you
471can handle to save things and quit.
472
473Don't call exit() as it stops the activity badly.
474
475NB: "Back button" can be handled as a SDL_KEYDOWN/UP events, with Keycode
476SDLK_AC_BACK, for any purpose.
477
478Known issues
479================================================================================
480
481- The number of buttons reported for each joystick is hardcoded to be 36, which
482is the current maximum number of buttons Android can report.
483
diff --git a/src/contrib/SDL-2.30.2/docs/README-cmake.md b/src/contrib/SDL-2.30.2/docs/README-cmake.md
new file mode 100644
index 0000000..cfd4066
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-cmake.md
@@ -0,0 +1,163 @@
1# CMake
2
3(www.cmake.org)
4
5SDL's build system was traditionally based on autotools. Over time, this
6approach has suffered from several issues across the different supported
7platforms.
8To solve these problems, a new build system based on CMake was introduced.
9It is developed in parallel to the legacy autotools build system, so users
10can experiment with it without complication.
11
12The CMake build system is supported on the following platforms:
13
14* FreeBSD
15* Linux
16* Microsoft Visual C
17* MinGW and Msys
18* macOS, iOS, and tvOS, with support for XCode
19* Android
20* Emscripten
21* RiscOS
22* Playstation Vita
23
24## Building SDL
25
26Assuming the source for SDL is located at `~/sdl`
27```sh
28cd ~
29mkdir build
30cd build
31cmake ~/sdl
32cmake --build .
33```
34
35This will build the static and dynamic versions of SDL in the `~/build` directory.
36Installation can be done using:
37
38```sh
39cmake --install . # '--install' requires CMake 3.15, or newer
40```
41
42## Including SDL in your project
43
44SDL can be included in your project in 2 major ways:
45- using a system SDL library, provided by your (*nix) distribution or a package manager
46- using a vendored SDL library: this is SDL copied or symlinked in a subfolder.
47
48The following CMake script supports both, depending on the value of `MYGAME_VENDORED`.
49
50```cmake
51cmake_minimum_required(VERSION 3.5)
52project(mygame)
53
54# Create an option to switch between a system sdl library and a vendored sdl library
55option(MYGAME_VENDORED "Use vendored libraries" OFF)
56
57if(MYGAME_VENDORED)
58 add_subdirectory(vendored/sdl EXCLUDE_FROM_ALL)
59else()
60 # 1. Look for a SDL2 package, 2. look for the SDL2 component and 3. fail if none can be found
61 find_package(SDL2 REQUIRED CONFIG REQUIRED COMPONENTS SDL2)
62
63 # 1. Look for a SDL2 package, 2. Look for the SDL2maincomponent and 3. DO NOT fail when SDL2main is not available
64 find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
65endif()
66
67# Create your game executable target as usual
68add_executable(mygame WIN32 mygame.c)
69
70# SDL2::SDL2main may or may not be available. It is e.g. required by Windows GUI applications
71if(TARGET SDL2::SDL2main)
72 # It has an implicit dependency on SDL2 functions, so it MUST be added before SDL2::SDL2 (or SDL2::SDL2-static)
73 target_link_libraries(mygame PRIVATE SDL2::SDL2main)
74endif()
75
76# Link to the actual SDL2 library. SDL2::SDL2 is the shared SDL library, SDL2::SDL2-static is the static SDL libarary.
77target_link_libraries(mygame PRIVATE SDL2::SDL2)
78```
79
80### A system SDL library
81
82For CMake to find SDL, it must be installed in [a default location CMake is looking for](https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure).
83
84The following components are available, to be used as an argument of `find_package`.
85
86| Component name | Description |
87|----------------|--------------------------------------------------------------------------------------------|
88| SDL2 | The SDL2 shared library, available through the `SDL2::SDL2` target [^SDL_TARGET_EXCEPTION] |
89| SDL2-static | The SDL2 static library, available through the `SDL2::SDL2-static` target |
90| SDL2main | The SDL2main static library, available through the `SDL2::SDL2main` target |
91| SDL2test | The SDL2test static library, available through the `SDL2::SDL2test` target |
92
93### Using a vendored SDL
94
95This only requires a copy of SDL in a subdirectory.
96
97## CMake configuration options for platforms
98
99### iOS/tvOS
100
101CMake 3.14+ natively includes support for iOS and tvOS. SDL binaries may be built
102using Xcode or Make, possibly among other build-systems.
103
104When using a recent version of CMake (3.14+), it should be possible to:
105
106- build SDL for iOS, both static and dynamic
107- build SDL test apps (as iOS/tvOS .app bundles)
108- generate a working SDL_config.h for iOS (using SDL_config.h.cmake as a basis)
109
110To use, set the following CMake variables when running CMake's configuration stage:
111
112- `CMAKE_SYSTEM_NAME=<OS>` (either `iOS` or `tvOS`)
113- `CMAKE_OSX_SYSROOT=<SDK>` (examples: `iphoneos`, `iphonesimulator`, `iphoneos12.4`, `/full/path/to/iPhoneOS.sdk`,
114 `appletvos`, `appletvsimulator`, `appletvos12.4`, `/full/path/to/AppleTVOS.sdk`, etc.)
115- `CMAKE_OSX_ARCHITECTURES=<semicolon-separated list of CPU architectures>` (example: "arm64;armv7s;x86_64")
116
117
118#### Examples
119
120- for iOS-Simulator, using the latest, installed SDK:
121
122 ```bash
123 cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64
124 ```
125
126- for iOS-Device, using the latest, installed SDK, 64-bit only
127
128 ```bash
129 cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64
130 ```
131
132- for iOS-Device, using the latest, installed SDK, mixed 32/64 bit
133
134 ```cmake
135 cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES="arm64;armv7s"
136 ```
137
138- for iOS-Device, using a specific SDK revision (iOS 12.4, in this example):
139
140 ```cmake
141 cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos12.4 -DCMAKE_OSX_ARCHITECTURES=arm64
142 ```
143
144- for iOS-Simulator, using the latest, installed SDK, and building SDL test apps (as .app bundles):
145
146 ```cmake
147 cmake ~/sdl -DSDL_TESTS=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64
148 ```
149
150- for tvOS-Simulator, using the latest, installed SDK:
151
152 ```cmake
153 cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_ARCHITECTURES=x86_64
154 ```
155
156- for tvOS-Device, using the latest, installed SDK:
157
158 ```cmake
159 cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_ARCHITECTURES=arm64`
160 ```
161
162
163[^SDL_TARGET_EXCEPTION]: `SDL2::SDL2` can be an ALIAS to a static `SDL2::SDL2-static` target for multiple reasons.
diff --git a/src/contrib/SDL-2.30.2/docs/README-directfb.md b/src/contrib/SDL-2.30.2/docs/README-directfb.md
new file mode 100644
index 0000000..bbc6e99
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-directfb.md
@@ -0,0 +1,123 @@
1DirectFB
2========
3
4Supports:
5
6- Hardware YUV overlays
7- OpenGL - software only
8- 2D/3D accelerations (depends on directfb driver)
9- multiple displays
10- windows
11
12What you need:
13
14* DirectFB 1.0.1, 1.2.x, 1.3.0
15* Kernel-Framebuffer support: required: vesafb, radeonfb ....
16* Mesa 7.0.x - optional for OpenGL
17
18The `/etc/directfbrc` file should contain the following lines to make
19your joystick work and avoid crashes:
20
21```
22disable-module=joystick
23disable-module=cle266
24disable-module=cyber5k
25no-linux-input-grab
26```
27
28To disable to use x11 backend when DISPLAY variable is found use
29
30```
31export SDL_DIRECTFB_X11_CHECK=0
32```
33
34To disable the use of linux input devices, i.e. multimice/multikeyboard support,
35use
36
37```
38export SDL_DIRECTFB_LINUX_INPUT=0
39```
40
41To use hardware accelerated YUV-overlays for YUV-textures, use:
42
43```
44export SDL_DIRECTFB_YUV_DIRECT=1
45```
46
47This is disabled by default. It will only support one
48YUV texture, namely the first. Every other YUV texture will be
49rendered in software.
50
51In addition, you may use (directfb-1.2.x)
52
53```
54export SDL_DIRECTFB_YUV_UNDERLAY=1
55```
56
57to make the YUV texture an underlay. This will make the cursor to
58be shown.
59
60Simple Window Manager
61=====================
62
63The driver has support for a very, very basic window manager you may
64want to use when running with `wm=default`. Use
65
66```
67export SDL_DIRECTFB_WM=1
68```
69
70to enable basic window borders. In order to have the window title rendered,
71you need to have the following font installed:
72
73```
74/usr/share/fonts/truetype/freefont/FreeSans.ttf
75```
76
77OpenGL Support
78==============
79
80The following instructions will give you *software* OpenGL. However this
81works at least on all directfb supported platforms.
82
83As of this writing 20100802 you need to pull Mesa from git and do the following:
84
85```
86git clone git://anongit.freedesktop.org/git/mesa/mesa
87cd mesa
88git checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a
89```
90
91Edit `configs/linux-directfb` so that the Directories-section looks like this:
92
93```
94# Directories
95SRC_DIRS = mesa glu
96GLU_DIRS = sgi
97DRIVER_DIRS = directfb
98PROGRAM_DIRS =
99```
100
101Then do the following:
102
103```
104make linux-directfb
105make
106
107echo Installing - please enter sudo pw.
108
109sudo make install INSTALL_DIR=/usr/local/dfb_GL
110cd src/mesa/drivers/directfb
111make
112sudo make install INSTALL_DIR=/usr/local/dfb_GL
113```
114
115To run the SDL - testprograms:
116
117```
118export SDL_VIDEODRIVER=directfb
119export LD_LIBRARY_PATH=/usr/local/dfb_GL/lib
120export LD_PRELOAD=/usr/local/dfb_GL/libGL.so.7
121
122./testgl
123```
diff --git a/src/contrib/SDL-2.30.2/docs/README-dynapi.md b/src/contrib/SDL-2.30.2/docs/README-dynapi.md
new file mode 100644
index 0000000..76b868c
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-dynapi.md
@@ -0,0 +1,138 @@
1# Dynamic API
2
3Originally posted on Ryan's Google+ account.
4
5Background:
6
7- The Steam Runtime has (at least in theory) a really kick-ass build of SDL2,
8 but developers are shipping their own SDL2 with individual Steam games.
9 These games might stop getting updates, but a newer SDL2 might be needed later.
10 Certainly we'll always be fixing bugs in SDL, even if a new video target isn't
11 ever needed, and these fixes won't make it to a game shipping its own SDL.
12- Even if we replace the SDL2 in those games with a compatible one, that is to
13 say, edit a developer's Steam depot (yuck!), there are developers that are
14 statically linking SDL2 that we can't do this for. We can't even force the
15 dynamic loader to ignore their SDL2 in this case, of course.
16- If you don't ship an SDL2 with the game in some form, people that disabled the
17 Steam Runtime, or just tried to run the game from the command line instead of
18 Steam might find themselves unable to run the game, due to a missing dependency.
19- If you want to ship on non-Steam platforms like GOG or Humble Bundle, or target
20 generic Linux boxes that may or may not have SDL2 installed, you have to ship
21 the library or risk a total failure to launch. So now, you might have to have
22 a non-Steam build plus a Steam build (that is, one with and one without SDL2
23 included), which is inconvenient if you could have had one universal build
24 that works everywhere.
25- We like the zlib license, but the biggest complaint from the open source
26 community about the license change is the static linking. The LGPL forced this
27 as a legal, not technical issue, but zlib doesn't care. Even those that aren't
28 concerned about the GNU freedoms found themselves solving the same problems:
29 swapping in a newer SDL to an older game often times can save the day.
30 Static linking stops this dead.
31
32So here's what we did:
33
34SDL now has, internally, a table of function pointers. So, this is what SDL_Init
35now looks like:
36
37```c
38Uint32 SDL_Init(Uint32 flags)
39{
40 return jump_table.SDL_Init(flags);
41}
42```
43
44Except that is all done with a bunch of macro magic so we don't have to maintain
45every one of these.
46
47What is jump_table.SDL_init()? Eventually, that's a function pointer of the real
48SDL_Init() that you've been calling all this time. But at startup, it looks more
49like this:
50
51```c
52Uint32 SDL_Init_DEFAULT(Uint32 flags)
53{
54 SDL_InitDynamicAPI();
55 return jump_table.SDL_Init(flags);
56}
57```
58
59SDL_InitDynamicAPI() fills in jump_table with all the actual SDL function
60pointers, which means that this `_DEFAULT` function never gets called again.
61First call to any SDL function sets the whole thing up.
62
63So you might be asking, what was the value in that? Isn't this what the operating
64system's dynamic loader was supposed to do for us? Yes, but now we've got this
65level of indirection, we can do things like this:
66
67```bash
68export SDL_DYNAMIC_API=/my/actual/libSDL-2.0.so.0
69./MyGameThatIsStaticallyLinkedToSDL2
70```
71
72And now, this game that is statically linked to SDL, can still be overridden
73with a newer, or better, SDL. The statically linked one will only be used as
74far as calling into the jump table in this case. But in cases where no override
75is desired, the statically linked version will provide its own jump table,
76and everyone is happy.
77
78So now:
79- Developers can statically link SDL, and users can still replace it.
80 (We'd still rather you ship a shared library, though!)
81- Developers can ship an SDL with their game, Valve can override it for, say,
82 new features on SteamOS, or distros can override it for their own needs,
83 but it'll also just work in the default case.
84- Developers can ship the same package to everyone (Humble Bundle, GOG, etc),
85 and it'll do the right thing.
86- End users (and Valve) can update a game's SDL in almost any case,
87 to keep abandoned games running on newer platforms.
88- Everyone develops with SDL exactly as they have been doing all along.
89 Same headers, same ABI. Just get the latest version to enable this magic.
90
91
92A little more about SDL_InitDynamicAPI():
93
94Internally, InitAPI does some locking to make sure everything waits until a
95single thread initializes everything (although even SDL_CreateThread() goes
96through here before spinning a thread, too), and then decides if it should use
97an external SDL library. If not, it sets up the jump table using the current
98SDL's function pointers (which might be statically linked into a program, or in
99a shared library of its own). If so, it loads that library and looks for and
100calls a single function:
101
102```c
103Sint32 SDL_DYNAPI_entry(Uint32 version, void *table, Uint32 tablesize);
104```
105
106That function takes a version number (more on that in a moment), the address of
107the jump table, and the size, in bytes, of the table.
108Now, we've got policy here: this table's layout never changes; new stuff gets
109added to the end. Therefore SDL_DYNAPI_entry() knows that it can provide all
110the needed functions if tablesize <= sizeof its own jump table. If tablesize is
111bigger (say, SDL 2.0.4 is trying to load SDL 2.0.3), then we know to abort, but
112if it's smaller, we know we can provide the entire API that the caller needs.
113
114The version variable is a failsafe switch.
115Right now it's always 1. This number changes when there are major API changes
116(so we know if the tablesize might be smaller, or entries in it have changed).
117Right now SDL_DYNAPI_entry gives up if the version doesn't match, but it's not
118inconceivable to have a small dispatch library that only supplies this one
119function and loads different, otherwise-incompatible SDL libraries and has the
120right one initialize the jump table based on the version. For something that
121must generically catch lots of different versions of SDL over time, like the
122Steam Client, this isn't a bad option.
123
124Finally, I'm sure some people are reading this and thinking,
125"I don't want that overhead in my project!"
126
127To which I would point out that the extra function call through the jump table
128probably wouldn't even show up in a profile, but lucky you: this can all be
129disabled. You can build SDL without this if you absolutely must, but we would
130encourage you not to do that. However, on heavily locked down platforms like
131iOS, or maybe when debugging, it makes sense to disable it. The way this is
132designed in SDL, you just have to change one #define, and the entire system
133vaporizes out, and SDL functions exactly like it always did. Most of it is
134macro magic, so the system is contained to one C file and a few headers.
135However, this is on by default and you have to edit a header file to turn it
136off. Our hopes is that if we make it easy to disable, but not too easy,
137everyone will ultimately be able to get what they want, but we've gently
138nudged everyone towards what we think is the best solution.
diff --git a/src/contrib/SDL-2.30.2/docs/README-emscripten.md b/src/contrib/SDL-2.30.2/docs/README-emscripten.md
new file mode 100644
index 0000000..1a13eb1
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-emscripten.md
@@ -0,0 +1,374 @@
1# Emscripten
2
3## The state of things
4
5(As of September 2023, but things move quickly and we don't update this
6document often.)
7
8In modern times, all the browsers you probably care about (Chrome, Firefox,
9Edge, and Safari, on Windows, macOS, Linux, iOS and Android), support some
10reasonable base configurations:
11
12- WebAssembly (don't bother with asm.js any more)
13- WebGL (which will look like OpenGL ES 2 or 3 to your app).
14- Threads (see caveats, though!)
15- Game controllers
16- Autoupdating (so you can assume they have a recent version of the browser)
17
18All this to say we're at the point where you don't have to make a lot of
19concessions to get even a fairly complex SDL-based game up and running.
20
21
22## RTFM
23
24This document is a quick rundown of some high-level details. The
25documentation at [emscripten.org](https://emscripten.org/) is vast
26and extremely detailed for a wide variety of topics, and you should at
27least skim through it at some point.
28
29
30## Porting your app to Emscripten
31
32Many many things just need some simple adjustments and they'll compile
33like any other C/C++ code, as long as SDL was handling the platform-specific
34work for your program.
35
36First, you probably need this in at least one of your source files:
37
38```c
39#ifdef __EMSCRIPTEN__
40#include <emscripten.h>
41#endif
42```
43
44Second: assembly language code has to go. Replace it with C. You can even use
45[x86 SIMD intrinsic functions in Emscripten](https://emscripten.org/docs/porting/simd.html)!
46
47Third: Middleware has to go. If you have a third-party library you link
48against, you either need an Emscripten port of it, or the source code to it
49to compile yourself, or you need to remove it.
50
51Fourth: You still start in a function called main(), but you need to get out of
52it and into a function that gets called repeatedly, and returns quickly,
53called a mainloop.
54
55Somewhere in your program, you probably have something that looks like a more
56complicated version of this:
57
58```c
59void main(void)
60{
61 initialize_the_game();
62 while (game_is_still_running) {
63 check_for_new_input();
64 think_about_stuff();
65 draw_the_next_frame();
66 }
67 deinitialize_the_game();
68}
69```
70
71This will not work on Emscripten, because the main thread needs to be free
72to do stuff and can't sit in this loop forever. So Emscripten lets you set up
73a [mainloop](https://emscripten.org/docs/porting/emscripten-runtime-environment.html#browser-main-loop).
74
75```c
76static void mainloop(void) /* this will run often, possibly at the monitor's refresh rate */
77{
78 if (!game_is_still_running) {
79 deinitialize_the_game();
80 #ifdef __EMSCRIPTEN__
81 emscripten_cancel_main_loop(); /* this should "kill" the app. */
82 #else
83 exit(0);
84 #endif
85 }
86
87 check_for_new_input();
88 think_about_stuff();
89 draw_the_next_frame();
90}
91
92void main(void)
93{
94 initialize_the_game();
95 #ifdef __EMSCRIPTEN__
96 emscripten_set_main_loop(mainloop, 0, 1);
97 #else
98 while (1) { mainloop(); }
99 #endif
100}
101```
102
103Basically, `emscripten_set_main_loop(mainloop, 0, 1);` says "run
104`mainloop` over and over until I end the program." The function will
105run, and return, freeing the main thread for other tasks, and then
106run again when it's time. The `1` parameter does some magic to make
107your main() function end immediately; this is useful because you
108don't want any shutdown code that might be sitting below this code
109to actually run if main() were to continue on, since we're just
110getting started.
111
112There's a lot of little details that are beyond the scope of this
113document, but that's the biggest intial set of hurdles to porting
114your app to the web.
115
116
117## Do you need threads?
118
119If you plan to use threads, they work on all major browsers now. HOWEVER,
120they bring with them a lot of careful considerations. Rendering _must_
121be done on the main thread. This is a general guideline for many
122platforms, but a hard requirement on the web.
123
124Many other things also must happen on the main thread; often times SDL
125and Emscripten make efforts to "proxy" work to the main thread that
126must be there, but you have to be careful (and read more detailed
127documentation than this for the finer points).
128
129Even when using threads, your main thread needs to set an Emscripten
130mainloop that runs quickly and returns, or things will fail to work
131correctly.
132
133You should definitely read [Emscripten's pthreads docs](https://emscripten.org/docs/porting/pthreads.html)
134for all the finer points. Mostly SDL's thread API will work as expected,
135but is built on pthreads, so it shares the same little incompatibilities
136that are documented there, such as where you can use a mutex, and when
137a thread will start running, etc.
138
139
140IMPORTANT: You have to decide to either build something that uses
141threads or something that doesn't; you can't have one build
142that works everywhere. This is an Emscripten (or maybe WebAssembly?
143Or just web browsers in general?) limitation. If you aren't using
144threads, it's easier to not enable them at all, at build time.
145
146If you use threads, you _have to_ run from a web server that has
147[COOP/COEP headers set correctly](https://web.dev/why-coop-coep/)
148or your program will fail to start at all.
149
150If building with threads, `__EMSCRIPTEN_PTHREADS__` will be defined
151for checking with the C preprocessor, so you can build something
152different depending on what sort of build you're compiling.
153
154
155## Audio
156
157Audio works as expected at the API level, but not exactly like other
158platforms.
159
160You'll only see a single default audio device. Audio capture also works;
161if the browser pops up a prompt to ask for permission to access the
162microphone, the SDL_OpenAudioDevice call will succeed and start producing
163silence at a regular interval. Once the user approves the request, real
164audio data will flow. If the user denies it, the app is not informed and
165will just continue to receive silence.
166
167Modern web browsers will not permit web pages to produce sound before the
168user has interacted with them (clicked or tapped on them, usually); this is
169for several reasons, not the least of which being that no one likes when a
170random browser tab suddenly starts making noise and the user has to scramble
171to figure out which and silence it.
172
173SDL will allow you to open the audio device for playback in this
174circumstance, and your audio callback will fire, but SDL will throw the audio
175data away until the user interacts with the page. This helps apps that depend
176on the audio callback to make progress, and also keeps audio playback in sync
177once the app is finally allowed to make noise.
178
179There are two reasonable ways to deal with the silence at the app level:
180if you are writing some sort of media player thing, where the user expects
181there to be a volume control when you mouseover the canvas, just default
182that control to a muted state; if the user clicks on the control to unmute
183it, on this first click, open the audio device. This allows the media to
184play at start, and the user can reasonably opt-in to listening.
185
186Many games do not have this sort of UI, and are more rigid about starting
187audio along with everything else at the start of the process. For these, your
188best bet is to write a little Javascript that puts up a "Click here to play!"
189UI, and upon the user clicking, remove that UI and then call the Emscripten
190app's main() function. As far as the application knows, the audio device was
191available to be opened as soon as the program started, and since this magic
192happens in a little Javascript, you don't have to change your C/C++ code at
193all to make it happen.
194
195Please see the discussion at https://github.com/libsdl-org/SDL/issues/6385
196for some Javascript code to steal for this approach.
197
198
199## Rendering
200
201If you use SDL's 2D render API, it will use GLES2 internally, which
202Emscripten will turn into WebGL calls. You can also use OpenGL ES 2
203directly by creating a GL context and drawing into it.
204
205Calling SDL_RenderPresent (or SDL_GL_SwapWindow) will not actually
206present anything on the screen until your return from your mainloop
207function.
208
209
210## Building SDL/emscripten
211
212First: do you _really_ need to build SDL from source?
213
214If you aren't developing SDL itself, have a desire to mess with its source
215code, or need something on the bleeding edge, don't build SDL. Just use
216Emscripten's packaged version!
217
218Compile and link your app with `-sUSE_SDL=2` and it'll use a build of
219SDL packaged with Emscripten. This comes from the same source code and
220fixes the Emscripten project makes to SDL are generally merged into SDL's
221revision control, so often this is much easier for app developers.
222
223`-sUSE_SDL=1` will select Emscripten's JavaScript reimplementation of SDL
2241.2 instead; if you need SDL 1.2, this might be fine, but we generally
225recommend you don't use SDL 1.2 in modern times.
226
227
228If you want to build SDL, though...
229
230SDL currently requires at least Emscripten 3.1.35 to build. Newer versions
231are likely to work, as well.
232
233
234Build:
235
236This works on Linux/Unix and macOS. Please send comments about Windows.
237
238Make sure you've [installed emsdk](https://emscripten.org/docs/getting_started/downloads.html)
239first, and run `source emsdk_env.sh` at the command line so it finds the
240tools.
241
242(These configure options might be overkill, but this has worked for me.)
243
244```bash
245cd SDL
246mkdir build
247cd build
248emconfigure ../configure --host=wasm32-unknown-emscripten --disable-pthreads --disable-assembly --disable-cpuinfo CFLAGS="-sUSE_SDL=0 -O3"
249emmake make -j4
250```
251
252If you want to build with thread support, something like this works:
253
254```bash
255emconfigure ../configure --host=wasm32-unknown-emscripten --enable-pthreads --disable-assembly --disable-cpuinfo CFLAGS="-sUSE_SDL=0 -O3 -pthread" LDFLAGS="-pthread"
256```
257
258Or with cmake:
259
260```bash
261mkdir build
262cd build
263emcmake cmake ..
264emmake make -j4
265```
266
267To build one of the tests:
268
269```bash
270cd test/
271emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html
272```
273
274## Building your app
275
276You need to compile with `emcc` instead of `gcc` or `clang` or whatever, but
277mostly it uses the same command line arguments as Clang.
278
279Link against the SDL/build/.libs/libSDL2.a file you generated by building SDL,
280link with `-sUSE_SDL=2` to use Emscripten's prepackaged SDL2 build.
281
282Usually you would produce a binary like this:
283
284```bash
285gcc -o mygame mygame.c # or whatever
286```
287
288But for Emscripten, you want to output something else:
289
290```bash
291emcc -o index.html mygame.c
292```
293
294This will produce several files...support Javascript and WebAssembly (.wasm)
295files. The `-o index.html` will produce a simple HTML page that loads and
296runs your app. You will (probably) eventually want to replace or customize
297that file and do `-o index.js` instead to just build the code pieces.
298
299If you're working on a program of any serious size, you'll likely need to
300link with `-sALLOW_MEMORY_GROWTH=1 -sMAXIMUM_MEMORY=1gb` to get access
301to more memory. If using pthreads, you'll need the `-sMAXIMUM_MEMORY=1gb`
302or the app will fail to start on iOS browsers, but this might be a bug that
303goes away in the future.
304
305
306## Data files
307
308Your game probably has data files. Here's how to access them.
309
310Filesystem access works like a Unix filesystem; you have a single directory
311tree, possibly interpolated from several mounted locations, no drive letters,
312'/' for a path separator. You can access them with standard file APIs like
313open() or fopen() or SDL_RWops. You can read or write from the filesystem.
314
315By default, you probably have a "MEMFS" filesystem (all files are stored in
316memory, but access to them is immediate and doesn't need to block). There are
317other options, like "IDBFS" (files are stored in a local database, so they
318don't need to be in RAM all the time and they can persist between runs of the
319program, but access is not synchronous). You can mix and match these file
320systems, mounting a MEMFS filesystem at one place and idbfs elsewhere, etc,
321but that's beyond the scope of this document. Please refer to Emscripten's
322[page on the topic](https://emscripten.org/docs/porting/files/file_systems_overview.html)
323for more info.
324
325The _easiest_ (but not the best) way to get at your data files is to embed
326them in the app itself. Emscripten's linker has support for automating this.
327
328```bash
329emcc -o index.html loopwave.c --embed-file=../test/sample.wav@/sounds/sample.wav
330```
331
332This will pack ../test/sample.wav in your app, and make it available at
333"/sounds/sample.wav" at runtime. Emscripten makes sure this data is available
334before your main() function runs, and since it's in MEMFS, you can just
335read it like you do on other platforms. `--embed-file` can also accept a
336directory to pack an entire tree, and you can specify the argument multiple
337times to pack unrelated things into the final installation.
338
339Note that this is absolutely the best approach if you have a few small
340files to include and shouldn't worry about the issue further. However, if you
341have hundreds of megabytes and/or thousands of files, this is not so great,
342since the user will download it all every time they load your page, and it
343all has to live in memory at runtime.
344
345[Emscripten's documentation on the matter](https://emscripten.org/docs/porting/files/packaging_files.html)
346gives other options and details, and is worth a read.
347
348
349## Debugging
350
351Debugging web apps is a mixed bag. You should compile and link with
352`-gsource-map`, which embeds a ton of source-level debugging information into
353the build, and make sure _the app source code is available on the web server_,
354which is often a scary proposition for various reasons.
355
356When you debug from the browser's tools and hit a breakpoint, you can step
357through the actual C/C++ source code, though, which can be nice.
358
359If you try debugging in Firefox and it doesn't work well for no apparent
360reason, try Chrome, and vice-versa. These tools are still relatively new,
361and improving all the time.
362
363SDL_Log() (or even plain old printf) will write to the Javascript console,
364and honestly I find printf-style debugging to be easier than setting up a build
365for proper debugging, so use whatever tools work best for you.
366
367
368## Questions?
369
370Please give us feedback on this document at [the SDL bug tracker](https://github.com/libsdl-org/SDL/issues).
371If something is wrong or unclear, we want to know!
372
373
374
diff --git a/src/contrib/SDL-2.30.2/docs/README-gdk.md b/src/contrib/SDL-2.30.2/docs/README-gdk.md
new file mode 100644
index 0000000..6718a61
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-gdk.md
@@ -0,0 +1,176 @@
1GDK
2=====
3
4This port allows SDL applications to run via Microsoft's Game Development Kit (GDK).
5
6Windows (GDK) and Xbox One/Xbox Series (GDKX) are both supported and all the required code is included in this public SDL release. However, only licensed Xbox developers have access to the GDKX libraries which will allow you to build the Xbox targets.
7
8
9Requirements
10------------
11
12* Microsoft Visual Studio 2022 (in theory, it should also work in 2017 or 2019, but this has not been tested)
13* Microsoft GDK June 2022 or newer (public release [here](https://github.com/microsoft/GDK/releases/tag/June_2022))
14* For Xbox, you will need the corresponding GDKX version (licensed developers only)
15* To publish a package or successfully authenticate a user, you will need to create an app id/configure services in Partner Center. However, for local testing purposes (without authenticating on Xbox Live), the identifiers used by the GDK test programs in the included solution will work.
16
17
18Windows GDK Status
19------
20
21The Windows GDK port supports the full set of Win32 APIs, renderers, controllers, input devices, etc., as the normal Windows x64 build of SDL.
22
23* Additionally, the GDK port adds the following:
24 * Compile-time platform detection for SDL programs. The `__GDK__` is `#define`d on every GDK platform, and the `__WINGDK__` is `#define`d on Windows GDK, specifically. (This distinction exists because other GDK platforms support a smaller subset of functionality. This allows you to mark code for "any" GDK separate from Windows GDK.)
25 * GDK-specific setup:
26 * Initializing/uninitializing the game runtime, and initializing Xbox Live services
27 * Creating a global task queue and setting it as the default for the process. When running any async operations, passing in `NULL` as the task queue will make the task get added to the global task queue.
28
29 * An implementation on `WinMain` that performs the above GDK setup (you should link against SDL2main.lib, as in Windows x64). If you are unable to do this, you can instead manually call `SDL_GDKRunApp` from your entry point, passing in your `SDL_main` function and `NULL` as the parameters.
30 * Global task queue callbacks are dispatched during `SDL_PumpEvents` (which is also called internally if using `SDL_PollEvent`).
31 * You can get the handle of the global task queue through `SDL_GDKGetTaskQueue`, if needed. When done with the queue, be sure to use `XTaskQueueCloseHandle` to decrement the reference count (otherwise it will cause a resource leak).
32
33* Single-player games have some additional features available:
34 * Call `SDL_GDKGetDefaultUser` to get the default XUserHandle pointer.
35 * `SDL_GetPrefPath` still works, but only for single-player titles.
36
37 These functions mostly wrap around async APIs, and thus should be treated as synchronous alternatives. Also note that the single-player functions return on any OS errors, so be sure to validate the return values!
38
39* What doesn't work:
40 * Compilation with anything other than through the included Visual C++ solution file
41
42## VisualC-GDK Solution
43
44The included `VisualC-GDK/SDL.sln` solution includes the following targets for the Gaming.Desktop.x64 configuration:
45
46* SDL2 (DLL) - This is the typical SDL2.dll, but for Gaming.Desktop.x64.
47* SDL2main (lib) - This contains a drop-in implementation of `WinMain` that is used as the entry point for GDK programs.
48* tests/testgamecontroller - Standard SDL test program demonstrating controller functionality.
49* tests/testgdk - GDK-specific test program that demonstrates using the global task queue to login a user into Xbox Live.
50 *NOTE*: As of the June 2022 GDK, you cannot test user logins without a valid Title ID and MSAAppId. You will need to manually change the identifiers in the `MicrosoftGame.config` to your valid IDs from Partner Center if you wish to test this.
51* tests/testsprite2 - Standard SDL test program demonstrating sprite drawing functionality.
52
53If you set one of the test programs as a startup project, you can run it directly from Visual Studio.
54
55Windows GDK Setup, Detailed Steps
56---------------------
57
58These steps assume you already have a game using SDL that runs on Windows x64 along with a corresponding Visual Studio solution file for the x64 version. If you don't have this, it's easiest to use one of the test program vcxproj files in the `VisualC-GDK` directory as a starting point, though you will still need to do most of the steps below.
59
60### 1. Add a Gaming.Desktop.x64 Configuration ###
61
62In your game's existing Visual Studio Solution, go to Build > Configuration Manager. From the "Active solution platform" drop-down select "New...". From the drop-down list, select Gaming.Desktop.x64 and copy the settings from the x64 configuration.
63
64### 2. Build SDL2 and SDL2main for GDK ###
65
66Open `VisualC-GDK/SDL.sln` in Visual Studio, you need to build the SDL2 and SDL2main targets for the Gaming.Desktop.x64 platform (Release is recommended). You will need to copy/keep track of the `SDL2.dll`, `XCurl.dll` (which is output by Gaming.Desktop.x64), `SDL2.lib`, and `SDL2main.lib` output files for your game project.
67
68*Alternatively*, you could setup your solution file to instead reference the SDL2/SDL2main project file targets from the SDL source, and add those projects as a dependency. This would mean that SDL2 and SDL2main would both be built when your game is built.
69
70### 3. Configuring Project Settings ###
71
72While the Gaming.Desktop.x64 configuration sets most of the required settings, there are some additional items to configure for your game project under the Gaming.Desktop.x64 Configuration:
73
74* Under C/C++ > General > Additional Include Directories, make sure the `SDL/include` path is referenced
75* Under Linker > General > Additional Library Directories, make sure to reference the path where the newly-built SDL2.lib and SDL2main.lib are
76* Under Linker > Input > Additional Dependencies, you need the following:
77 * `SDL2.lib`
78 * `SDL2main.lib` (unless not using)
79 * `xgameruntime.lib`
80 * `../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib`
81* Note that in general, the GDK libraries depend on the MSVC C/C++ runtime, so there is no way to remove this dependency from a GDK program that links against GDK.
82
83### 4. Setting up SDL_main ###
84
85Rather than using your own implementation of `WinMain`, it's recommended that you instead `#include "SDL_main.h"` and declare a standard main function. If you are unable to do this, you can instead manually call `SDL_GDKRunApp` from your entry point, passing in your `SDL_main` function and `NULL` as the parameters.
86
87### 5. Required DLLs ###
88
89The game will not launch in the debugger unless required DLLs are included in the directory that contains the game's .exe file. You need to make sure that the following files are copied into the directory:
90
91* Your SDL2.dll
92* "$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll"
93* XCurl.dll
94
95You can either copy these in a post-build step, or you can add the dlls into the project and set its Configuration Properties > General > Item type to "Copy file," which will also copy them into the output directory.
96
97### 6. Setting up MicrosoftGame.config ###
98
99You can copy `VisualC-GDK/tests/testgdk/MicrosoftGame.config` and use that as a starting point in your project. Minimally, you will want to change the Executable Name attribute, the DefaultDisplayName, and the Description.
100
101This file must be copied into the same directory as the game's .exe file. As with the DLLs, you can either use a post-build step or the "Copy file" item type.
102
103For basic testing, you do not need to change anything else in `MicrosoftGame.config`. However, if you want to test any Xbox Live services (such as logging in users) _or_ publish a package, you will need to setup a Game app on Partner Center.
104
105Then, you need to set the following values to the values from Partner Center:
106
107* Identity tag - Name and Publisher attributes
108* TitleId
109* MSAAppId
110
111### 7. Adding Required Logos
112
113Several logo PNG files are required to be able to launch the game, even from the debugger. You can use the sample logos provided in `VisualC-GDK/logos`. As with the other files, they must be copied into the same directory as the game's .exe file.
114
115
116### 8. Copying any Data Files ###
117
118When debugging GDK games, there is no way to specify a working directory. Therefore, any required game data must also be copied into the output directory, likely in a post-build step.
119
120
121### 9. Build and Run from Visual Studio ###
122
123At this point, you should be able to build and run your game from the Visual Studio Debugger. If you get any linker errors, make sure you double-check that you referenced all the required libs.
124
125If you are testing Xbox Live functionality, it's likely you will need to change to the Sandbox for your title. To do this:
126
1271. Run "Desktop VS 2022 Gaming Command Prompt" from the Start Menu
1282. Switch the sandbox name with:
129 `XblPCSandbox SANDBOX.#`
1303. (To switch back to the retail sandbox):
131 `XblPCSandbox RETAIL`
132
133### 10. Packaging and Installing Locally
134
135You can use one of the test program's `PackageLayout.xml` as a starting point. Minimally, you will need to change the exe to the correct name and also reference any required game data. As with the other data files, it's easiest if you have this copy to the output directory, although it's not a requirement as you can specify relative paths to files.
136
137To create the package:
138
1391. Run "Desktop VS 2022 Gaming Command Prompt" from the Start Menu
1402. `cd` to the directory containing the `PackageLayout.xml` with the correct paths (if you use the local path as in the sample package layout, this would be from your .exe output directory)
1413. `mkdir Package` to create an output directory
1424. To package the file into the `Package` directory, use:
143 `makepkg pack /f PackageLayout.xml /lt /d . /nogameos /pc /pd Package`
1445. To install the package, use:
145 `wdapp install PACKAGENAME.msixvc`
1466. Once the package is installed, you can run it from the start menu.
1477. As with when running from Visual Studio, if you need to test any Xbox Live functionality you must switch to the correct sandbox.
148
149Xbox GDKX Setup
150---------------------
151In general, the same process in the Windows GDK instructions work. There are just a few additional notes:
152* For Xbox One consoles, use the Gaming.Xbox.XboxOne.x64 target
153* For Xbox Series consoles, use the Gaming.Xbox.Scarlett.x64 target
154* The Xbox One target sets the `__XBOXONE__` define and the Xbox Series target sets the `__XBOXSERIES__` define
155* You don't need to link against the Xbox.Services Thunks lib nor include that dll in your package (it doesn't exist for Xbox)
156* The shader blobs for Xbox are created in a pre-build step for the Xbox targets, rather than included in the source (due to NDA and version compatability reasons)
157* To create a package, use:
158 `makepkg pack /f PackageLayout.xml /lt /d . /pd Package`
159* To install the package, use:
160 `xbapp install [PACKAGE].xvc`
161* For some reason, if you make changes that require SDL2.dll to build, and you are running through the debugger (instead of a package), you have to rebuild your .exe target for the debugger to recognize the dll has changed and needs to be transferred to the console again
162* While there are successful releases of Xbox titles using this port, it is not as extensively tested as other targets
163
164Troubleshooting
165---------------
166
167#### Xbox Live Login does not work
168
169As of June 2022 GDK, you must have a valid Title Id and MSAAppId in order to test Xbox Live functionality such as user login. Make sure these are set correctly in the `MicrosoftGame.config`. This means that even testgdk will not let you login without setting these properties to valid values.
170
171Furthermore, confirm that your PC is set to the correct sandbox.
172
173
174#### "The current user has already installed an unpackaged version of this app. A packaged version cannot replace this." error when installing
175
176Prior to June 2022 GDK, running from the Visual Studio debugger would still locally register the app (and it would appear on the start menu). To fix this, you have to uninstall it (it's simplest to right click on it from the start menu to uninstall it).
diff --git a/src/contrib/SDL-2.30.2/docs/README-gesture.md b/src/contrib/SDL-2.30.2/docs/README-gesture.md
new file mode 100644
index 0000000..69a66ad
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-gesture.md
@@ -0,0 +1,71 @@
1Dollar Gestures
2===========================================================================
3SDL provides an implementation of the $1 gesture recognition system. This allows for recording, saving, loading, and performing single stroke gestures.
4
5Gestures can be performed with any number of fingers (the centroid of the fingers must follow the path of the gesture), but the number of fingers must be constant (a finger cannot go down in the middle of a gesture). The path of a gesture is considered the path from the time when the final finger went down, to the first time any finger comes up.
6
7Dollar gestures are assigned an Id based on a hash function. This is guaranteed to remain constant for a given gesture. There is a (small) chance that two different gestures will be assigned the same ID. In this case, simply re-recording one of the gestures should result in a different ID.
8
9Recording:
10----------
11To begin recording on a touch device call:
12SDL_RecordGesture(SDL_TouchID touchId), where touchId is the id of the touch device you wish to record on, or -1 to record on all connected devices.
13
14Recording terminates as soon as a finger comes up. Recording is acknowledged by an SDL_DOLLARRECORD event.
15A SDL_DOLLARRECORD event is a dgesture with the following fields:
16
17* event.dgesture.touchId - the Id of the touch used to record the gesture.
18* event.dgesture.gestureId - the unique id of the recorded gesture.
19
20
21Performing:
22-----------
23As long as there is a dollar gesture assigned to a touch, every finger-up event will also cause an SDL_DOLLARGESTURE event with the following fields:
24
25* event.dgesture.touchId - the Id of the touch which performed the gesture.
26* event.dgesture.gestureId - the unique id of the closest gesture to the performed stroke.
27* event.dgesture.error - the difference between the gesture template and the actual performed gesture. Lower error is a better match.
28* event.dgesture.numFingers - the number of fingers used to draw the stroke.
29
30Most programs will want to define an appropriate error threshold and check to be sure that the error of a gesture is not abnormally high (an indicator that no gesture was performed).
31
32
33
34Saving:
35-------
36To save a template, call SDL_SaveDollarTemplate(gestureId, dst) where gestureId is the id of the gesture you want to save, and dst is an SDL_RWops pointer to the file where the gesture will be stored.
37
38To save all currently loaded templates, call SDL_SaveAllDollarTemplates(dst) where dst is an SDL_RWops pointer to the file where the gesture will be stored.
39
40Both functions return the number of gestures successfully saved.
41
42
43Loading:
44--------
45To load templates from a file, call SDL_LoadDollarTemplates(touchId,src) where touchId is the id of the touch to load to (or -1 to load to all touch devices), and src is an SDL_RWops pointer to a gesture save file.
46
47SDL_LoadDollarTemplates returns the number of templates successfully loaded.
48
49
50
51===========================================================================
52Multi Gestures
53===========================================================================
54SDL provides simple support for pinch/rotate/swipe gestures.
55Every time a finger is moved an SDL_MULTIGESTURE event is sent with the following fields:
56
57* event.mgesture.touchId - the Id of the touch on which the gesture was performed.
58* event.mgesture.x - the normalized x coordinate of the gesture. (0..1)
59* event.mgesture.y - the normalized y coordinate of the gesture. (0..1)
60* event.mgesture.dTheta - the amount that the fingers rotated during this motion.
61* event.mgesture.dDist - the amount that the fingers pinched during this motion.
62* event.mgesture.numFingers - the number of fingers used in the gesture.
63
64
65===========================================================================
66Notes
67===========================================================================
68For a complete example see test/testgesture.c
69
70Please direct questions/comments to:
71 jim.tla+sdl_touch@gmail.com
diff --git a/src/contrib/SDL-2.30.2/docs/README-git.md b/src/contrib/SDL-2.30.2/docs/README-git.md
new file mode 100644
index 0000000..fd12fd9
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-git.md
@@ -0,0 +1,19 @@
1git
2=========
3
4The latest development version of SDL is available via git.
5Git allows you to get up-to-the-minute fixes and enhancements;
6as a developer works on a source tree, you can use "git" to mirror that
7source tree instead of waiting for an official release. Please look
8at the Git website ( https://git-scm.com/ ) for more
9information on using git, where you can also download software for
10macOS, Windows, and Unix systems.
11
12 git clone https://github.com/libsdl-org/SDL
13
14If you are building SDL via configure, you will need to run autogen.sh
15before running configure.
16
17There is a web interface to the Git repository at:
18 http://github.com/libsdl-org/SDL/
19
diff --git a/src/contrib/SDL-2.30.2/docs/README-hg.md b/src/contrib/SDL-2.30.2/docs/README-hg.md
new file mode 100644
index 0000000..1b39017
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-hg.md
@@ -0,0 +1,4 @@
1We are no longer hosted in Mercurial. Please see README-git.md for details.
2
3Thanks!
4
diff --git a/src/contrib/SDL-2.30.2/docs/README-ios.md b/src/contrib/SDL-2.30.2/docs/README-ios.md
new file mode 100644
index 0000000..94c24b5
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-ios.md
@@ -0,0 +1,307 @@
1iOS
2======
3
4Building the Simple DirectMedia Layer for iOS 9.0+
5==============================================================================
6
7Requirements: Mac OS X 10.9 or later and the iOS 9.0 or newer SDK.
8
9Instructions:
10
111. Open SDL.xcodeproj (located in Xcode/SDL) in Xcode.
122. Select your desired target, and hit build.
13
14
15Using the Simple DirectMedia Layer for iOS
16==============================================================================
17
181. Run Xcode and create a new project using the iOS Game template, selecting the Objective C language and Metal game technology.
192. In the main view, delete all files except for Assets and LaunchScreen
203. Right click the project in the main view, select "Add Files...", and add the SDL project, Xcode/SDL/SDL.xcodeproj
214. Select the project in the main view, go to the "Info" tab and under "Custom iOS Target Properties" remove the line "Main storyboard file base name"
225. Select the project in the main view, go to the "Build Settings" tab, select "All", and edit "Header Search Path" and drag over the SDL "Public Headers" folder from the left
236. Select the project in the main view, go to the "Build Phases" tab, select "Link Binary With Libraries", and add SDL2.framework from "Framework-iOS"
247. Select the project in the main view, go to the "General" tab, scroll down to "Frameworks, Libraries, and Embedded Content", and select "Embed & Sign" for the SDL library.
258. In the main view, expand SDL -> Library Source -> main -> uikit and drag SDL_uikit_main.c into your game files
269. Add the source files that you would normally have for an SDL program, making sure to have #include "SDL.h" at the top of the file containing your main() function.
2710. Add any assets that your application needs.
2811. Enjoy!
29
30
31TODO: Add information regarding App Store requirements such as icons, etc.
32
33
34Notes -- Retina / High-DPI and window sizes
35==============================================================================
36
37Window and display mode sizes in SDL are in "screen coordinates" (or "points",
38in Apple's terminology) rather than in pixels. On iOS this means that a window
39created on an iPhone 6 will have a size in screen coordinates of 375 x 667,
40rather than a size in pixels of 750 x 1334. All iOS apps are expected to
41size their content based on screen coordinates / points rather than pixels,
42as this allows different iOS devices to have different pixel densities
43(Retina versus non-Retina screens, etc.) without apps caring too much.
44
45By default SDL will not use the full pixel density of the screen on
46Retina/high-dpi capable devices. Use the SDL_WINDOW_ALLOW_HIGHDPI flag when
47creating your window to enable high-dpi support.
48
49When high-dpi support is enabled, SDL_GetWindowSize() and display mode sizes
50will still be in "screen coordinates" rather than pixels, but the window will
51have a much greater pixel density when the device supports it, and the
52SDL_GL_GetDrawableSize() or SDL_GetRendererOutputSize() functions (depending on
53whether raw OpenGL or the SDL_Render API is used) can be queried to determine
54the size in pixels of the drawable screen framebuffer.
55
56Some OpenGL ES functions such as glViewport expect sizes in pixels rather than
57sizes in screen coordinates. When doing 2D rendering with OpenGL ES, an
58orthographic projection matrix using the size in screen coordinates
59(SDL_GetWindowSize()) can be used in order to display content at the same scale
60no matter whether a Retina device is used or not.
61
62
63Notes -- Application events
64==============================================================================
65
66On iOS the application goes through a fixed life cycle and you will get
67notifications of state changes via application events. When these events
68are delivered you must handle them in an event callback because the OS may
69not give you any processing time after the events are delivered.
70
71e.g.
72
73 int HandleAppEvents(void *userdata, SDL_Event *event)
74 {
75 switch (event->type)
76 {
77 case SDL_APP_TERMINATING:
78 /* Terminate the app.
79 Shut everything down before returning from this function.
80 */
81 return 0;
82 case SDL_APP_LOWMEMORY:
83 /* You will get this when your app is paused and iOS wants more memory.
84 Release as much memory as possible.
85 */
86 return 0;
87 case SDL_APP_WILLENTERBACKGROUND:
88 /* Prepare your app to go into the background. Stop loops, etc.
89 This gets called when the user hits the home button, or gets a call.
90 */
91 return 0;
92 case SDL_APP_DIDENTERBACKGROUND:
93 /* This will get called if the user accepted whatever sent your app to the background.
94 If the user got a phone call and canceled it, you'll instead get an SDL_APP_DIDENTERFOREGROUND event and restart your loops.
95 When you get this, you have 5 seconds to save all your state or the app will be terminated.
96 Your app is NOT active at this point.
97 */
98 return 0;
99 case SDL_APP_WILLENTERFOREGROUND:
100 /* This call happens when your app is coming back to the foreground.
101 Restore all your state here.
102 */
103 return 0;
104 case SDL_APP_DIDENTERFOREGROUND:
105 /* Restart your loops here.
106 Your app is interactive and getting CPU again.
107 */
108 return 0;
109 default:
110 /* No special processing, add it to the event queue */
111 return 1;
112 }
113 }
114
115 int main(int argc, char *argv[])
116 {
117 SDL_SetEventFilter(HandleAppEvents, NULL);
118
119 ... run your main loop
120
121 return 0;
122 }
123
124
125Notes -- Accelerometer as Joystick
126==============================================================================
127
128SDL for iPhone supports polling the built in accelerometer as a joystick device. For an example on how to do this, see the accelerometer.c in the demos directory.
129
130The main thing to note when using the accelerometer with SDL is that while the iPhone natively reports accelerometer as floating point values in units of g-force, SDL_JoystickGetAxis() reports joystick values as signed integers. Hence, in order to convert between the two, some clamping and scaling is necessary on the part of the iPhone SDL joystick driver. To convert SDL_JoystickGetAxis() reported values BACK to units of g-force, simply multiply the values by SDL_IPHONE_MAX_GFORCE / 0x7FFF.
131
132
133Notes -- OpenGL ES
134==============================================================================
135
136Your SDL application for iOS uses OpenGL ES for video by default.
137
138OpenGL ES for iOS supports several display pixel formats, such as RGBA8 and RGB565, which provide a 32 bit and 16 bit color buffer respectively. By default, the implementation uses RGB565, but you may use RGBA8 by setting each color component to 8 bits in SDL_GL_SetAttribute().
139
140If your application doesn't use OpenGL's depth buffer, you may find significant performance improvement by setting SDL_GL_DEPTH_SIZE to 0.
141
142Finally, if your application completely redraws the screen each frame, you may find significant performance improvement by setting the attribute SDL_GL_RETAINED_BACKING to 0.
143
144OpenGL ES on iOS doesn't use the traditional system-framebuffer setup provided in other operating systems. Special care must be taken because of this:
145
146- The drawable Renderbuffer must be bound to the GL_RENDERBUFFER binding point when SDL_GL_SwapWindow() is called.
147- The drawable Framebuffer Object must be bound while rendering to the screen and when SDL_GL_SwapWindow() is called.
148- If multisample antialiasing (MSAA) is used and glReadPixels is used on the screen, the drawable framebuffer must be resolved to the MSAA resolve framebuffer (via glBlitFramebuffer or glResolveMultisampleFramebufferAPPLE), and the MSAA resolve framebuffer must be bound to the GL_READ_FRAMEBUFFER binding point, before glReadPixels is called.
149
150The above objects can be obtained via SDL_GetWindowWMInfo() (in SDL_syswm.h).
151
152
153Notes -- Keyboard
154==============================================================================
155
156The SDL keyboard API has been extended to support on-screen keyboards:
157
158void SDL_StartTextInput()
159 -- enables text events and reveals the onscreen keyboard.
160
161void SDL_StopTextInput()
162 -- disables text events and hides the onscreen keyboard.
163
164SDL_bool SDL_IsTextInputActive()
165 -- returns whether or not text events are enabled (and the onscreen keyboard is visible)
166
167
168Notes -- Mouse
169==============================================================================
170
171iOS now supports Bluetooth mice on iPad, but by default will provide the mouse input as touch. In order for SDL to see the real mouse events, you should set the key UIApplicationSupportsIndirectInputEvents to true in your Info.plist
172
173
174Notes -- Reading and Writing files
175==============================================================================
176
177Each application installed on iPhone resides in a sandbox which includes its own Application Home directory. Your application may not access files outside this directory.
178
179Once your application is installed its directory tree looks like:
180
181 MySDLApp Home/
182 MySDLApp.app
183 Documents/
184 Library/
185 Preferences/
186 tmp/
187
188When your SDL based iPhone application starts up, it sets the working directory to the main bundle (MySDLApp Home/MySDLApp.app), where your application resources are stored. You cannot write to this directory. Instead, I advise you to write document files to "../Documents/" and preferences to "../Library/Preferences".
189
190More information on this subject is available here:
191http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html
192
193
194Notes -- xcFramework
195==============================================================================
196
197The SDL.xcodeproj file now includes a target to build SDL2.xcframework. An xcframework is a new (Xcode 11) uber-framework which can handle any combination of processor type and target OS platform.
198
199In the past, iOS devices were always an ARM variant processor, and the simulator was always i386 or x86_64, and thus libraries could be combined into a single framework for both simulator and device. With the introduction of the Apple Silicon ARM-based machines, regular frameworks would collide as CPU type was no longer sufficient to differentiate the platform. So Apple created the new xcframework library package.
200
201The xcframework target builds into a Products directory alongside the SDL.xcodeproj file, as SDL2.xcframework. This can be brought in to any iOS project and will function properly for both simulator and device, no matter their CPUs. Note that Intel Macs cannot cross-compile for Apple Silicon Macs. If you need AS compatibility, perform this build on an Apple Silicon Mac.
202
203This target requires Xcode 11 or later. The target will simply fail to build if attempted on older Xcodes.
204
205In addition, on Apple platforms, main() cannot be in a dynamically loaded library. This means that iOS apps which used the statically-linked libSDL2.lib and now link with the xcframwork will need to define their own main() to call SDL_UIKitRunApp(), like this:
206
207#ifndef SDL_MAIN_HANDLED
208#ifdef main
209#undef main
210#endif
211
212int
213main(int argc, char *argv[])
214{
215 return SDL_UIKitRunApp(argc, argv, SDL_main);
216}
217#endif /* !SDL_MAIN_HANDLED */
218
219Using an xcFramework is similar to using a regular framework. However, issues have been seen with the build system not seeing the headers in the xcFramework. To remedy this, add the path to the xcFramework in your app's target ==> Build Settings ==> Framework Search Paths and mark it recursive (this is critical). Also critical is to remove "*.framework" from Build Settings ==> Sub-Directories to Exclude in Recursive Searches. Clean the build folder, and on your next build the build system should be able to see any of these in your code, as expected:
220
221#include "SDL_main.h"
222#include <SDL.h>
223#include <SDL_main.h>
224
225
226Notes -- iPhone SDL limitations
227==============================================================================
228
229Windows:
230 Full-size, single window applications only. You cannot create multi-window SDL applications for iPhone OS. The application window will fill the display, though you have the option of turning on or off the menu-bar (pass SDL_CreateWindow() the flag SDL_WINDOW_BORDERLESS).
231
232Textures:
233 The optimal texture formats on iOS are SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, and SDL_PIXELFORMAT_RGB24 pixel formats.
234
235Loading Shared Objects:
236 This is disabled by default since it seems to break the terms of the iOS SDK agreement for iOS versions prior to iOS 8. It can be re-enabled in SDL_config_iphoneos.h.
237
238
239Notes -- CoreBluetooth.framework
240==============================================================================
241
242SDL_JOYSTICK_HIDAPI is disabled by default. It can give you access to a lot
243more game controller devices, but it requires permission from the user before
244your app will be able to talk to the Bluetooth hardware. "Made For iOS"
245branded controllers do not need this as we don't have to speak to them
246directly with raw bluetooth, so many apps can live without this.
247
248You'll need to link with CoreBluetooth.framework and add something like this
249to your Info.plist:
250
251<key>NSBluetoothPeripheralUsageDescription</key>
252<string>MyApp would like to remain connected to nearby bluetooth Game Controllers and Game Pads even when you're not using the app.</string>
253
254
255Game Center
256==============================================================================
257
258Game Center integration might require that you break up your main loop in order to yield control back to the system. In other words, instead of running an endless main loop, you run each frame in a callback function, using:
259
260 int SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
261
262This will set up the given function to be called back on the animation callback, and then you have to return from main() to let the Cocoa event loop run.
263
264e.g.
265
266 extern "C"
267 void ShowFrame(void*)
268 {
269 ... do event handling, frame logic and rendering ...
270 }
271
272 int main(int argc, char *argv[])
273 {
274 ... initialize game ...
275
276 #ifdef __IPHONEOS__
277 // Initialize the Game Center for scoring and matchmaking
278 InitGameCenter();
279
280 // Set up the game to run in the window animation callback on iOS
281 // so that Game Center and so forth works correctly.
282 SDL_iPhoneSetAnimationCallback(window, 1, ShowFrame, NULL);
283 #else
284 while ( running ) {
285 ShowFrame(0);
286 DelayFrame();
287 }
288 #endif
289 return 0;
290 }
291
292
293Deploying to older versions of iOS
294==============================================================================
295
296SDL supports deploying to older versions of iOS than are supported by the latest version of Xcode, all the way back to iOS 8.0
297
298In order to do that you need to download an older version of Xcode:
299https://developer.apple.com/download/more/?name=Xcode
300
301Open the package contents of the older Xcode and your newer version of Xcode and copy over the folders in Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
302
303Then open the file Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/SDKSettings.plist and add the versions of iOS you want to deploy to the key Root/DefaultProperties/DEPLOYMENT_TARGET_SUGGESTED_VALUES
304
305Open your project and set your deployment target to the desired version of iOS
306
307Finally, remove GameController from the list of frameworks linked by your application and edit the build settings for "Other Linker Flags" and add -weak_framework GameController
diff --git a/src/contrib/SDL-2.30.2/docs/README-kmsbsd.md b/src/contrib/SDL-2.30.2/docs/README-kmsbsd.md
new file mode 100644
index 0000000..1aad380
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-kmsbsd.md
@@ -0,0 +1,27 @@
1KMSDRM on *BSD
2==================================================
3
4KMSDRM is supported on FreeBSD and OpenBSD. DragonFlyBSD works but requires being a root user. NetBSD isn't supported yet because the application will crash when creating the KMSDRM screen.
5
6WSCONS support has been brought back, but only as an input backend. It will not be brought back as a video backend to ease maintenance.
7
8OpenBSD note: Note that the video backend assumes that the user has read/write permissions to the /dev/drm* devices.
9
10
11SDL2 WSCONS input backend features
12===================================================
131. It is keymap-aware; it will work properly with different keymaps.
142. It has mouse support.
153. Accent input is supported.
164. Compose keys are supported.
175. AltGr and Meta Shift keys work as intended.
18
19Partially working or no input on OpenBSD/NetBSD.
20==================================================
21
22The WSCONS input backend needs read/write access to the /dev/wskbd* devices, without which it will not work properly. /dev/wsmouse must also be read/write accessible, otherwise mouse input will not work.
23
24Partially working or no input on FreeBSD.
25==================================================
26
27The evdev devices are only accessible to the root user by default. Edit devfs rules to allow access to such devices. The /dev/kbd* devices are also only accessible to the root user by default. Edit devfs rules to allow access to such devices.
diff --git a/src/contrib/SDL-2.30.2/docs/README-linux.md b/src/contrib/SDL-2.30.2/docs/README-linux.md
new file mode 100644
index 0000000..83339bc
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-linux.md
@@ -0,0 +1,96 @@
1Linux
2================================================================================
3
4By default SDL will only link against glibc, the rest of the features will be
5enabled dynamically at runtime depending on the available features on the target
6system. So, for example if you built SDL with XRandR support and the target
7system does not have the XRandR libraries installed, it will be disabled
8at runtime, and you won't get a missing library error, at least with the
9default configuration parameters.
10
11
12Build Dependencies
13--------------------------------------------------------------------------------
14
15Ubuntu 18.04, all available features enabled:
16
17 sudo apt-get install build-essential git make autoconf automake libtool \
18 pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
19 libaudio-dev libjack-dev libsndio-dev libsamplerate0-dev libx11-dev libxext-dev \
20 libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libwayland-dev \
21 libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
22 libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev
23
24Ubuntu 22.04+ can also add `libpipewire-0.3-dev libdecor-0-dev` to that command line.
25
26Fedora 35, all available features enabled:
27
28 sudo yum install gcc git-core make cmake autoconf automake libtool \
29 alsa-lib-devel pulseaudio-libs-devel nas-devel pipewire-devel \
30 libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \
31 libXi-devel libXScrnSaver-devel dbus-devel ibus-devel fcitx-devel \
32 systemd-devel mesa-libGL-devel libxkbcommon-devel mesa-libGLES-devel \
33 mesa-libEGL-devel vulkan-devel wayland-devel wayland-protocols-devel \
34 libdrm-devel mesa-libgbm-devel libusb-devel libdecor-devel \
35 libsamplerate-devel pipewire-jack-audio-connection-kit-devel \
36
37NOTES:
38- This includes all the audio targets except arts and esd, because Ubuntu
39 (and/or Debian) pulled their packages, but in theory SDL still supports them.
40 The sndio audio target is also unavailable on Fedora.
41- libsamplerate0-dev lets SDL optionally link to libresamplerate at runtime
42 for higher-quality audio resampling. SDL will work without it if the library
43 is missing, so it's safe to build in support even if the end user doesn't
44 have this library installed.
45- DirectFB isn't included because the configure script (currently) fails to find
46 it at all. You can do "sudo apt-get install libdirectfb-dev" and fix the
47 configure script to include DirectFB support. Send patches. :)
48
49
50Joystick does not work
51--------------------------------------------------------------------------------
52
53If you compiled or are using a version of SDL with udev support (and you should!)
54there's a few issues that may cause SDL to fail to detect your joystick. To
55debug this, start by installing the evtest utility. On Ubuntu/Debian:
56
57 sudo apt-get install evtest
58
59Then run:
60
61 sudo evtest
62
63You'll hopefully see your joystick listed along with a name like "/dev/input/eventXX"
64Now run:
65
66 cat /dev/input/event/XX
67
68If you get a permission error, you need to set a udev rule to change the mode of
69your device (see below)
70
71Also, try:
72
73 sudo udevadm info --query=all --name=input/eventXX
74
75If you see a line stating ID_INPUT_JOYSTICK=1, great, if you don't see it,
76you need to set up an udev rule to force this variable.
77
78A combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks
79like:
80
81 SUBSYSTEM=="input", ATTRS{idProduct}=="0763", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
82 SUBSYSTEM=="input", ATTRS{idProduct}=="0764", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
83
84You can set up similar rules for your device by changing the values listed in
85idProduct and idVendor. To obtain these values, try:
86
87 sudo udevadm info -a --name=input/eventXX | grep idVendor
88 sudo udevadm info -a --name=input/eventXX | grep idProduct
89
90If multiple values come up for each of these, the one you want is the first one of each.
91
92On other systems which ship with an older udev (such as CentOS), you may need
93to set up a rule such as:
94
95 SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ID_INPUT_JOYSTICK}="1"
96
diff --git a/src/contrib/SDL-2.30.2/docs/README-macos.md b/src/contrib/SDL-2.30.2/docs/README-macos.md
new file mode 100644
index 0000000..634d456
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-macos.md
@@ -0,0 +1,285 @@
1# Mac OS X (aka macOS).
2
3These instructions are for people using Apple's Mac OS X (pronounced
4"ten"), which in newer versions is just referred to as "macOS".
5
6From the developer's point of view, macOS is a sort of hybrid Mac and
7Unix system, and you have the option of using either traditional
8command line tools or Apple's IDE Xcode.
9
10# Command Line Build
11
12To build SDL using the command line, use the standard configure and make
13process:
14
15```bash
16mkdir build
17cd build
18../configure
19make
20sudo make install
21```
22
23CMake is also known to work, although it continues to be a work in progress:
24
25```bash
26mkdir build
27cd build
28cmake -DCMAKE_BUILD_TYPE=Release ..
29make
30sudo make install
31```
32
33
34You can also build SDL as a Universal library (a single binary for both
3564-bit Intel and ARM architectures), by using the build-scripts/clang-fat.sh
36script.
37
38```bash
39mkdir build
40cd build
41CC=$PWD/../build-scripts/clang-fat.sh ../configure
42make
43sudo make install
44```
45
46This script builds SDL with 10.9 ABI compatibility on 64-bit Intel and 11.0
47ABI compatibility on ARM64 architectures. For best compatibility you
48should compile your application the same way.
49
50Please note that building SDL requires at least Xcode 6 and the 10.9 SDK.
51PowerPC support for macOS has been officially dropped as of SDL 2.0.2.
5232-bit Intel and macOS 10.8 runtime support has been officially dropped as
53of SDL 2.24.0.
54
55To use the library once it's built, you essential have two possibilities:
56use the traditional autoconf/automake/make method, or use Xcode.
57
58
59# Caveats for using SDL with Mac OS X
60
61If you register your own NSApplicationDelegate (using [NSApp setDelegate:]),
62SDL will not register its own. This means that SDL will not terminate using
63SDL_Quit if it receives a termination request, it will terminate like a
64normal app, and it will not send a SDL_DROPFILE when you request to open a
65file with the app. To solve these issues, put the following code in your
66NSApplicationDelegate implementation:
67
68
69```objc
70- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
71{
72 if (SDL_GetEventState(SDL_QUIT) == SDL_ENABLE) {
73 SDL_Event event;
74 event.type = SDL_QUIT;
75 SDL_PushEvent(&event);
76 }
77
78 return NSTerminateCancel;
79}
80
81- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
82{
83 if (SDL_GetEventState(SDL_DROPFILE) == SDL_ENABLE) {
84 SDL_Event event;
85 event.type = SDL_DROPFILE;
86 event.drop.file = SDL_strdup([filename UTF8String]);
87 return (SDL_PushEvent(&event) > 0);
88 }
89
90 return NO;
91}
92```
93
94# Using the Simple DirectMedia Layer with a traditional Makefile
95
96An existing autoconf/automake build system for your SDL app has good chances
97to work almost unchanged on macOS. However, to produce a "real" Mac binary
98that you can distribute to users, you need to put the generated binary into a
99so called "bundle", which is basically a fancy folder with a name like
100"MyCoolGame.app".
101
102To get this build automatically, add something like the following rule to
103your Makefile.am:
104
105```make
106bundle_contents = APP_NAME.app/Contents
107APP_NAME_bundle: EXE_NAME
108 mkdir -p $(bundle_contents)/MacOS
109 mkdir -p $(bundle_contents)/Resources
110 echo "APPL????" > $(bundle_contents)/PkgInfo
111 $(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/
112```
113
114You should replace `EXE_NAME` with the name of the executable. `APP_NAME` is
115what will be visible to the user in the Finder. Usually it will be the same
116as `EXE_NAME` but capitalized. E.g. if `EXE_NAME` is "testgame" then `APP_NAME`
117usually is "TestGame". You might also want to use `@PACKAGE@` to use the
118package name as specified in your configure.ac file.
119
120If your project builds more than one application, you will have to do a bit
121more. For each of your target applications, you need a separate rule.
122
123If you want the created bundles to be installed, you may want to add this
124rule to your Makefile.am:
125
126```make
127install-exec-hook: APP_NAME_bundle
128 rm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app
129 mkdir -p $(DESTDIR)$(prefix)/Applications/
130 cp -r $< /$(DESTDIR)$(prefix)Applications/
131```
132
133This rule takes the Bundle created by the rule from step 3 and installs them
134into "$(DESTDIR)$(prefix)/Applications/".
135
136Again, if you want to install multiple applications, you will have to augment
137the make rule accordingly.
138
139But beware! That is only part of the story! With the above, you end up with
140a barebones .app bundle, which is double-clickable from the Finder. But
141there are some more things you should do before shipping your product...
142
1431. The bundle right now probably is dynamically linked against SDL. That
144 means that when you copy it to another computer, *it will not run*,
145 unless you also install SDL on that other computer. A good solution
146 for this dilemma is to static link against SDL. On OS X, you can
147 achieve that by linking against the libraries listed by
148
149 ```bash
150 sdl-config --static-libs
151 ```
152
153 instead of those listed by
154
155 ```bash
156 sdl-config --libs
157 ```
158
159 Depending on how exactly SDL is integrated into your build systems, the
160 way to achieve that varies, so I won't describe it here in detail
161
1622. Add an 'Info.plist' to your application. That is a special XML file which
163 contains some meta-information about your application (like some copyright
164 information, the version of your app, the name of an optional icon file,
165 and other things). Part of that information is displayed by the Finder
166 when you click on the .app, or if you look at the "Get Info" window.
167 More information about Info.plist files can be found on Apple's homepage.
168
169
170As a final remark, let me add that I use some of the techniques (and some
171variations of them) in [Exult](https://github.com/exult/exult) and
172[ScummVM](https://github.com/scummvm/scummvm); both are available in source on
173the net, so feel free to take a peek at them for inspiration!
174
175
176# Using the Simple DirectMedia Layer with Xcode
177
178These instructions are for using Apple's Xcode IDE to build SDL applications.
179
180## First steps
181
182The first thing to do is to unpack the Xcode.tar.gz archive in the
183top level SDL directory (where the Xcode.tar.gz archive resides).
184Because Stuffit Expander will unpack the archive into a subdirectory,
185you should unpack the archive manually from the command line:
186
187```bash
188cd [path_to_SDL_source]
189tar zxf Xcode.tar.gz
190```
191
192This will create a new folder called Xcode, which you can browse
193normally from the Finder.
194
195## Building the Framework
196
197The SDL Library is packaged as a framework bundle, an organized
198relocatable folder hierarchy of executable code, interface headers,
199and additional resources. For practical purposes, you can think of a
200framework as a more user and system-friendly shared library, whose library
201file behaves more or less like a standard UNIX shared library.
202
203To build the framework, simply open the framework project and build it.
204By default, the framework bundle "SDL.framework" is installed in
205/Library/Frameworks. Therefore, the testers and project stationary expect
206it to be located there. However, it will function the same in any of the
207following locations:
208
209* ~/Library/Frameworks
210* /Local/Library/Frameworks
211* /System/Library/Frameworks
212
213## Build Options
214
215There are two "Build Styles" (See the "Targets" tab) for SDL.
216"Deployment" should be used if you aren't tweaking the SDL library.
217"Development" should be used to debug SDL apps or the library itself.
218
219## Building the Testers
220
221Open the SDLTest project and build away!
222
223## Using the Project Stationary
224
225Copy the stationary to the indicated folders to access it from
226the "New Project" and "Add target" menus. What could be easier?
227
228## Setting up a new project by hand
229
230Some of you won't want to use the Stationary so I'll give some tips:
231
232(this is accurate as of Xcode 12.5.)
233
234* Click "File" -> "New" -> "Project...
235* Choose "macOS" and then "App" from the "Application" section.
236* Fill out the options in the next window. User interface is "XIB" and
237 Language is "Objective-C".
238* Remove "main.m" from your project
239* Remove "MainMenu.xib" from your project
240* Remove "AppDelegates.*" from your project
241* Add "\$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path
242* Add "\$(HOME)/Library/Frameworks" to the frameworks search path
243* Add "-framework SDL -framework Foundation -framework AppKit" to "OTHER_LDFLAGS"
244* Add your files
245* Clean and build
246
247## Building from command line
248
249Use `xcode-build` in the same directory as your .pbxproj file
250
251## Running your app
252
253You can send command line args to your app by either invoking it from
254the command line (in *.app/Contents/MacOS) or by entering them in the
255Executables" panel of the target settings.
256
257# Implementation Notes
258
259Some things that may be of interest about how it all works...
260
261## Working directory
262
263In SDL 1.2, the working directory of your SDL app is by default set to its
264parent, but this is no longer the case in SDL 2.0. SDL2 does change the
265working directory, which means it'll be whatever the command line prompt
266that launched the program was using, or if launched by double-clicking in
267the finger, it will be "/", the _root of the filesystem_. Plan accordingly!
268You can use SDL_GetBasePath() to find where the program is running from and
269chdir() there directly.
270
271
272## You have a Cocoa App!
273
274Your SDL app is essentially a Cocoa application. When your app
275starts up and the libraries finish loading, a Cocoa procedure is called,
276which sets up the working directory and calls your main() method.
277You are free to modify your Cocoa app with generally no consequence
278to SDL. You cannot, however, easily change the SDL window itself.
279Functionality may be added in the future to help this.
280
281# Bug reports
282
283Bugs are tracked at [the GitHub issue tracker](https://github.com/libsdl-org/SDL/issues/).
284Please feel free to report bugs there!
285
diff --git a/src/contrib/SDL-2.30.2/docs/README-n3ds.md b/src/contrib/SDL-2.30.2/docs/README-n3ds.md
new file mode 100644
index 0000000..e9e7c7d
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-n3ds.md
@@ -0,0 +1,28 @@
1# Nintendo 3DS
2
3SDL port for the Nintendo 3DS [Homebrew toolchain](https://devkitpro.org/) contributed by:
4
5- [Pierre Wendling](https://github.com/FtZPetruska)
6
7Credits to:
8
9- The awesome people who ported SDL to other homebrew platforms.
10- The Devkitpro team for making all the tools necessary to achieve this.
11
12## Building
13
14To build for the Nintendo 3DS, make sure you have devkitARM and cmake installed and run:
15
16```bash
17cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/3DS.cmake" -DCMAKE_BUILD_TYPE=Release
18cmake --build build
19cmake --install build
20```
21
22## Notes
23
24- Currently only software rendering is supported.
25- SDL2main should be used to ensure ROMFS is enabled.
26- By default, the extra L2 cache and higher clock speeds of the New 2/3DS lineup are enabled. If you wish to turn it off, use `osSetSpeedupEnable(false)` in your main function.
27- `SDL_GetBasePath` returns the romfs root instead of the executable's directory.
28- The Nintendo 3DS uses a cooperative threading model on a single core, meaning a thread will never yield unless done manually through the `SDL_Delay` functions, or blocking waits (`SDL_LockMutex`, `SDL_SemWait`, `SDL_CondWait`, `SDL_WaitThread`). To avoid starving other threads, `SDL_SemTryWait` and `SDL_SemWaitTimeout` will yield if they fail to acquire the semaphore, see https://github.com/libsdl-org/SDL/pull/6776 for more information.
diff --git a/src/contrib/SDL-2.30.2/docs/README-nacl.md b/src/contrib/SDL-2.30.2/docs/README-nacl.md
new file mode 100644
index 0000000..5b05f39
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-nacl.md
@@ -0,0 +1,103 @@
1Native Client
2================================================================================
3
4Requirements:
5
6* Native Client SDK (https://developer.chrome.com/native-client),
7 (tested with Pepper version 33 or higher).
8
9The SDL backend for Chrome's Native Client has been tested only with the PNaCl
10toolchain, which generates binaries designed to run on ARM and x86_32/64
11platforms. This does not mean it won't work with the other toolchains!
12
13================================================================================
14Building SDL for NaCl
15================================================================================
16
17Set up the right environment variables (see naclbuild.sh), then configure SDL with:
18
19 configure --host=pnacl --prefix some/install/destination
20
21Then "make".
22
23As an example of how to create a deployable app a Makefile project is provided
24in test/nacl/Makefile, which includes some monkey patching of the common.mk file
25provided by NaCl, without which linking properly to SDL won't work (the search
26path can't be modified externally, so the linker won't find SDL's binaries unless
27you dump them into the SDK path, which is inconvenient).
28Also provided in test/nacl is the required support file, such as index.html,
29manifest.json, etc.
30SDL apps for NaCl run on a worker thread using the ppapi_simple infrastructure.
31This allows for blocking calls on all the relevant systems (OpenGL ES, filesystem),
32hiding the asynchronous nature of the browser behind the scenes...which is not the
33same as making it disappear!
34
35
36================================================================================
37Running tests
38================================================================================
39
40Due to the nature of NaCl programs, building and running SDL tests is not as
41straightforward as one would hope. The script naclbuild.sh in build-scripts
42automates the process and should serve as a guide for users of SDL trying to build
43their own applications.
44
45Basic usage:
46
47 ./naclbuild.sh path/to/pepper/toolchain (i.e. ~/naclsdk/pepper_35)
48
49This will build testgles2.c by default.
50
51If you want to build a different test, for example testrendercopyex.c:
52
53 SOURCES=~/sdl/SDL/test/testrendercopyex.c ./naclbuild.sh ~/naclsdk/pepper_35
54
55Once the build finishes, you have to serve the contents with a web server (the
56script will give you instructions on how to do that with Python).
57
58================================================================================
59RWops and nacl_io
60================================================================================
61
62SDL_RWops work transparently with nacl_io. Two functions control the mount points:
63
64 int mount(const char* source, const char* target,
65 const char* filesystemtype,
66 unsigned long mountflags, const void *data);
67 int umount(const char *target);
68
69 For convenience, SDL will by default mount an httpfs tree at / before calling
70the app's main function. Such setting can be overridden by calling:
71
72 umount("/");
73
74And then mounting a different filesystem at /
75
76It's important to consider that the asynchronous nature of file operations on a
77browser is hidden from the application, effectively providing the developer with
78a set of blocking file operations just like you get in a regular desktop
79environment, which eases the job of porting to Native Client, but also introduces
80a set of challenges of its own, in particular when big file sizes and slow
81connections are involved.
82
83For more information on how nacl_io and mount points work, see:
84
85 https://developer.chrome.com/native-client/devguide/coding/nacl_io
86 https://src.chromium.org/chrome/trunk/src/native_client_sdk/src/libraries/nacl_io/nacl_io.h
87
88To be able to save into the directory "/save/" (like backup of game) :
89
90 mount("", "/save", "html5fs", 0, "type=PERSISTENT");
91
92And add to manifest.json :
93
94 "permissions": [
95 "unlimitedStorage"
96 ]
97
98================================================================================
99TODO - Known Issues
100================================================================================
101* Testing of all systems with a real application (something other than SDL's tests)
102* Key events don't seem to work properly
103
diff --git a/src/contrib/SDL-2.30.2/docs/README-ngage.md b/src/contrib/SDL-2.30.2/docs/README-ngage.md
new file mode 100644
index 0000000..e480965
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-ngage.md
@@ -0,0 +1,44 @@
1Nokia N-Gage
2============
3
4SDL2 port for Symbian S60v1 and v2 with a main focus on the Nokia N-Gage
5(Classic and QD) by [Michael Fitzmayer](https://github.com/mupfdev).
6
7Compiling
8---------
9
10SDL is part of the [N-Gage SDK.](https://github.com/ngagesdk) project.
11The library is included in the
12[toolchain](https://github.com/ngagesdk/ngage-toolchain) as a
13sub-module.
14
15A complete example project based on SDL2 can be found in the GitHub
16account of the SDK: [Wordle](https://github.com/ngagesdk/wordle).
17
18Current level of implementation
19-------------------------------
20
21The video driver currently provides full screen video support with
22keyboard input.
23
24At the moment only the software renderer works.
25
26Audio is not yet implemented.
27
28Acknowledgements
29----------------
30
31Thanks to Hannu Viitala, Kimmo Kinnunen and Markus Mertama for the
32valuable insight into Symbian programming. Without the SDL 1.2 port
33which was specially developed for CDoom (Doom for the Nokia 9210), this
34adaptation would not have been possible.
35
36I would like to thank my friends
37[Razvan](https://twitter.com/bewarerazvan) and [Dan
38Whelan](https://danwhelan.ie/), for their continuous support. Without
39you and the [N-Gage community](https://discord.gg/dbUzqJ26vs), I would
40have lost my patience long ago.
41
42Last but not least, I would like to thank the development team of
43[EKA2L1](https://12z1.com/) (an experimental Symbian OS emulator). Your
44patience and support in troubleshooting helped me a lot.
diff --git a/src/contrib/SDL-2.30.2/docs/README-os2.md b/src/contrib/SDL-2.30.2/docs/README-os2.md
new file mode 100644
index 0000000..6870ee3
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-os2.md
@@ -0,0 +1,92 @@
1Simple DirectMedia Layer 2 for OS/2 & eComStation
2================================================================================
3SDL port for OS/2, authored by Andrey Vasilkin <digi@os2.snc.ru>, 2016
4
5
6OpenGL not supported by this port.
7
8Additional optional environment variables:
9
10SDL_AUDIO_SHARE
11 Values: 0 or 1, default is 0
12 Initializes the device as shareable or exclusively acquired.
13
14SDL_VIDEODRIVER
15 Values: DIVE or VMAN, default is DIVE
16 Use video subsystem: Direct interface video extensions (DIVE) or
17 Video Manager (VMAN).
18
19You may significantly increase video output speed with OS4 kernel and patched
20files vman.dll and dive.dll or with latest versions of ACPI support and video
21driver Panorama.
22
23Latest versions of OS/4 kernel:
24 http://gus.biysk.ru/os4/
25 (Info: https://www.os2world.com/wiki/index.php/Phoenix_OS/4)
26
27Patched files vman.dll and dive.dll:
28 http://gus.biysk.ru/os4/test/pached_dll/PATCHED_DLL.RAR
29
30
31Compiling:
32----------
33
34Open Watcom 1.9 or newer is tested. For the new Open Watcom V2 fork, see:
35https://github.com/open-watcom/ and https://open-watcom.github.io
36WATCOM environment variable must to be set to the Open Watcom install
37directory. To compile, run: wmake -f Makefile.os2
38
39
40Installing:
41-----------
42
43- eComStation:
44
45 If you have previously installed SDL2, make a Backup copy of SDL2.dll
46 located in D:\ecs\dll (where D: is disk on which installed eComStation).
47 Stop all programs running with SDL2. Copy SDL2.dll to D:\ecs\dll
48
49- OS/2:
50
51 Copy SDL2.dll to any directory on your LIBPATH. If you have a previous
52 version installed, close all SDL2 applications before replacing the old
53 copy. Also make sure that any other older versions of DLLs are removed
54 from your system.
55
56
57Joysticks in SDL2:
58------------------
59
60The joystick code in SDL2 is a direct forward-port from the SDL-1.2 version.
61Here is the original documentation from SDL-1.2:
62
63The Joystick detection only works for standard joysticks (2 buttons, 2 axes
64and the like). Therefore, if you use a non-standard joystick, you should
65specify its features in the SDL_OS2_JOYSTICK environment variable in a batch
66file or CONFIG.SYS, so SDL applications can provide full capability to your
67device. The syntax is:
68
69SET SDL_OS2_JOYSTICK=[JOYSTICK_NAME] [AXES] [BUTTONS] [HATS] [BALLS]
70
71So, it you have a Gravis GamePad with 4 axes, 2 buttons, 2 hats and 0 balls,
72the line should be:
73
74SET SDL_OS2_JOYSTICK=Gravis_GamePad 4 2 2 0
75
76If you want to add spaces in your joystick name, just surround it with
77quotes or double-quotes:
78
79SET SDL_OS2_JOYSTICK='Gravis GamePad' 4 2 2 0
80
81or
82
83SET SDL_OS2_JOYSTICK="Gravis GamePad" 4 2 2 0
84
85 Note however that Balls and Hats are not supported under OS/2, and the
86value will be ignored... but it is wise to define these correctly because
87in the future those can be supported.
88
89 Also the number of buttons is limited to 2 when using two joysticks,
904 when using one joystick with 4 axes, 6 when using a joystick with 3 axes
91and 8 when using a joystick with 2 axes. Notice however these are limitations
92of the Joystick Port hardware, not OS/2.
diff --git a/src/contrib/SDL-2.30.2/docs/README-pandora.md b/src/contrib/SDL-2.30.2/docs/README-pandora.md
new file mode 100644
index 0000000..68ea774
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-pandora.md
@@ -0,0 +1,17 @@
1Pandora
2=====================================================================
3
4( http://openpandora.org/ )
5- A pandora specific video driver was written to allow SDL 2.0 with OpenGL ES
6support to work on the pandora under the framebuffer. This driver do not have
7input support for now, so if you use it you will have to add your own control code.
8The video driver name is "pandora" so if you have problem running it from
9the framebuffer, try to set the following variable before starting your application :
10"export SDL_VIDEODRIVER=pandora"
11
12- OpenGL ES support was added to the x11 driver, so it's working like the normal
13x11 driver one with OpenGLX support, with SDL input event's etc..
14
15
16David Carré (Cpasjuste)
17cpasjuste@gmail.com
diff --git a/src/contrib/SDL-2.30.2/docs/README-platforms.md b/src/contrib/SDL-2.30.2/docs/README-platforms.md
new file mode 100644
index 0000000..711557d
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-platforms.md
@@ -0,0 +1,8 @@
1Platforms
2=========
3
4We maintain the list of supported platforms on our wiki now, and how to
5build and install SDL for those platforms:
6
7 https://wiki.libsdl.org/Installation
8
diff --git a/src/contrib/SDL-2.30.2/docs/README-porting.md b/src/contrib/SDL-2.30.2/docs/README-porting.md
new file mode 100644
index 0000000..de30592
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-porting.md
@@ -0,0 +1,68 @@
1Porting
2=======
3
4* Porting To A New Platform
5
6 The first thing you have to do when porting to a new platform, is look at
7include/SDL_platform.h and create an entry there for your operating system.
8The standard format is "__PLATFORM__", where PLATFORM is the name of the OS.
9Ideally SDL_platform.h will be able to auto-detect the system it's building
10on based on C preprocessor symbols.
11
12There are two basic ways of building SDL at the moment:
13
141. The "UNIX" way: ./configure; make; make install
15
16 If you have a GNUish system, then you might try this. Edit configure.ac,
17 take a look at the large section labelled:
18
19 "Set up the configuration based on the host platform!"
20
21 Add a section for your platform, and then re-run autogen.sh and build!
22
232. Using an IDE:
24
25 If you're using an IDE or other non-configure build system, you'll probably
26 want to create a custom SDL_config.h for your platform. Edit SDL_config.h,
27 add a section for your platform, and create a custom SDL_config_{platform}.h,
28 based on SDL_config_minimal.h and SDL_config.h.in
29
30 Add the top level include directory to the header search path, and then add
31 the following sources to the project:
32
33 src/*.c
34 src/atomic/*.c
35 src/audio/*.c
36 src/cpuinfo/*.c
37 src/events/*.c
38 src/file/*.c
39 src/haptic/*.c
40 src/joystick/*.c
41 src/power/*.c
42 src/render/*.c
43 src/render/software/*.c
44 src/stdlib/*.c
45 src/thread/*.c
46 src/timer/*.c
47 src/video/*.c
48 src/audio/disk/*.c
49 src/audio/dummy/*.c
50 src/filesystem/dummy/*.c
51 src/video/dummy/*.c
52 src/haptic/dummy/*.c
53 src/joystick/dummy/*.c
54 src/main/dummy/*.c
55 src/thread/generic/*.c
56 src/timer/dummy/*.c
57 src/loadso/dummy/*.c
58
59
60Once you have a working library without any drivers, you can go back to each
61of the major subsystems and start implementing drivers for your platform.
62
63If you have any questions, don't hesitate to ask on the SDL mailing list:
64 http://www.libsdl.org/mailing-list.php
65
66Enjoy!
67 Sam Lantinga (slouken@libsdl.org)
68
diff --git a/src/contrib/SDL-2.30.2/docs/README-ps2.md b/src/contrib/SDL-2.30.2/docs/README-ps2.md
new file mode 100644
index 0000000..f422da9
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-ps2.md
@@ -0,0 +1,51 @@
1PS2
2======
3SDL2 port for the Sony Playstation 2 contributed by:
4- Francisco Javier Trujillo Mata
5
6
7Credit to
8 - The guys that ported SDL to PSP & Vita because I'm taking them as reference.
9 - David G. F. for helping me with several issues and tests.
10
11## Building
12To build SDL2 library for the PS2, make sure you have the latest PS2Dev status and run:
13```bash
14cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake
15cmake --build build
16cmake --install build
17```
18
19## Hints
20The PS2 port has a special Hint for having a dynamic VSYNC. The Hint is `SDL_HINT_PS2_DYNAMIC_VSYNC`.
21If you enabled the dynamic vsync having as well `SDL_RENDERER_PRESENTVSYNC` enabled, then if the app is not able to run at 60 FPS, automatically the `vsync` will be disabled having a better performance, instead of droping FPS to 30.
22
23## Notes
24If you trying to debug a SDL app through [ps2client](https://github.com/ps2dev/ps2client) you need to avoid the IOP reset, otherwise you will lose the conection with your computer.
25So to avoid the reset of the IOP CPU, you need to call to the macro `SDL_PS2_SKIP_IOP_RESET();`.
26It could be something similar as:
27```c
28.....
29
30SDL_PS2_SKIP_IOP_RESET();
31
32int main(int argc, char *argv[])
33{
34.....
35```
36For a release binary is recommendable to reset the IOP always.
37
38Remember to do a clean compilation everytime you enable or disable the `SDL_PS2_SKIP_IOP_RESET` otherwise the change won't be reflected.
39
40## Getting PS2 Dev
41[Installing PS2 Dev](https://github.com/ps2dev/ps2dev)
42
43## Running on PCSX2 Emulator
44[PCSX2](https://github.com/PCSX2/pcsx2)
45
46[More PCSX2 information](https://pcsx2.net/)
47
48## To Do
49- PS2 Screen Keyboard
50- Dialogs
51- Others
diff --git a/src/contrib/SDL-2.30.2/docs/README-psp.md b/src/contrib/SDL-2.30.2/docs/README-psp.md
new file mode 100644
index 0000000..96ecd76
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-psp.md
@@ -0,0 +1,36 @@
1PSP
2======
3SDL2 port for the Sony PSP contributed by:
4- Captian Lex
5- Francisco Javier Trujillo Mata
6- Wouter Wijsman
7
8
9Credit to
10 Marcus R.Brown,Jim Paris,Matthew H for the original SDL 1.2 for PSP
11 Geecko for his PSP GU lib "Glib2d"
12
13## Building
14To build SDL2 library for the PSP, make sure you have the latest PSPDev status and run:
15```bash
16cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake
17cmake --build build
18cmake --install build
19```
20
21
22## Getting PSP Dev
23[Installing PSP Dev](https://github.com/pspdev/pspdev)
24
25## Running on PPSSPP Emulator
26[PPSSPP](https://github.com/hrydgard/ppsspp)
27
28[Build Instructions](https://github.com/hrydgard/ppsspp/wiki/Build-instructions)
29
30
31## Compiling a HelloWorld
32[PSP Hello World](https://psp-dev.org/doku.php?id=tutorial:hello_world)
33
34## To Do
35- PSP Screen Keyboard
36- Dialogs
diff --git a/src/contrib/SDL-2.30.2/docs/README-raspberrypi.md b/src/contrib/SDL-2.30.2/docs/README-raspberrypi.md
new file mode 100644
index 0000000..7f9bfb1
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-raspberrypi.md
@@ -0,0 +1,180 @@
1Raspberry Pi
2============
3
4Requirements:
5
6Raspbian (other Linux distros may work as well).
7
8Features
9--------
10
11* Works without X11
12* Hardware accelerated OpenGL ES 2.x
13* Sound via ALSA
14* Input (mouse/keyboard/joystick) via EVDEV
15* Hotplugging of input devices via UDEV
16
17
18Raspbian Build Dependencies
19---------------------------
20
21sudo apt-get install libudev-dev libasound2-dev libdbus-1-dev
22
23You also need the VideoCore binary stuff that ships in /opt/vc for EGL and
24OpenGL ES 2.x, it usually comes pre-installed, but in any case:
25
26sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev
27
28
29NEON
30----
31
32If your Pi has NEON support, make sure you add -mfpu=neon to your CFLAGS so
33that SDL will select some otherwise-disabled highly-optimized code. The
34original Pi units don't have NEON, the Pi2 probably does, and the Pi3
35definitely does.
36
37
38Cross compiling from x86 Linux
39------------------------------
40
41To cross compile SDL for Raspbian from your desktop machine, you'll need a
42Raspbian system root and the cross compilation tools. We'll assume these tools
43will be placed in /opt/rpi-tools
44
45 sudo git clone --depth 1 https://github.com/raspberrypi/tools /opt/rpi-tools
46
47You'll also need a Raspbian binary image.
48Get it from: http://downloads.raspberrypi.org/raspbian_latest
49After unzipping, you'll get file with a name like: "<date>-wheezy-raspbian.img"
50Let's assume the sysroot will be built in /opt/rpi-sysroot.
51
52 export SYSROOT=/opt/rpi-sysroot
53 sudo kpartx -a -v <path_to_raspbian_image>.img
54 sudo mount -o loop /dev/mapper/loop0p2 /mnt
55 sudo cp -r /mnt $SYSROOT
56 sudo apt-get install qemu binfmt-support qemu-user-static
57 sudo cp /usr/bin/qemu-arm-static $SYSROOT/usr/bin
58 sudo mount --bind /dev $SYSROOT/dev
59 sudo mount --bind /proc $SYSROOT/proc
60 sudo mount --bind /sys $SYSROOT/sys
61
62Now, before chrooting into the ARM sysroot, you'll need to apply a workaround,
63edit $SYSROOT/etc/ld.so.preload and comment out all lines in it.
64
65 sudo chroot $SYSROOT
66 apt-get install libudev-dev libasound2-dev libdbus-1-dev libraspberrypi0 libraspberrypi-bin libraspberrypi-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev
67 exit
68 sudo umount $SYSROOT/dev
69 sudo umount $SYSROOT/proc
70 sudo umount $SYSROOT/sys
71 sudo umount /mnt
72
73There's one more fix required, as the libdl.so symlink uses an absolute path
74which doesn't quite work in our setup.
75
76 sudo rm -rf $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so
77 sudo ln -s ../../../lib/arm-linux-gnueabihf/libdl.so.2 $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so
78
79The final step is compiling SDL itself.
80
81 export CC="/opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux"
82 cd <SDL SOURCE>
83 mkdir -p build;cd build
84 LDFLAGS="-L$SYSROOT/opt/vc/lib" ../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd
85 make
86 make install
87
88To be able to deploy this to /usr/local in the Raspbian system you need to fix up a few paths:
89
90 perl -w -pi -e "s#$PWD/rpi-sdl2-installed#/usr/local#g;" ./rpi-sdl2-installed/lib/libSDL2.la ./rpi-sdl2-installed/lib/pkgconfig/sdl2.pc ./rpi-sdl2-installed/bin/sdl2-config
91
92Apps don't work or poor video/audio performance
93-----------------------------------------------
94
95If you get sound problems, buffer underruns, etc, run "sudo rpi-update" to
96update the RPi's firmware. Note that doing so will fix these problems, but it
97will also render the CMA - Dynamic Memory Split functionality useless.
98
99Also, by default the Raspbian distro configures the GPU RAM at 64MB, this is too
100low in general, specially if a 1080p TV is hooked up.
101
102See here how to configure this setting: http://elinux.org/RPiconfig
103
104Using a fixed gpu_mem=128 is the best option (specially if you updated the
105firmware, using CMA probably won't work, at least it's the current case).
106
107No input
108--------
109
110Make sure you belong to the "input" group.
111
112 sudo usermod -aG input `whoami`
113
114No HDMI Audio
115-------------
116
117If you notice that ALSA works but there's no audio over HDMI, try adding:
118
119 hdmi_drive=2
120
121to your config.txt file and reboot.
122
123Reference: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=5062
124
125Text Input API support
126----------------------
127
128The Text Input API is supported, with translation of scan codes done via the
129kernel symbol tables. For this to work, SDL needs access to a valid console.
130If you notice there's no SDL_TEXTINPUT message being emitted, double check that
131your app has read access to one of the following:
132
133* /proc/self/fd/0
134* /dev/tty
135* /dev/tty[0...6]
136* /dev/vc/0
137* /dev/console
138
139This is usually not a problem if you run from the physical terminal (as opposed
140to running from a pseudo terminal, such as via SSH). If running from a PTS, a
141quick workaround is to run your app as root or add yourself to the tty group,
142then re-login to the system.
143
144 sudo usermod -aG tty `whoami`
145
146The keyboard layout used by SDL is the same as the one the kernel uses.
147To configure the layout on Raspbian:
148
149 sudo dpkg-reconfigure keyboard-configuration
150
151To configure the locale, which controls which keys are interpreted as letters,
152this determining the CAPS LOCK behavior:
153
154 sudo dpkg-reconfigure locales
155
156
157OpenGL problems
158---------------
159
160If you have desktop OpenGL headers installed at build time in your RPi or cross
161compilation environment, support for it will be built in. However, the chipset
162does not actually have support for it, which causes issues in certain SDL apps
163since the presence of OpenGL support supersedes the ES/ES2 variants.
164The workaround is to disable OpenGL at configuration time:
165
166 ./configure --disable-video-opengl
167
168Or if the application uses the Render functions, you can use the SDL_RENDER_DRIVER
169environment variable:
170
171 export SDL_RENDER_DRIVER=opengles2
172
173Notes
174-----
175
176* When launching apps remotely (via SSH), SDL can prevent local keystrokes from
177 leaking into the console only if it has root privileges. Launching apps locally
178 does not suffer from this issue.
179
180
diff --git a/src/contrib/SDL-2.30.2/docs/README-riscos.md b/src/contrib/SDL-2.30.2/docs/README-riscos.md
new file mode 100644
index 0000000..e4e056b
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-riscos.md
@@ -0,0 +1,41 @@
1RISC OS
2=======
3
4Requirements:
5
6* RISC OS 3.5 or later.
7* [SharedUnixLibrary](http://www.riscos.info/packages/LibraryDetails.html#SharedUnixLibraryarm).
8* [DigitalRenderer](http://www.riscos.info/packages/LibraryDetails.html#DRendererarm), for audio support.
9* [Iconv](http://www.netsurf-browser.org/projects/iconv/), for `SDL_iconv` and related functions.
10
11
12Compiling:
13----------
14
15Currently, SDL2 for RISC OS only supports compiling with GCCSDK under Linux. Both the autoconf and CMake build systems are supported.
16
17The following commands can be used to build SDL2 for RISC OS using autoconf:
18
19 ./configure --host=arm-unknown-riscos --prefix=$GCCSDK_INSTALL_ENV --disable-gcc-atomics
20 make
21 make install
22
23The following commands can be used to build SDL2 for RISC OS using CMake:
24
25 cmake -Bbuild-riscos -DCMAKE_TOOLCHAIN_FILE=$GCCSDK_INSTALL_ENV/toolchain-riscos.cmake -DRISCOS=ON -DCMAKE_INSTALL_PREFIX=$GCCSDK_INSTALL_ENV -DCMAKE_BUILD_TYPE=Release -DSDL_GCC_ATOMICS=OFF
26 cmake --build build-riscos
27 cmake --build build-riscos --target install
28
29
30Current level of implementation
31-------------------------------
32
33The video driver currently provides full screen video support with keyboard and mouse input. Windowed mode is not yet supported, but is planned in the future. Only software rendering is supported.
34
35The filesystem APIs return either Unix-style paths or RISC OS-style paths based on the value of the `__riscosify_control` symbol, as is standard for UnixLib functions.
36
37The audio, loadso, thread and timer APIs are currently provided by UnixLib.
38
39GCC atomics are currently broken on some platforms, meaning it's currently necessary to compile with `--disable-gcc-atomics` using autotools or `-DSDL_GCC_ATOMICS=OFF` using CMake.
40
41The joystick, locale and power APIs are not yet implemented.
diff --git a/src/contrib/SDL-2.30.2/docs/README-touch.md b/src/contrib/SDL-2.30.2/docs/README-touch.md
new file mode 100644
index 0000000..66c1b2b
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-touch.md
@@ -0,0 +1,86 @@
1Touch
2===========================================================================
3System Specific Notes
4===========================================================================
5Linux:
6The linux touch system is currently based off event streams, and proc/bus/devices. The active user must be given permissions to read /dev/input/TOUCHDEVICE, where TOUCHDEVICE is the event stream for your device. Currently only Wacom tablets are supported. If you have an unsupported tablet contact me at jim.tla+sdl_touch@gmail.com and I will help you get support for it.
7
8Mac:
9The Mac and iPhone APIs are pretty. If your touch device supports them then you'll be fine. If it doesn't, then there isn't much we can do.
10
11iPhone:
12Works out of box.
13
14Windows:
15Unfortunately there is no windows support as of yet. Support for Windows 7 is planned, but we currently have no way to test. If you have a Windows 7 WM_TOUCH supported device, and are willing to help test please contact me at jim.tla+sdl_touch@gmail.com
16
17===========================================================================
18Events
19===========================================================================
20SDL_FINGERDOWN:
21Sent when a finger (or stylus) is placed on a touch device.
22Fields:
23* event.tfinger.touchId - the Id of the touch device.
24* event.tfinger.fingerId - the Id of the finger which just went down.
25* event.tfinger.x - the x coordinate of the touch (0..1)
26* event.tfinger.y - the y coordinate of the touch (0..1)
27* event.tfinger.pressure - the pressure of the touch (0..1)
28
29SDL_FINGERMOTION:
30Sent when a finger (or stylus) is moved on the touch device.
31Fields:
32Same as SDL_FINGERDOWN but with additional:
33* event.tfinger.dx - change in x coordinate during this motion event.
34* event.tfinger.dy - change in y coordinate during this motion event.
35
36SDL_FINGERUP:
37Sent when a finger (or stylus) is lifted from the touch device.
38Fields:
39Same as SDL_FINGERDOWN.
40
41
42===========================================================================
43Functions
44===========================================================================
45SDL provides the ability to access the underlying SDL_Finger structures.
46These structures should _never_ be modified.
47
48The following functions are included from SDL_touch.h
49
50To get a SDL_TouchID call SDL_GetTouchDevice(int index).
51This returns a SDL_TouchID.
52IMPORTANT: If the touch has been removed, or there is no touch with the given index, SDL_GetTouchDevice() will return 0. Be sure to check for this!
53
54The number of touch devices can be queried with SDL_GetNumTouchDevices().
55
56A SDL_TouchID may be used to get pointers to SDL_Finger.
57
58SDL_GetNumTouchFingers(touchID) may be used to get the number of fingers currently down on the device.
59
60The most common reason to access SDL_Finger is to query the fingers outside the event. In most cases accessing the fingers is using the event. This would be accomplished by code like the following:
61
62 float x = event.tfinger.x;
63 float y = event.tfinger.y;
64
65
66
67To get a SDL_Finger, call SDL_GetTouchFinger(SDL_TouchID touchID, int index), where touchID is a SDL_TouchID, and index is the requested finger.
68This returns a SDL_Finger *, or NULL if the finger does not exist, or has been removed.
69A SDL_Finger is guaranteed to be persistent for the duration of a touch, but it will be de-allocated as soon as the finger is removed. This occurs when the SDL_FINGERUP event is _added_ to the event queue, and thus _before_ the SDL_FINGERUP event is polled.
70As a result, be very careful to check for NULL return values.
71
72A SDL_Finger has the following fields:
73* x, y:
74 The current coordinates of the touch.
75* pressure:
76 The pressure of the touch.
77
78
79===========================================================================
80Notes
81===========================================================================
82For a complete example see test/testgesture.c
83
84Please direct questions/comments to:
85 jim.tla+sdl_touch@gmail.com
86 (original author, API was changed since)
diff --git a/src/contrib/SDL-2.30.2/docs/README-versions.md b/src/contrib/SDL-2.30.2/docs/README-versions.md
new file mode 100644
index 0000000..d54bf40
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-versions.md
@@ -0,0 +1,60 @@
1# Versioning
2
3## Since 2.23.0
4
5SDL follows an "odd/even" versioning policy, similar to GLib, GTK, Flatpak
6and older versions of the Linux kernel:
7
8* The major version (first part) increases when backwards compatibility
9 is broken, which will happen infrequently.
10
11* If the minor version (second part) is divisible by 2
12 (for example 2.24.x, 2.26.x), this indicates a version of SDL that
13 is believed to be stable and suitable for production use.
14
15 * In stable releases, the patchlevel or micro version (third part)
16 indicates bugfix releases. Bugfix releases should not add or
17 remove ABI, so the ".0" release (for example 2.24.0) should be
18 forwards-compatible with all the bugfix releases from the
19 same cycle (for example 2.24.1).
20
21 * The minor version increases when new API or ABI is added, or when
22 other significant changes are made. Newer minor versions are
23 backwards-compatible, but not fully forwards-compatible.
24 For example, programs built against SDL 2.24.x should work fine
25 with SDL 2.26.x, but programs built against SDL 2.26.x will not
26 necessarily work with 2.24.x.
27
28* If the minor version (second part) is not divisible by 2
29 (for example 2.23.x, 2.25.x), this indicates a development prerelease
30 of SDL that is not suitable for stable software distributions.
31 Use with caution.
32
33 * The patchlevel or micro version (third part) increases with
34 each prerelease.
35
36 * Each prerelease might add new API and/or ABI.
37
38 * Prereleases are backwards-compatible with older stable branches.
39 For example, 2.25.x will be backwards-compatible with 2.24.x.
40
41 * Prereleases are not guaranteed to be backwards-compatible with
42 each other. For example, new API or ABI added in 2.25.1
43 might be removed or changed in 2.25.2.
44 If this would be a problem for you, please do not use prereleases.
45
46 * Only upgrade to a prerelease if you can guarantee that you will
47 promptly upgrade to the stable release that follows it.
48 For example, do not upgrade to 2.23.x unless you will be able to
49 upgrade to 2.24.0 when it becomes available.
50
51 * Software distributions that have a freeze policy (in particular Linux
52 distributions with a release cycle, such as Debian and Fedora)
53 should usually only package stable releases, and not prereleases.
54
55## Before 2.23.0
56
57Older versions of SDL followed a similar policy, but instead of the
58odd/even rule applying to the minor version, it applied to the patchlevel
59(micro version, third part). For example, 2.0.22 was a stable release
60and 2.0.21 was a prerelease.
diff --git a/src/contrib/SDL-2.30.2/docs/README-visualc.md b/src/contrib/SDL-2.30.2/docs/README-visualc.md
new file mode 100644
index 0000000..fd34b35
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-visualc.md
@@ -0,0 +1,114 @@
1Using SDL with Microsoft Visual C++
2===================================
3
4### by Lion Kimbro with additions by James Turk
5
6You can either use the precompiled libraries from the [SDL](https://www.libsdl.org/download.php) web site, or you can build SDL
7yourself.
8
9### Building SDL
10
110. To build SDL, your machine must, at a minimum, have the DirectX9.0c SDK installed. It may or may not be retrievable from
12the [Microsoft](https://www.microsoft.com) website, so you might need to locate it [online](https://duckduckgo.com/?q=directx9.0c+sdk+download&t=h_&ia=web).
13_Editor's note: I've been able to successfully build SDL using Visual Studio 2019 **without** the DX9.0c SDK_
14
151. Open the Visual Studio solution file at `./VisualC/SDL.sln`.
16
172. Your IDE will likely prompt you to upgrade this solution file to whatever later version of the IDE you're using. In the `Retarget Projects` dialog,
18all of the affected project files should be checked allowing you to use the latest `Windows SDK Version` you have installed, along with
19the `Platform Toolset`.
20
21If you choose *NOT* to upgrade to use the latest `Windows SDK Version` or `Platform Toolset`, then you'll need the `Visual Studio 2010 Platform Toolset`.
22
233. Build the `.dll` and `.lib` files by right clicking on each project in turn (Projects are listed in the _Workspace_
24panel in the _FileView_ tab), and selecting `Build`.
25
26You may get a few warnings, but you should not get any errors.
27
28Later, we will refer to the following `.lib` and `.dll` files that have just been generated:
29
30- `./VisualC/Win32/Debug/SDL2.dll` or `./VisualC/Win32/Release/SDL2.dll`
31- `./VisualC/Win32/Debug/SDL2.lib` or `./VisualC/Win32/Release/SDL2.lib`
32- `./VisualC/Win32/Debug/SDL2main.lib` or `./VisualC/Win32/Release/SDL2main.lib`
33
34_Note for the `x64` versions, just replace `Win32` in the path with `x64`_
35
36### Creating a Project with SDL
37
38- Create a project as a `Win32 Application`.
39
40- Create a C++ file for your project.
41
42- Set the C runtime to `Multi-threaded DLL` in the menu:
43`Project|Settings|C/C++ tab|Code Generation|Runtime Library `.
44
45- Add the SDL `include` directory to your list of includes in the menu:
46`Project|Settings|C/C++ tab|Preprocessor|Additional include directories `
47
48*VC7 Specific: Instead of doing this, I find it easier to add the
49include and library directories to the list that VC7 keeps. Do this by
50selecting Tools|Options|Projects|VC++ Directories and under the "Show
51Directories For:" dropbox select "Include Files", and click the "New
52Directory Icon" and add the [SDLROOT]\\include directory (e.g. If you
53installed to c:\\SDL\\ add c:\\SDL\\include). Proceed to change the
54dropbox selection to "Library Files" and add [SDLROOT]\\lib.*
55
56The "include directory" I am referring to is the `./include` folder.
57
58Now we're going to use the files that we had created earlier in the *Build SDL* step.
59
60Copy the following file into your Project directory:
61
62- `SDL2.dll`
63
64Add the following files to your project (It is not necessary to copy them to your project directory):
65
66- `SDL2.lib`
67- `SDL2main.lib`
68
69To add them to your project, right click on your project, and select
70`Add files to project`.
71
72**Instead of adding the files to your project, it is more desirable to add them to the linker options: Project|Properties|Linker|Command Line
73and type the names of the libraries to link with in the "Additional Options:" box. Note: This must be done for each build configuration
74(e.g. Release,Debug).**
75
76### Hello SDL2
77
78Here's a sample SDL snippet to verify everything is setup in your IDE:
79
80```
81 #include "SDL.h"
82
83 int main( int argc, char* argv[] )
84 {
85 const int WIDTH = 640;
86 const int HEIGHT = 480;
87 SDL_Window* window = NULL;
88 SDL_Renderer* renderer = NULL;
89
90 SDL_Init(SDL_INIT_VIDEO);
91 window = SDL_CreateWindow("SDL2 Test", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, WIDTH, HEIGHT, SDL_WINDOW_SHOWN);
92 renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
93
94 SDL_DestroyRenderer(renderer);
95 SDL_DestroyWindow(window);
96 SDL_Quit();
97 return 0;
98 }
99 ```
100
101### That's it!
102
103I hope that this document has helped you get through the most difficult part of using the SDL: installing it.
104Suggestions for improvements should be posted to the [Github Issues](https://github.com/libsdl-org/SDL/issues).
105
106### Credits
107
108Thanks to [Paulus Esterhazy](mailto:pesterhazy@gmx.net), for the work on VC++ port.
109
110This document was originally called "VisualC.txt", and was written by [Sam Lantinga](mailto:slouken@libsdl.org).
111
112Later, it was converted to HTML and expanded into the document that you see today by [Lion Kimbro](mailto:snowlion@sprynet.com).
113
114Minor Fixes and Visual C++ 7 Information (In Green) was added by [James Turk](mailto:james@conceptofzero.net)
diff --git a/src/contrib/SDL-2.30.2/docs/README-vita.md b/src/contrib/SDL-2.30.2/docs/README-vita.md
new file mode 100644
index 0000000..3dbaf1c
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-vita.md
@@ -0,0 +1,33 @@
1PS Vita
2=======
3SDL port for the Sony Playstation Vita and Sony Playstation TV
4
5Credit to
6* xerpi, cpasjuste and rsn8887 for initial (vita2d) port
7* vitasdk/dolcesdk devs
8* CBPS discord (Namely Graphene and SonicMastr)
9
10Building
11--------
12To build for the PSVita, make sure you have vitasdk and cmake installed and run:
13```
14 cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake -DCMAKE_BUILD_TYPE=Release
15 cmake --build build
16 cmake --install build
17```
18
19
20Notes
21-----
22* gles1/gles2 support and renderers are disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PVR=ON`
23 These renderers support 720p and 1080i resolutions. These can be specified with:
24 `SDL_setenv("VITA_RESOLUTION", "720", 1);` and `SDL_setenv("VITA_RESOLUTION", "1080", 1);`
25* Desktop GL 1.X and 2.X support and renderers are also disabled by default and also can be enabled with `-DVIDEO_VITA_PVR=ON` as long as gl4es4vita is present in your SDK.
26 They support the same resolutions as the gles1/gles2 backends and require specifying `SDL_setenv("VITA_PVR_OGL", "1", 1);`
27 anytime before video subsystem initialization.
28* gles2 support via PIB is disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PIB=ON`
29* By default SDL emits mouse events for touch events on every touchscreen.
30 Vita has two touchscreens, so it's recommended to use `SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");` and handle touch events instead.
31 Individual touchscreens can be disabled with:
32 `SDL_setenv("VITA_DISABLE_TOUCH_FRONT", "1", 1);` and `SDL_setenv("VITA_DISABLE_TOUCH_BACK", "1", 1);`
33* Support for L2/R2/R3/R3 buttons, haptic feedback and gamepad led only available on PSTV, or when using external ds4 gamepad on vita.
diff --git a/src/contrib/SDL-2.30.2/docs/README-wince.md b/src/contrib/SDL-2.30.2/docs/README-wince.md
new file mode 100644
index 0000000..d5fb64f
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-wince.md
@@ -0,0 +1,10 @@
1WinCE
2=====
3
4Windows CE is no longer supported by SDL.
5
6We have left the CE support in SDL 1.2 for those that must have it, and we
7have support for Windows Phone 8 and WinRT in SDL2, as of SDL 2.0.3.
8
9--ryan.
10
diff --git a/src/contrib/SDL-2.30.2/docs/README-windows.md b/src/contrib/SDL-2.30.2/docs/README-windows.md
new file mode 100644
index 0000000..cd29c1f
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-windows.md
@@ -0,0 +1,58 @@
1# Windows
2
3## LLVM and Intel C++ compiler support
4
5SDL will build with the Visual Studio project files with LLVM-based compilers, such as the Intel oneAPI C++
6compiler, but you'll have to manually add the "-msse3" command line option
7to at least the SDL_audiocvt.c source file, and possibly others. This may
8not be necessary if you build SDL with CMake instead of the included Visual
9Studio solution.
10
11Details are here: https://github.com/libsdl-org/SDL/issues/5186
12
13
14## OpenGL ES 2.x support
15
16SDL has support for OpenGL ES 2.x under Windows via two alternative
17implementations.
18
19The most straightforward method consists in running your app in a system with
20a graphic card paired with a relatively recent (as of November of 2013) driver
21which supports the WGL_EXT_create_context_es2_profile extension. Vendors known
22to ship said extension on Windows currently include nVidia and Intel.
23
24The other method involves using the
25[ANGLE library](https://code.google.com/p/angleproject/). If an OpenGL ES 2.x
26context is requested and no WGL_EXT_create_context_es2_profile extension is
27found, SDL will try to load the libEGL.dll library provided by ANGLE.
28
29To obtain the ANGLE binaries, you can either compile from source from
30https://chromium.googlesource.com/angle/angle or copy the relevant binaries
31from a recent Chrome/Chromium install for Windows. The files you need are:
32
33- libEGL.dll
34- libGLESv2.dll
35- d3dcompiler_46.dll (supports Windows Vista or later, better shader
36 compiler) *or* d3dcompiler_43.dll (supports Windows XP or later)
37
38If you compile ANGLE from source, you can configure it so it does not need the
39d3dcompiler_* DLL at all (for details on this, see their documentation).
40However, by default SDL will try to preload the d3dcompiler_46.dll to
41comply with ANGLE's requirements. If you wish SDL to preload
42d3dcompiler_43.dll (to support Windows XP) or to skip this step at all, you
43can use the SDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more
44details).
45
46Known Bugs:
47
48- SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears
49 that there's a bug in the library which prevents the window contents from
50 refreshing if this is set to anything other than the default value.
51
52## Vulkan Surface Support
53
54Support for creating Vulkan surfaces is configured on by default. To disable
55it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You
56must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to
57use Vulkan graphics in your application.
58
diff --git a/src/contrib/SDL-2.30.2/docs/README-winrt.md b/src/contrib/SDL-2.30.2/docs/README-winrt.md
new file mode 100644
index 0000000..f4a9117
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README-winrt.md
@@ -0,0 +1,519 @@
1WinRT
2=====
3
4This port allows SDL applications to run on Microsoft's platforms that require
5use of "Windows Runtime", aka. "WinRT", APIs. Microsoft may, in some cases,
6refer to them as either "Windows Store", or for Windows 10, "UWP" apps.
7
8In the past, SDL has supported Windows RT 8.x, Windows Phone, etc, but in
9modern times this port is focused on UWP apps, which run on Windows 10,
10and modern Xbox consoles.
11
12
13Requirements
14------------
15
16* Microsoft Visual C++ (aka Visual Studio) 2019.
17 - Free, "Community" or "Express" editions may be used, so long as they
18 include support for either "Windows Store" or "Windows Phone" apps.
19 "Express" versions marked as supporting "Windows Desktop" development
20 typically do not include support for creating WinRT apps, to note.
21 (The "Community" editions of Visual C++ do, however, support both
22 desktop/Win32 and WinRT development).
23* A valid Microsoft account - This requirement is not imposed by SDL, but
24 rather by Microsoft's Visual C++ toolchain. This is required to launch or
25 debug apps.
26
27
28Status
29------
30
31Here is a rough list of what works, and what doesn't:
32
33* What works:
34 * compilation via Visual C++ 2019.
35 * compile-time platform detection for SDL programs. The C/C++ #define,
36 `__WINRT__`, will be set to 1 (by SDL) when compiling for WinRT.
37 * GPU-accelerated 2D rendering, via SDL_Renderer.
38 * OpenGL ES 2, via the ANGLE library (included separately from SDL)
39 * software rendering, via either SDL_Surface (optionally in conjunction with
40 SDL_GetWindowSurface() and SDL_UpdateWindowSurface()) or via the
41 SDL_Renderer APIs
42 * threads
43 * timers (via SDL_GetTicks(), SDL_AddTimer(), SDL_GetPerformanceCounter(),
44 SDL_GetPerformanceFrequency(), etc.)
45 * file I/O via SDL_RWops
46 * mouse input (unsupported on Windows Phone)
47 * audio, via SDL's WASAPI backend (if you want to record, your app must
48 have "Microphone" capabilities enabled in its manifest, and the user must
49 not have blocked access. Otherwise, capture devices will fail to work,
50 presenting as a device disconnect shortly after opening it.)
51 * .DLL file loading. Libraries *MUST* be packaged inside applications. Loading
52 anything outside of the app is not supported.
53 * system path retrieval via SDL's filesystem APIs
54 * game controllers. Support is provided via the SDL_Joystick and
55 SDL_GameController APIs, and is backed by Microsoft's XInput API. Please
56 note, however, that Windows limits game-controller support in UWP apps to,
57 "Xbox compatible controllers" (many controllers that work in Win32 apps,
58 do not work in UWP, due to restrictions in UWP itself.)
59 * multi-touch input
60 * app events. SDL_APP_WILLENTER* and SDL_APP_DIDENTER* events get sent out as
61 appropriate.
62 * window events
63 * using Direct3D 11.x APIs outside of SDL. Non-XAML / Direct3D-only apps can
64 choose to render content directly via Direct3D, using SDL to manage the
65 internal WinRT window, as well as input and audio. (Use
66 SDL_GetWindowWMInfo() to get the WinRT 'CoreWindow', and pass it into
67 IDXGIFactory2::CreateSwapChainForCoreWindow() as appropriate.)
68
69* What partially works:
70 * keyboard input. Most of WinRT's documented virtual keys are supported, as
71 well as many keys with documented hardware scancodes. Converting
72 SDL_Scancodes to or from SDL_Keycodes may not work, due to missing APIs
73 (MapVirtualKey()) in Microsoft's Windows Store / UWP APIs.
74 * SDLmain. WinRT uses a different signature for each app's main() function.
75 SDL-based apps that use this port must compile in SDL_winrt_main_NonXAML.cpp
76 (in `SDL\src\main\winrt\`) directly in order for their C-style main()
77 functions to be called.
78
79* What doesn't work:
80 * compilation with anything other than Visual C++
81 * programmatically-created custom cursors. These don't appear to be supported
82 by WinRT. Different OS-provided cursors can, however, be created via
83 SDL_CreateSystemCursor() (unsupported on Windows Phone)
84 * SDL_WarpMouseInWindow() or SDL_WarpMouseGlobal(). This are not currently
85 supported by WinRT itself.
86 * joysticks and game controllers that either are not supported by
87 Microsoft's XInput API, or are not supported within UWP apps (many
88 controllers that work in Win32, do not work in UWP, due to restrictions in
89 UWP itself).
90 * turning off VSync when rendering on Windows Phone. Attempts to turn VSync
91 off on Windows Phone result either in Direct3D not drawing anything, or it
92 forcing VSync back on. As such, SDL_RENDERER_PRESENTVSYNC will always get
93 turned-on on Windows Phone. This limitation is not present in non-Phone
94 WinRT (such as Windows 8.x), where turning off VSync appears to work.
95 * probably anything else that's not listed as supported
96
97
98
99Upgrade Notes
100-------------
101
102#### SDL_GetPrefPath() usage when upgrading WinRT apps from SDL 2.0.3
103
104SDL 2.0.4 fixes two bugs found in the WinRT version of SDL_GetPrefPath().
105The fixes may affect older, SDL 2.0.3-based apps' save data. Please note
106that these changes only apply to SDL-based WinRT apps, and not to apps for
107any other platform.
108
1091. SDL_GetPrefPath() would return an invalid path, one in which the path's
110 directory had not been created. Attempts to create files there
111 (via fopen(), for example), would fail, unless that directory was
112 explicitly created beforehand.
113
1142. SDL_GetPrefPath(), for non-WinPhone-based apps, would return a path inside
115 a WinRT 'Roaming' folder, the contents of which get automatically
116 synchronized across multiple devices. This process can occur while an
117 application runs, and can cause existing save-data to be overwritten
118 at unexpected times, with data from other devices. (Windows Phone apps
119 written with SDL 2.0.3 did not utilize a Roaming folder, due to API
120 restrictions in Windows Phone 8.0).
121
122
123SDL_GetPrefPath(), starting with SDL 2.0.4, addresses these by:
124
1251. making sure that SDL_GetPrefPath() returns a directory in which data
126 can be written to immediately, without first needing to create directories.
127
1282. basing SDL_GetPrefPath() off of a different, non-Roaming folder, the
129 contents of which do not automatically get synchronized across devices
130 (and which require less work to use safely, in terms of data integrity).
131
132Apps that wish to get their Roaming folder's path can do so either by using
133SDL_WinRTGetFSPathUTF8(), SDL_WinRTGetFSPathUNICODE() (which returns a
134UCS-2/wide-char string), or directly through the WinRT class,
135Windows.Storage.ApplicationData.
136
137
138
139Setup, High-Level Steps
140-----------------------
141
142The steps for setting up a project for an SDL/WinRT app looks like the
143following, at a high-level:
144
1451. create a new Visual C++ project using Microsoft's template for a,
146 "Direct3D App".
1472. remove most of the files from the project.
1483. make your app's project directly reference SDL/WinRT's own Visual C++
149 project file, via use of Visual C++'s "References" dialog. This will setup
150 the linker, and will copy SDL's .dll files to your app's final output.
1514. adjust your app's build settings, at minimum, telling it where to find SDL's
152 header files.
1535. add files that contains a WinRT-appropriate main function, along with some
154 data to make sure mouse-cursor-hiding (via SDL_ShowCursor(SDL_DISABLE) calls)
155 work properly.
1566. add SDL-specific app code.
1577. build and run your app.
158
159
160Setup, Detailed Steps
161---------------------
162
163### 1. Create a new project ###
164
165Create a new project using one of Visual C++'s templates for a plain, non-XAML,
166"Direct3D App" (XAML support for SDL/WinRT is not yet ready for use). If you
167don't see one of these templates, in Visual C++'s 'New Project' dialog, try
168using the textbox titled, 'Search Installed Templates' to look for one.
169
170
171### 2. Remove unneeded files from the project ###
172
173In the new project, delete any file that has one of the following extensions:
174
175- .cpp
176- .h
177- .hlsl
178
179When you are done, you should be left with a few files, each of which will be a
180necessary part of your app's project. These files will consist of:
181
182- an .appxmanifest file, which contains metadata on your WinRT app. This is
183 similar to an Info.plist file on iOS, or an AndroidManifest.xml on Android.
184- a few .png files, one of which is a splash screen (displayed when your app
185 launches), others are app icons.
186- a .pfx file, used for code signing purposes.
187
188
189### 3. Add references to SDL's project files ###
190
191SDL/WinRT can be built in multiple variations, spanning across three different
192CPU architectures (x86, x64, and ARM) and two different configurations
193(Debug and Release). WinRT and Visual C++ do not currently provide a means
194for combining multiple variations of one library into a single file.
195Furthermore, it does not provide an easy means for copying pre-built .dll files
196into your app's final output (via Post-Build steps, for example). It does,
197however, provide a system whereby an app can reference the MSVC projects of
198libraries such that, when the app is built:
199
2001. each library gets built for the appropriate CPU architecture(s) and WinRT
201 platform(s).
2022. each library's output, such as .dll files, get copied to the app's build
203 output.
204
205To set this up for SDL/WinRT, you'll need to run through the following steps:
206
2071. open up the Solution Explorer inside Visual C++ (under the "View" menu, then
208 "Solution Explorer")
2092. right click on your app's solution.
2103. navigate to "Add", then to "Existing Project..."
2114. find SDL/WinRT's Visual C++ project file and open it, in the `VisualC-WinRT`
212 directory.
2135. once the project has been added, right-click on your app's project and
214 select, "References..."
2156. click on the button titled, "Add New Reference..."
2167. check the box next to SDL
2178. click OK to close the dialog
2189. SDL will now show up in the list of references. Click OK to close that
219 dialog.
220
221Your project is now linked to SDL's project, insofar that when the app is
222built, SDL will be built as well, with its build output getting included with
223your app.
224
225
226### 4. Adjust Your App's Build Settings ###
227
228Some build settings need to be changed in your app's project. This guide will
229outline the following:
230
231- making sure that the compiler knows where to find SDL's header files
232- **Optional for C++, but NECESSARY for compiling C code:** telling the
233 compiler not to use Microsoft's C++ extensions for WinRT development.
234- **Optional:** telling the compiler not generate errors due to missing
235 precompiled header files.
236
237To change these settings:
238
2391. right-click on the project
2402. choose "Properties"
2413. in the drop-down box next to "Configuration", choose, "All Configurations"
2424. in the drop-down box next to "Platform", choose, "All Platforms"
2435. in the left-hand list, expand the "C/C++" section
2446. select "General"
2457. edit the "Additional Include Directories" setting, and add a path to SDL's
246 "include" directory
2478. **Optional: to enable compilation of C code:** change the setting for
248 "Consume Windows Runtime Extension" from "Yes (/ZW)" to "No". If you're
249 working with a completely C++ based project, this step can usually be
250 omitted.
2519. **Optional: to disable precompiled headers (which can produce
252 'stdafx.h'-related build errors, if setup incorrectly:** in the left-hand
253 list, select "Precompiled Headers", then change the setting for "Precompiled
254 Header" from "Use (/Yu)" to "Not Using Precompiled Headers".
25510. close the dialog, saving settings, by clicking the "OK" button
256
257
258### 5. Add a WinRT-appropriate main function, and a blank-cursor image, to the app. ###
259
260A few files should be included directly in your app's MSVC project, specifically:
2611. a WinRT-appropriate main function (which is different than main() functions on
262 other platforms)
2632. a Win32-style cursor resource, used by SDL_ShowCursor() to hide the mouse cursor
264 (if and when the app needs to do so). *If this cursor resource is not
265 included, mouse-position reporting may fail if and when the cursor is
266 hidden, due to possible bugs/design-oddities in Windows itself.*
267
268To include these files for C/C++ projects:
269
2701. right-click on your project (again, in Visual C++'s Solution Explorer),
271 navigate to "Add", then choose "Existing Item...".
2722. navigate to the directory containing SDL's source code, then into its
273 subdirectory, 'src/main/winrt/'. Select, then add, the following files:
274 - `SDL_winrt_main_NonXAML.cpp`
275 - `SDL2-WinRTResources.rc`
276 - `SDL2-WinRTResource_BlankCursor.cur`
2773. right-click on the file `SDL_winrt_main_NonXAML.cpp` (as listed in your
278 project), then click on "Properties...".
2794. in the drop-down box next to "Configuration", choose, "All Configurations"
2805. in the drop-down box next to "Platform", choose, "All Platforms"
2816. in the left-hand list, click on "C/C++"
2827. change the setting for "Consume Windows Runtime Extension" to "Yes (/ZW)".
2838. click the OK button. This will close the dialog.
284
285**NOTE: C++/CX compilation is currently required in at least one file of your
286app's project. This is to make sure that Visual C++'s linker builds a 'Windows
287Metadata' file (.winmd) for your app. Not doing so can lead to build errors.**
288
289For non-C++ projects, you will need to call SDL_WinRTRunApp from your language's
290main function, and generate SDL2-WinRTResources.res manually by using `rc` via
291the Developer Command Prompt and including it as a <Win32Resource> within the
292first <PropertyGroup> block in your Visual Studio project file.
293
294### 6. Add app code and assets ###
295
296At this point, you can add in SDL-specific source code. Be sure to include a
297C-style main function (ie: `int main(int argc, char *argv[])`). From there you
298should be able to create a single `SDL_Window` (WinRT apps can only have one
299window, at present), as well as an `SDL_Renderer`. Direct3D will be used to
300draw content. Events are received via SDL's usual event functions
301(`SDL_PollEvent`, etc.) If you have a set of existing source files and assets,
302you can start adding them to the project now. If not, or if you would like to
303make sure that you're setup correctly, some short and simple sample code is
304provided below.
305
306
307#### 6.A. ... when creating a new app ####
308
309If you are creating a new app (rather than porting an existing SDL-based app),
310or if you would just like a simple app to test SDL/WinRT with before trying to
311get existing code working, some working SDL/WinRT code is provided below. To
312set this up:
313
3141. right click on your app's project
3152. select Add, then New Item. An "Add New Item" dialog will show up.
3163. from the left-hand list, choose "Visual C++"
3174. from the middle/main list, choose "C++ File (.cpp)"
3185. near the bottom of the dialog, next to "Name:", type in a name for your
319source file, such as, "main.cpp".
3206. click on the Add button. This will close the dialog, add the new file to
321your project, and open the file in Visual C++'s text editor.
3227. Copy and paste the following code into the new file, then save it.
323
324```c
325#include <SDL.h>
326
327int main(int argc, char **argv)
328{
329 SDL_DisplayMode mode;
330 SDL_Window * window = NULL;
331 SDL_Renderer * renderer = NULL;
332 SDL_Event evt;
333 SDL_bool keep_going = SDL_TRUE;
334
335 if (SDL_Init(SDL_INIT_VIDEO) != 0) {
336 return 1;
337 } else if (SDL_GetCurrentDisplayMode(0, &mode) != 0) {
338 return 1;
339 } else if (SDL_CreateWindowAndRenderer(mode.w, mode.h, SDL_WINDOW_FULLSCREEN, &window, &renderer) != 0) {
340 return 1;
341 }
342
343 while (keep_going) {
344 while (SDL_PollEvent(&evt)) {
345 if ((evt.type == SDL_KEYDOWN) && (evt.key.keysym.sym == SDLK_ESCAPE)) {
346 keep_going = SDL_FALSE;
347 }
348 }
349
350 SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255);
351 SDL_RenderClear(renderer);
352 SDL_RenderPresent(renderer);
353 }
354
355 SDL_Quit();
356 return 0;
357}
358```
359
360#### 6.B. Adding code and assets ####
361
362If you have existing code and assets that you'd like to add, you should be able
363to add them now. The process for adding a set of files is as such.
364
3651. right click on the app's project
3662. select Add, then click on "New Item..."
3673. open any source, header, or asset files as appropriate. Support for C and
368C++ is available.
369
370Do note that WinRT only supports a subset of the APIs that are available to
371Win32-based apps. Many portions of the Win32 API and the C runtime are not
372available.
373
374A list of unsupported C APIs can be found at
375<http://msdn.microsoft.com/en-us/library/windows/apps/jj606124.aspx>
376
377General information on using the C runtime in WinRT can be found at
378<https://msdn.microsoft.com/en-us/library/hh972425.aspx>
379
380A list of supported Win32 APIs for WinRT apps can be found at
381<http://msdn.microsoft.com/en-us/library/windows/apps/br205757.aspx>. To note,
382the list of supported Win32 APIs for Windows Phone 8.0 is different.
383That list can be found at
384<http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj662956(v=vs.105).aspx>
385
386
387### 7. Build and run your app ###
388
389Your app project should now be setup, and you should be ready to build your app.
390To run it on the local machine, open the Debug menu and choose "Start
391Debugging". This will build your app, then run your app full-screen. To switch
392out of your app, press the Windows key. Alternatively, you can choose to run
393your app in a window. To do this, before building and running your app, find
394the drop-down menu in Visual C++'s toolbar that says, "Local Machine". Expand
395this by clicking on the arrow on the right side of the list, then click on
396Simulator. Once you do that, any time you build and run the app, the app will
397launch in window, rather than full-screen.
398
399
400#### 7.A. Running apps on older, ARM-based, "Windows RT" devices ####
401
402**These instructions do not include Windows Phone, despite Windows Phone
403typically running on ARM processors.** They are specifically for devices
404that use the "Windows RT" operating system, which was a modified version of
405Windows 8.x that ran primarily on ARM-based tablet computers.
406
407To build and run the app on ARM-based, "Windows RT" devices, you'll need to:
408
409- install Microsoft's "Remote Debugger" on the device. Visual C++ installs and
410 debugs ARM-based apps via IP networks.
411- change a few options on the development machine, both to make sure it builds
412 for ARM (rather than x86 or x64), and to make sure it knows how to find the
413 Windows RT device (on the network).
414
415Microsoft's Remote Debugger can be found at
416<https://msdn.microsoft.com/en-us/library/hh441469.aspx>. Please note
417that separate versions of this debugger exist for different versions of Visual
418C++, one each for MSVC 2015, 2013, and 2012.
419
420To setup Visual C++ to launch your app on an ARM device:
421
4221. make sure the Remote Debugger is running on your ARM device, and that it's on
423 the same IP network as your development machine.
4242. from Visual C++'s toolbar, find a drop-down menu that says, "Win32". Click
425 it, then change the value to "ARM".
4263. make sure Visual C++ knows the hostname or IP address of the ARM device. To
427 do this:
428 1. open the app project's properties
429 2. select "Debugging"
430 3. next to "Machine Name", enter the hostname or IP address of the ARM
431 device
432 4. if, and only if, you've turned off authentication in the Remote Debugger,
433 then change the setting for "Require Authentication" to No
434 5. click "OK"
4354. build and run the app (from Visual C++). The first time you do this, a
436 prompt will show up on the ARM device, asking for a Microsoft Account. You
437 do, unfortunately, need to log in here, and will need to follow the
438 subsequent registration steps in order to launch the app. After you do so,
439 if the app didn't already launch, try relaunching it again from within Visual
440 C++.
441
442
443Troubleshooting
444---------------
445
446#### Build fails with message, "error LNK2038: mismatch detected for 'vccorlib_lib_should_be_specified_before_msvcrt_lib_to_linker'"
447
448Try adding the following to your linker flags. In MSVC, this can be done by
449right-clicking on the app project, navigating to Configuration Properties ->
450Linker -> Command Line, then adding them to the Additional Options
451section.
452
453* For Release builds / MSVC-Configurations, add:
454
455 /nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib
456
457* For Debug builds / MSVC-Configurations, add:
458
459 /nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib
460
461
462#### Mouse-motion events fail to get sent, or SDL_GetMouseState() fails to return updated values
463
464This may be caused by a bug in Windows itself, whereby hiding the mouse
465cursor can cause mouse-position reporting to fail.
466
467SDL provides a workaround for this, but it requires that an app links to a
468set of Win32-style cursor image-resource files. A copy of suitable resource
469files can be found in `src/main/winrt/`. Adding them to an app's Visual C++
470project file should be sufficient to get the app to use them.
471
472
473#### SDL's Visual Studio project file fails to open, with message, "The system can't find the file specified."
474
475This can be caused for any one of a few reasons, which Visual Studio can
476report, but won't always do so in an up-front manner.
477
478To help determine why this error comes up:
479
4801. open a copy of Visual Studio without opening a project file. This can be
481 accomplished via Windows' Start Menu, among other means.
4822. show Visual Studio's Output window. This can be done by going to VS'
483 menu bar, then to View, and then to Output.
4843. try opening the SDL project file directly by going to VS' menu bar, then
485 to File, then to Open, then to Project/Solution. When a File-Open dialog
486 appears, open the SDL project (such as the one in SDL's source code, in its
487 directory, VisualC-WinRT/UWP_VS2015/).
4884. after attempting to open SDL's Visual Studio project file, additional error
489 information will be output to the Output window.
490
491If Visual Studio reports (via its Output window) that the project:
492
493"could not be loaded because it's missing install components. To fix this launch Visual Studio setup with the following selections:
494Microsoft.VisualStudio.ComponentGroup.UWP.VC"
495
496... then you will need to re-launch Visual Studio's installer, and make sure that
497the workflow for "Universal Windows Platform development" is checked, and that its
498optional component, "C++ Universal Windows Platform tools" is also checked. While
499you are there, if you are planning on targeting UWP / Windows 10, also make sure
500that you check the optional component, "Windows 10 SDK (10.0.10240.0)". After
501making sure these items are checked as-appropriate, install them.
502
503Once you install these components, try re-launching Visual Studio, and re-opening
504the SDL project file. If you still get the error dialog, try using the Output
505window, again, seeing what Visual Studio says about it.
506
507
508#### Game controllers / joysticks aren't working!
509
510Windows only permits certain game controllers and joysticks to work within
511WinRT / UWP apps. Even if a game controller or joystick works in a Win32
512app, that device is not guaranteed to work inside a WinRT / UWP app.
513
514According to Microsoft, "Xbox compatible controllers" should work inside
515UWP apps, potentially with more working in the future. This includes, but
516may not be limited to, Microsoft-made Xbox controllers and USB adapters.
517(Source: https://social.msdn.microsoft.com/Forums/en-US/9064838b-e8c3-4c18-8a83-19bf0dfe150d/xinput-fails-to-detect-game-controllers?forum=wpdevelop)
518
519
diff --git a/src/contrib/SDL-2.30.2/docs/README.md b/src/contrib/SDL-2.30.2/docs/README.md
new file mode 100644
index 0000000..6813f75
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/README.md
@@ -0,0 +1,63 @@
1# Simple DirectMedia Layer
2
3https://www.libsdl.org/
4
5Simple DirectMedia Layer is a cross-platform development library designed
6to provide low level access to audio, keyboard, mouse, joystick, and graphics
7hardware via OpenGL and Direct3D. It is used by video playback software,
8emulators, and popular games including Valve's award winning catalog
9and many Humble Bundle games.
10
11SDL officially supports Windows, macOS, Linux, iOS, and Android.
12Support for other platforms may be found in the source code.
13
14SDL is written in C, works natively with C++, and there are bindings
15available for several other languages, including C# and Python.
16
17This library is distributed under the zlib license, which can be found
18in the file "LICENSE.txt".
19
20The best way to learn how to use SDL is to check out the header files in
21the "include" subdirectory and the programs in the "test" subdirectory.
22The header files and test programs are well commented and always up to date.
23
24More documentation and FAQs are available online at [the wiki](http://wiki.libsdl.org/)
25
26- [Android](README-android.md)
27- [CMake](README-cmake.md)
28- [DirectFB](README-directfb.md)
29- [DynAPI](README-dynapi.md)
30- [Emscripten](README-emscripten.md)
31- [GDK](README-gdk.md)
32- [Gesture](README-gesture.md)
33- [Git](README-git.md)
34- [iOS](README-ios.md)
35- [Linux](README-linux.md)
36- [macOS](README-macos.md)
37- [OS/2](README-os2.md)
38- [Native Client](README-nacl.md)
39- [Pandora](README-pandora.md)
40- [Supported Platforms](README-platforms.md)
41- [Porting information](README-porting.md)
42- [PSP](README-psp.md)
43- [PS2](README-ps2.md)
44- [Raspberry Pi](README-raspberrypi.md)
45- [Touch](README-touch.md)
46- [Versions](README-versions.md)
47- [WinCE](README-wince.md)
48- [Windows](README-windows.md)
49- [WinRT](README-winrt.md)
50- [PSVita](README-vita.md)
51- [Nokia N-Gage](README-ngage.md)
52
53If you need help with the library, or just want to discuss SDL related
54issues, you can join the [SDL Discourse](https://discourse.libsdl.org/),
55which can be used as a web forum or a mailing list, at your preference.
56
57If you want to report bugs or contribute patches, please submit them to
58[our bug tracker](https://github.com/libsdl-org/SDL/issues)
59
60Enjoy!
61
62
63Sam Lantinga <mailto:slouken@libsdl.org>
diff --git a/src/contrib/SDL-2.30.2/docs/doxyfile b/src/contrib/SDL-2.30.2/docs/doxyfile
new file mode 100644
index 0000000..7b80a3a
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/doxyfile
@@ -0,0 +1,1561 @@
1# Doxyfile 1.5.9
2
3# This file describes the settings to be used by the documentation system
4# doxygen (www.doxygen.org) for a project
5#
6# All text after a hash (#) is considered a comment and will be ignored
7# The format is:
8# TAG = value [value, ...]
9# For lists items can also be appended using:
10# TAG += value [value, ...]
11# Values that contain spaces should be placed between quotes (" ")
12
13#---------------------------------------------------------------------------
14# Project related configuration options
15#---------------------------------------------------------------------------
16
17# This tag specifies the encoding used for all characters in the config file
18# that follow. The default is UTF-8 which is also the encoding used for all
19# text before the first occurrence of this tag. Doxygen uses libiconv (or the
20# iconv built into libc) for the transcoding. See
21# http://www.gnu.org/software/libiconv for the list of possible encodings.
22
23DOXYFILE_ENCODING = UTF-8
24
25# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
26# by quotes) that should identify the project.
27
28PROJECT_NAME = SDL
29
30# The PROJECT_NUMBER tag can be used to enter a project or revision number.
31# This could be handy for archiving the generated documentation or
32# if some version control system is used.
33
34PROJECT_NUMBER = 2.0
35
36# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
37# base path where the generated documentation will be put.
38# If a relative path is entered, it will be relative to the location
39# where doxygen was started. If left blank the current directory will be used.
40
41OUTPUT_DIRECTORY = ./output
42
43# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
44# 4096 sub-directories (in 2 levels) under the output directory of each output
45# format and will distribute the generated files over these directories.
46# Enabling this option can be useful when feeding doxygen a huge amount of
47# source files, where putting all generated files in the same directory would
48# otherwise cause performance problems for the file system.
49
50CREATE_SUBDIRS = YES
51
52# The OUTPUT_LANGUAGE tag is used to specify the language in which all
53# documentation generated by doxygen is written. Doxygen will use this
54# information to generate all constant output in the proper language.
55# The default language is English, other supported languages are:
56# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
57# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
58# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
59# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
60# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
61# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
62
63OUTPUT_LANGUAGE = English
64
65# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
66# include brief member descriptions after the members that are listed in
67# the file and class documentation (similar to JavaDoc).
68# Set to NO to disable this.
69
70BRIEF_MEMBER_DESC = YES
71
72# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
73# the brief description of a member or function before the detailed description.
74# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
75# brief descriptions will be completely suppressed.
76
77REPEAT_BRIEF = YES
78
79# This tag implements a quasi-intelligent brief description abbreviator
80# that is used to form the text in various listings. Each string
81# in this list, if found as the leading text of the brief description, will be
82# stripped from the text and the result after processing the whole list, is
83# used as the annotated text. Otherwise, the brief description is used as-is.
84# If left blank, the following values are used ("$name" is automatically
85# replaced with the name of the entity): "The $name class" "The $name widget"
86# "The $name file" "is" "provides" "specifies" "contains"
87# "represents" "a" "an" "the"
88
89ABBREVIATE_BRIEF = "The $name class" \
90 "The $name widget" \
91 "The $name file" \
92 is \
93 provides \
94 specifies \
95 contains \
96 represents \
97 a \
98 an \
99 the
100
101# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
102# Doxygen will generate a detailed section even if there is only a brief
103# description.
104
105ALWAYS_DETAILED_SEC = YES
106
107# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
108# inherited members of a class in the documentation of that class as if those
109# members were ordinary class members. Constructors, destructors and assignment
110# operators of the base classes will not be shown.
111
112INLINE_INHERITED_MEMB = NO
113
114# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
115# path before files name in the file list and in the header files. If set
116# to NO the shortest path that makes the file name unique will be used.
117
118FULL_PATH_NAMES = YES
119
120# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
121# can be used to strip a user-defined part of the path. Stripping is
122# only done if one of the specified strings matches the left-hand part of
123# the path. The tag can be used to show relative paths in the file list.
124# If left blank the directory from which doxygen is run is used as the
125# path to strip.
126
127STRIP_FROM_PATH =
128
129# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
130# the path mentioned in the documentation of a class, which tells
131# the reader which header file to include in order to use a class.
132# If left blank only the name of the header file containing the class
133# definition is used. Otherwise one should specify the include paths that
134# are normally passed to the compiler using the -I flag.
135
136STRIP_FROM_INC_PATH =
137
138# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
139# (but less readable) file names. This can be useful is your file systems
140# doesn't support long names like on DOS, Mac, or CD-ROM.
141
142SHORT_NAMES = NO
143
144# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
145# will interpret the first line (until the first dot) of a JavaDoc-style
146# comment as the brief description. If set to NO, the JavaDoc
147# comments will behave just like regular Qt-style comments
148# (thus requiring an explicit @brief command for a brief description.)
149
150JAVADOC_AUTOBRIEF = NO
151
152# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
153# interpret the first line (until the first dot) of a Qt-style
154# comment as the brief description. If set to NO, the comments
155# will behave just like regular Qt-style comments (thus requiring
156# an explicit \brief command for a brief description.)
157
158QT_AUTOBRIEF = NO
159
160# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
161# treat a multi-line C++ special comment block (i.e. a block of //! or ///
162# comments) as a brief description. This used to be the default behaviour.
163# The new default is to treat a multi-line C++ comment block as a detailed
164# description. Set this tag to YES if you prefer the old behaviour instead.
165
166MULTILINE_CPP_IS_BRIEF = NO
167
168# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
169# member inherits the documentation from any documented member that it
170# re-implements.
171
172INHERIT_DOCS = YES
173
174# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
175# a new page for each member. If set to NO, the documentation of a member will
176# be part of the file/class/namespace that contains it.
177
178SEPARATE_MEMBER_PAGES = NO
179
180# The TAB_SIZE tag can be used to set the number of spaces in a tab.
181# Doxygen uses this value to replace tabs by spaces in code fragments.
182
183TAB_SIZE = 8
184
185# This tag can be used to specify a number of aliases that acts
186# as commands in the documentation. An alias has the form "name=value".
187# For example adding "sideeffect=\par Side Effects:\n" will allow you to
188# put the command \sideeffect (or @sideeffect) in the documentation, which
189# will result in a user-defined paragraph with heading "Side Effects:".
190# You can put \n's in the value part of an alias to insert newlines.
191
192ALIASES = "defined=\"\def\"" \
193 "discussion=\"\par Discussion:\n\""
194
195# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
196# sources only. Doxygen will then generate output that is more tailored for C.
197# For instance, some of the names that are used will be different. The list
198# of all members will be omitted, etc.
199
200OPTIMIZE_OUTPUT_FOR_C = YES
201
202# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
203# sources only. Doxygen will then generate output that is more tailored for
204# Java. For instance, namespaces will be presented as packages, qualified
205# scopes will look different, etc.
206
207OPTIMIZE_OUTPUT_JAVA = NO
208
209# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
210# sources only. Doxygen will then generate output that is more tailored for
211# Fortran.
212
213OPTIMIZE_FOR_FORTRAN = NO
214
215# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
216# sources. Doxygen will then generate output that is tailored for
217# VHDL.
218
219OPTIMIZE_OUTPUT_VHDL = NO
220
221# Doxygen selects the parser to use depending on the extension of the files it parses.
222# With this tag you can assign which parser to use for a given extension.
223# Doxygen has a built-in mapping, but you can override or extend it using this tag.
224# The format is ext=language, where ext is a file extension, and language is one of
225# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
226# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
227# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
228# use: inc=Fortran f=C. Note that for custom extensions you also need to set
229# FILE_PATTERNS otherwise the files are not read by doxygen.
230
231EXTENSION_MAPPING =
232
233# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
234# to include (a tag file for) the STL sources as input, then you should
235# set this tag to YES in order to let doxygen match functions declarations and
236# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
237# func(std::string) {}). This also make the inheritance and collaboration
238# diagrams that involve STL classes more complete and accurate.
239
240BUILTIN_STL_SUPPORT = YES
241
242# If you use Microsoft's C++/CLI language, you should set this option to YES to
243# enable parsing support.
244
245CPP_CLI_SUPPORT = NO
246
247# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
248# Doxygen will parse them like normal C++ but will assume all classes use public
249# instead of private inheritance when no explicit protection keyword is present.
250
251SIP_SUPPORT = NO
252
253# For Microsoft's IDL there are propget and propput attributes to indicate getter
254# and setter methods for a property. Setting this option to YES (the default)
255# will make doxygen to replace the get and set methods by a property in the
256# documentation. This will only work if the methods are indeed getting or
257# setting a simple type. If this is not the case, or you want to show the
258# methods anyway, you should set this option to NO.
259
260IDL_PROPERTY_SUPPORT = YES
261
262# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
263# tag is set to YES, then doxygen will reuse the documentation of the first
264# member in the group (if any) for the other members of the group. By default
265# all members of a group must be documented explicitly.
266
267DISTRIBUTE_GROUP_DOC = NO
268
269# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
270# the same type (for instance a group of public functions) to be put as a
271# subgroup of that type (e.g. under the Public Functions section). Set it to
272# NO to prevent subgrouping. Alternatively, this can be done per class using
273# the \nosubgrouping command.
274
275SUBGROUPING = YES
276
277# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
278# is documented as struct, union, or enum with the name of the typedef. So
279# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
280# with name TypeT. When disabled the typedef will appear as a member of a file,
281# namespace, or class. And the struct will be named TypeS. This can typically
282# be useful for C code in case the coding convention dictates that all compound
283# types are typedef'ed and only the typedef is referenced, never the tag name.
284
285TYPEDEF_HIDES_STRUCT = YES
286
287# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
288# determine which symbols to keep in memory and which to flush to disk.
289# When the cache is full, less often used symbols will be written to disk.
290# For small to medium size projects (<1000 input files) the default value is
291# probably good enough. For larger projects a too small cache size can cause
292# doxygen to be busy swapping symbols to and from disk most of the time
293# causing a significant performance penality.
294# If the system has enough physical memory increasing the cache will improve the
295# performance by keeping more symbols in memory. Note that the value works on
296# a logarithmic scale so increasing the size by one will rougly double the
297# memory usage. The cache size is given by this formula:
298# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
299# corresponding to a cache size of 2^16 = 65536 symbols
300
301SYMBOL_CACHE_SIZE = 0
302
303#---------------------------------------------------------------------------
304# Build related configuration options
305#---------------------------------------------------------------------------
306
307# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
308# documentation are documented, even if no documentation was available.
309# Private class members and static file members will be hidden unless
310# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
311
312EXTRACT_ALL = YES
313
314# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
315# will be included in the documentation.
316
317EXTRACT_PRIVATE = YES
318
319# If the EXTRACT_STATIC tag is set to YES all static members of a file
320# will be included in the documentation.
321
322EXTRACT_STATIC = YES
323
324# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
325# defined locally in source files will be included in the documentation.
326# If set to NO only classes defined in header files are included.
327
328EXTRACT_LOCAL_CLASSES = YES
329
330# This flag is only useful for Objective-C code. When set to YES local
331# methods, which are defined in the implementation section but not in
332# the interface are included in the documentation.
333# If set to NO (the default) only methods in the interface are included.
334
335EXTRACT_LOCAL_METHODS = YES
336
337# If this flag is set to YES, the members of anonymous namespaces will be
338# extracted and appear in the documentation as a namespace called
339# 'anonymous_namespace{file}', where file will be replaced with the base
340# name of the file that contains the anonymous namespace. By default
341# anonymous namespace are hidden.
342
343EXTRACT_ANON_NSPACES = YES
344
345# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
346# undocumented members of documented classes, files or namespaces.
347# If set to NO (the default) these members will be included in the
348# various overviews, but no documentation section is generated.
349# This option has no effect if EXTRACT_ALL is enabled.
350
351HIDE_UNDOC_MEMBERS = NO
352
353# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
354# undocumented classes that are normally visible in the class hierarchy.
355# If set to NO (the default) these classes will be included in the various
356# overviews. This option has no effect if EXTRACT_ALL is enabled.
357
358HIDE_UNDOC_CLASSES = NO
359
360# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
361# friend (class|struct|union) declarations.
362# If set to NO (the default) these declarations will be included in the
363# documentation.
364
365HIDE_FRIEND_COMPOUNDS = NO
366
367# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
368# documentation blocks found inside the body of a function.
369# If set to NO (the default) these blocks will be appended to the
370# function's detailed documentation block.
371
372HIDE_IN_BODY_DOCS = NO
373
374# The INTERNAL_DOCS tag determines if documentation
375# that is typed after a \internal command is included. If the tag is set
376# to NO (the default) then the documentation will be excluded.
377# Set it to YES to include the internal documentation.
378
379INTERNAL_DOCS = YES
380
381# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
382# file names in lower-case letters. If set to YES upper-case letters are also
383# allowed. This is useful if you have classes or files whose names only differ
384# in case and if your file system supports case sensitive file names. Windows
385# and Mac users are advised to set this option to NO.
386
387CASE_SENSE_NAMES = NO
388
389# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
390# will show members with their full class and namespace scopes in the
391# documentation. If set to YES the scope will be hidden.
392
393HIDE_SCOPE_NAMES = NO
394
395# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
396# will put a list of the files that are included by a file in the documentation
397# of that file.
398
399SHOW_INCLUDE_FILES = YES
400
401# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
402# is inserted in the documentation for inline members.
403
404INLINE_INFO = YES
405
406# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
407# will sort the (detailed) documentation of file and class members
408# alphabetically by member name. If set to NO the members will appear in
409# declaration order.
410
411SORT_MEMBER_DOCS = YES
412
413# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
414# brief documentation of file, namespace and class members alphabetically
415# by member name. If set to NO (the default) the members will appear in
416# declaration order.
417
418SORT_BRIEF_DOCS = NO
419
420# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
421# hierarchy of group names into alphabetical order. If set to NO (the default)
422# the group names will appear in their defined order.
423
424SORT_GROUP_NAMES = NO
425
426# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
427# sorted by fully-qualified names, including namespaces. If set to
428# NO (the default), the class list will be sorted only by class name,
429# not including the namespace part.
430# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
431# Note: This option applies only to the class list, not to the
432# alphabetical list.
433
434SORT_BY_SCOPE_NAME = NO
435
436# The GENERATE_TODOLIST tag can be used to enable (YES) or
437# disable (NO) the todo list. This list is created by putting \todo
438# commands in the documentation.
439
440GENERATE_TODOLIST = YES
441
442# The GENERATE_TESTLIST tag can be used to enable (YES) or
443# disable (NO) the test list. This list is created by putting \test
444# commands in the documentation.
445
446GENERATE_TESTLIST = YES
447
448# The GENERATE_BUGLIST tag can be used to enable (YES) or
449# disable (NO) the bug list. This list is created by putting \bug
450# commands in the documentation.
451
452GENERATE_BUGLIST = YES
453
454# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
455# disable (NO) the deprecated list. This list is created by putting
456# \deprecated commands in the documentation.
457
458GENERATE_DEPRECATEDLIST= YES
459
460# The ENABLED_SECTIONS tag can be used to enable conditional
461# documentation sections, marked by \if sectionname ... \endif.
462
463ENABLED_SECTIONS =
464
465# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
466# the initial value of a variable or define consists of for it to appear in
467# the documentation. If the initializer consists of more lines than specified
468# here it will be hidden. Use a value of 0 to hide initializers completely.
469# The appearance of the initializer of individual variables and defines in the
470# documentation can be controlled using \showinitializer or \hideinitializer
471# command in the documentation regardless of this setting.
472
473MAX_INITIALIZER_LINES = 30
474
475# If the sources in your project are distributed over multiple directories
476# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
477# in the documentation. The default is NO.
478
479SHOW_DIRECTORIES = YES
480
481# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
482# This will remove the Files entry from the Quick Index and from the
483# Folder Tree View (if specified). The default is YES.
484
485SHOW_FILES = YES
486
487# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
488# Namespaces page. This will remove the Namespaces entry from the Quick Index
489# and from the Folder Tree View (if specified). The default is YES.
490
491SHOW_NAMESPACES = YES
492
493# The FILE_VERSION_FILTER tag can be used to specify a program or script that
494# doxygen should invoke to get the current version for each file (typically from
495# the version control system). Doxygen will invoke the program by executing (via
496# popen()) the command <command> <input-file>, where <command> is the value of
497# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
498# provided by doxygen. Whatever the program writes to standard output
499# is used as the file version. See the manual for examples.
500
501FILE_VERSION_FILTER =
502
503# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
504# doxygen. The layout file controls the global structure of the generated output files
505# in an output format independent way. The create the layout file that represents
506# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
507# file name after the option, if omitted DoxygenLayout.xml will be used as the name
508# of the layout file.
509
510LAYOUT_FILE =
511
512#---------------------------------------------------------------------------
513# configuration options related to warning and progress messages
514#---------------------------------------------------------------------------
515
516# The QUIET tag can be used to turn on/off the messages that are generated
517# by doxygen. Possible values are YES and NO. If left blank NO is used.
518
519QUIET = NO
520
521# The WARNINGS tag can be used to turn on/off the warning messages that are
522# generated by doxygen. Possible values are YES and NO. If left blank
523# NO is used.
524
525WARNINGS = YES
526
527# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
528# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
529# automatically be disabled.
530
531WARN_IF_UNDOCUMENTED = YES
532
533# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
534# potential errors in the documentation, such as not documenting some
535# parameters in a documented function, or documenting parameters that
536# don't exist or using markup commands wrongly.
537
538WARN_IF_DOC_ERROR = YES
539
540# This WARN_NO_PARAMDOC option can be abled to get warnings for
541# functions that are documented, but have no documentation for their parameters
542# or return value. If set to NO (the default) doxygen will only warn about
543# wrong or incomplete parameter documentation, but not about the absence of
544# documentation.
545
546WARN_NO_PARAMDOC = YES
547
548# The WARN_FORMAT tag determines the format of the warning messages that
549# doxygen can produce. The string should contain the $file, $line, and $text
550# tags, which will be replaced by the file and line number from which the
551# warning originated and the warning text. Optionally the format may contain
552# $version, which will be replaced by the version of the file (if it could
553# be obtained via FILE_VERSION_FILTER)
554
555WARN_FORMAT = "$file:$line: $text"
556
557# The WARN_LOGFILE tag can be used to specify a file to which warning
558# and error messages should be written. If left blank the output is written
559# to stderr.
560
561WARN_LOGFILE = ./doxygen_warn.txt
562
563#---------------------------------------------------------------------------
564# configuration options related to the input files
565#---------------------------------------------------------------------------
566
567# The INPUT tag can be used to specify the files and/or directories that contain
568# documented source files. You may enter file names like "myfile.cpp" or
569# directories like "/usr/src/myproject". Separate the files or directories
570# with spaces.
571
572INPUT = . ../include
573
574# This tag can be used to specify the character encoding of the source files
575# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
576# also the default input encoding. Doxygen uses libiconv (or the iconv built
577# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
578# the list of possible encodings.
579
580INPUT_ENCODING = UTF-8
581
582# If the value of the INPUT tag contains directories, you can use the
583# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
584# and *.h) to filter out the source-files in the directories. If left
585# blank the following patterns are tested:
586# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
587# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
588
589FILE_PATTERNS = *.c \
590 *.cc \
591 *.cxx \
592 *.cpp \
593 *.c++ \
594 *.d \
595 *.java \
596 *.ii \
597 *.ixx \
598 *.ipp \
599 *.i++ \
600 *.inl \
601 *.h \
602 *.hh \
603 *.hxx \
604 *.hpp \
605 *.h++ \
606 *.idl \
607 *.odl \
608 *.cs \
609 *.php \
610 *.php3 \
611 *.inc \
612 *.m \
613 *.mm \
614 *.dox \
615 *.py \
616 *.f90 \
617 *.f \
618 *.vhd \
619 *.vhdl \
620 *.h.in \
621 *.h.default \
622 *.md
623
624# The RECURSIVE tag can be used to turn specify whether or not subdirectories
625# should be searched for input files as well. Possible values are YES and NO.
626# If left blank NO is used.
627
628RECURSIVE = YES
629
630# The EXCLUDE tag can be used to specify files and/or directories that should
631# excluded from the INPUT source files. This way you can easily exclude a
632# subdirectory from a directory tree whose root is specified with the INPUT tag.
633
634EXCLUDE = ../include/SDL_opengles2_gl2ext.h \
635 ../include/SDL_opengles2_gl2platform.h \
636 ../include/SDL_opengles2_khrplatform.h \
637 ../include/SDL_opengl_glext.h \
638 ../include/SDL_opengles2_gl2.h \
639 ../include/SDL_opengles2.h \
640 ../include/SDL_opengles.h \
641 ../include/SDL_opengl.h \
642 ../include/SDL_egl.h \
643 ./release_checklist.md \
644
645
646# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
647# directories that are symbolic links (a Unix filesystem feature) are excluded
648# from the input.
649
650EXCLUDE_SYMLINKS = NO
651
652# If the value of the INPUT tag contains directories, you can use the
653# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
654# certain files from those directories. Note that the wildcards are matched
655# against the file with absolute path, so to exclude all test directories
656# for example use the pattern */test/*
657
658EXCLUDE_PATTERNS =
659
660# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
661# (namespaces, classes, functions, etc.) that should be excluded from the
662# output. The symbol name can be a fully qualified name, a word, or if the
663# wildcard * is used, a substring. Examples: ANamespace, AClass,
664# AClass::ANamespace, ANamespace::*Test
665
666EXCLUDE_SYMBOLS =
667
668# The EXAMPLE_PATH tag can be used to specify one or more files or
669# directories that contain example code fragments that are included (see
670# the \include command).
671
672EXAMPLE_PATH =
673
674# If the value of the EXAMPLE_PATH tag contains directories, you can use the
675# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
676# and *.h) to filter out the source-files in the directories. If left
677# blank all files are included.
678
679EXAMPLE_PATTERNS = *
680
681# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
682# searched for input files to be used with the \include or \dontinclude
683# commands irrespective of the value of the RECURSIVE tag.
684# Possible values are YES and NO. If left blank NO is used.
685
686EXAMPLE_RECURSIVE = YES
687
688# The IMAGE_PATH tag can be used to specify one or more files or
689# directories that contain image that are included in the documentation (see
690# the \image command).
691
692IMAGE_PATH =
693
694# The INPUT_FILTER tag can be used to specify a program that doxygen should
695# invoke to filter for each input file. Doxygen will invoke the filter program
696# by executing (via popen()) the command <filter> <input-file>, where <filter>
697# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
698# input file. Doxygen will then use the output that the filter program writes
699# to standard output. If FILTER_PATTERNS is specified, this tag will be
700# ignored.
701
702INPUT_FILTER =
703
704# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
705# basis. Doxygen will compare the file name with each pattern and apply the
706# filter if there is a match. The filters are a list of the form:
707# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
708# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
709# is applied to all files.
710
711FILTER_PATTERNS =
712
713# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
714# INPUT_FILTER) will be used to filter the input files when producing source
715# files to browse (i.e. when SOURCE_BROWSER is set to YES).
716
717FILTER_SOURCE_FILES = NO
718
719#---------------------------------------------------------------------------
720# configuration options related to source browsing
721#---------------------------------------------------------------------------
722
723# If the SOURCE_BROWSER tag is set to YES then a list of source files will
724# be generated. Documented entities will be cross-referenced with these sources.
725# Note: To get rid of all source code in the generated output, make sure also
726# VERBATIM_HEADERS is set to NO.
727
728SOURCE_BROWSER = YES
729
730# Setting the INLINE_SOURCES tag to YES will include the body
731# of functions and classes directly in the documentation.
732
733INLINE_SOURCES = YES
734
735# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
736# doxygen to hide any special comment blocks from generated source code
737# fragments. Normal C and C++ comments will always remain visible.
738
739STRIP_CODE_COMMENTS = NO
740
741# If the REFERENCED_BY_RELATION tag is set to YES
742# then for each documented function all documented
743# functions referencing it will be listed.
744
745REFERENCED_BY_RELATION = YES
746
747# If the REFERENCES_RELATION tag is set to YES
748# then for each documented function all documented entities
749# called/used by that function will be listed.
750
751REFERENCES_RELATION = YES
752
753# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
754# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
755# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
756# link to the source code. Otherwise they will link to the documentation.
757
758REFERENCES_LINK_SOURCE = YES
759
760# If the USE_HTAGS tag is set to YES then the references to source code
761# will point to the HTML generated by the htags(1) tool instead of doxygen
762# built-in source browser. The htags tool is part of GNU's global source
763# tagging system (see http://www.gnu.org/software/global/global.html). You
764# will need version 4.8.6 or higher.
765
766USE_HTAGS = NO
767
768# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
769# will generate a verbatim copy of the header file for each class for
770# which an include is specified. Set to NO to disable this.
771
772VERBATIM_HEADERS = YES
773
774#---------------------------------------------------------------------------
775# configuration options related to the alphabetical class index
776#---------------------------------------------------------------------------
777
778# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
779# of all compounds will be generated. Enable this if the project
780# contains a lot of classes, structs, unions or interfaces.
781
782ALPHABETICAL_INDEX = YES
783
784# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
785# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
786# in which this list will be split (can be a number in the range [1..20])
787
788COLS_IN_ALPHA_INDEX = 5
789
790# In case all classes in a project start with a common prefix, all
791# classes will be put under the same header in the alphabetical index.
792# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
793# should be ignored while generating the index headers.
794
795IGNORE_PREFIX = SDL_ \
796 SDL
797
798#---------------------------------------------------------------------------
799# configuration options related to the HTML output
800#---------------------------------------------------------------------------
801
802# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
803# generate HTML output.
804
805GENERATE_HTML = YES
806
807# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
808# If a relative path is entered the value of OUTPUT_DIRECTORY will be
809# put in front of it. If left blank `html' will be used as the default path.
810
811HTML_OUTPUT = html
812
813# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
814# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
815# doxygen will generate files with .html extension.
816
817HTML_FILE_EXTENSION = .html
818
819# The HTML_HEADER tag can be used to specify a personal HTML header for
820# each generated HTML page. If it is left blank doxygen will generate a
821# standard header.
822
823HTML_HEADER =
824
825# The HTML_FOOTER tag can be used to specify a personal HTML footer for
826# each generated HTML page. If it is left blank doxygen will generate a
827# standard footer.
828
829HTML_FOOTER =
830
831# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
832# style sheet that is used by each HTML page. It can be used to
833# fine-tune the look of the HTML output. If the tag is left blank doxygen
834# will generate a default style sheet. Note that doxygen will try to copy
835# the style sheet file to the HTML output directory, so don't put your own
836# stylesheet in the HTML output directory as well, or it will be erased!
837
838HTML_STYLESHEET =
839
840# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
841# files or namespaces will be aligned in HTML using tables. If set to
842# NO a bullet list will be used.
843
844HTML_ALIGN_MEMBERS = YES
845
846# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
847# documentation will contain sections that can be hidden and shown after the
848# page has loaded. For this to work a browser that supports
849# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
850# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
851
852HTML_DYNAMIC_SECTIONS = YES
853
854# If the GENERATE_DOCSET tag is set to YES, additional index files
855# will be generated that can be used as input for Apple's Xcode 3
856# integrated development environment, introduced with OSX 10.5 (Leopard).
857# To create a documentation set, doxygen will generate a Makefile in the
858# HTML output directory. Running make will produce the docset in that
859# directory and running "make install" will install the docset in
860# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
861# it at startup.
862# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
863
864GENERATE_DOCSET = NO
865
866# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
867# feed. A documentation feed provides an umbrella under which multiple
868# documentation sets from a single provider (such as a company or product suite)
869# can be grouped.
870
871DOCSET_FEEDNAME = "SDL 2.0 Doxygen"
872
873# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
874# should uniquely identify the documentation set bundle. This should be a
875# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
876# will append .docset to the name.
877
878DOCSET_BUNDLE_ID = org.libsdl.sdl20
879
880# If the GENERATE_HTMLHELP tag is set to YES, additional index files
881# will be generated that can be used as input for tools like the
882# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
883# of the generated HTML documentation.
884
885GENERATE_HTMLHELP = NO
886
887# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
888# be used to specify the file name of the resulting .chm file. You
889# can add a path in front of the file if the result should not be
890# written to the html output directory.
891
892CHM_FILE = ./sdl20.chm
893
894# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
895# be used to specify the location (absolute path including file name) of
896# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
897# the HTML help compiler on the generated index.hhp.
898
899HHC_LOCATION =
900
901# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
902# controls if a separate .chi index file is generated (YES) or that
903# it should be included in the master .chm file (NO).
904
905GENERATE_CHI = NO
906
907# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
908# is used to encode HtmlHelp index (hhk), content (hhc) and project file
909# content.
910
911CHM_INDEX_ENCODING =
912
913# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
914# controls whether a binary table of contents is generated (YES) or a
915# normal table of contents (NO) in the .chm file.
916
917BINARY_TOC = NO
918
919# The TOC_EXPAND flag can be set to YES to add extra items for group members
920# to the contents of the HTML help documentation and to the tree view.
921
922TOC_EXPAND = YES
923
924# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
925# are set, an additional index file will be generated that can be used as input for
926# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
927# HTML documentation.
928
929GENERATE_QHP = NO
930
931# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
932# be used to specify the file name of the resulting .qch file.
933# The path specified is relative to the HTML output folder.
934
935QCH_FILE =
936
937# The QHP_NAMESPACE tag specifies the namespace to use when generating
938# Qt Help Project output. For more information please see
939# http://doc.trolltech.com/qthelpproject.html#namespace
940
941QHP_NAMESPACE =
942
943# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
944# Qt Help Project output. For more information please see
945# http://doc.trolltech.com/qthelpproject.html#virtual-folders
946
947QHP_VIRTUAL_FOLDER = doc
948
949# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
950# For more information please see
951# http://doc.trolltech.com/qthelpproject.html#custom-filters
952
953QHP_CUST_FILTER_NAME =
954
955# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
956# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
957
958QHP_CUST_FILTER_ATTRS =
959
960# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
961# filter section matches.
962# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
963
964QHP_SECT_FILTER_ATTRS =
965
966# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
967# be used to specify the location of Qt's qhelpgenerator.
968# If non-empty doxygen will try to run qhelpgenerator on the generated
969# .qhp file.
970
971QHG_LOCATION =
972
973# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
974# top of each HTML page. The value NO (the default) enables the index and
975# the value YES disables it.
976
977DISABLE_INDEX = NO
978
979# This tag can be used to set the number of enum values (range [1..20])
980# that doxygen will group on one line in the generated HTML documentation.
981
982ENUM_VALUES_PER_LINE = 1
983
984# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
985# structure should be generated to display hierarchical information.
986# If the tag value is set to FRAME, a side panel will be generated
987# containing a tree-like index structure (just like the one that
988# is generated for HTML Help). For this to work a browser that supports
989# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
990# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
991# probably better off using the HTML help feature. Other possible values
992# for this tag are: HIERARCHIES, which will generate the Groups, Directories,
993# and Class Hierarchy pages using a tree view instead of an ordered list;
994# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which
995# disables this behavior completely. For backwards compatibility with previous
996# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE
997# respectively.
998
999GENERATE_TREEVIEW = ALL
1000
1001# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
1002# used to set the initial width (in pixels) of the frame in which the tree
1003# is shown.
1004
1005TREEVIEW_WIDTH = 250
1006
1007# Use this tag to change the font size of Latex formulas included
1008# as images in the HTML documentation. The default is 10. Note that
1009# when you change the font size after a successful doxygen run you need
1010# to manually remove any form_*.png images from the HTML output directory
1011# to force them to be regenerated.
1012
1013FORMULA_FONTSIZE = 10
1014
1015#---------------------------------------------------------------------------
1016# configuration options related to the LaTeX output
1017#---------------------------------------------------------------------------
1018
1019# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
1020# generate Latex output.
1021
1022GENERATE_LATEX = NO
1023
1024# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
1025# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1026# put in front of it. If left blank `latex' will be used as the default path.
1027
1028LATEX_OUTPUT = latex
1029
1030# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
1031# invoked. If left blank `latex' will be used as the default command name.
1032
1033LATEX_CMD_NAME = latex
1034
1035# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
1036# generate index for LaTeX. If left blank `makeindex' will be used as the
1037# default command name.
1038
1039MAKEINDEX_CMD_NAME = makeindex
1040
1041# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
1042# LaTeX documents. This may be useful for small projects and may help to
1043# save some trees in general.
1044
1045COMPACT_LATEX = NO
1046
1047# The PAPER_TYPE tag can be used to set the paper type that is used
1048# by the printer. Possible values are: a4, a4wide, letter, legal and
1049# executive. If left blank a4wide will be used.
1050
1051PAPER_TYPE = a4wide
1052
1053# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
1054# packages that should be included in the LaTeX output.
1055
1056EXTRA_PACKAGES =
1057
1058# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
1059# the generated latex document. The header should contain everything until
1060# the first chapter. If it is left blank doxygen will generate a
1061# standard header. Notice: only use this tag if you know what you are doing!
1062
1063LATEX_HEADER =
1064
1065# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
1066# is prepared for conversion to pdf (using ps2pdf). The pdf file will
1067# contain links (just like the HTML output) instead of page references
1068# This makes the output suitable for online browsing using a pdf viewer.
1069
1070PDF_HYPERLINKS = YES
1071
1072# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
1073# plain latex in the generated Makefile. Set this option to YES to get a
1074# higher quality PDF documentation.
1075
1076USE_PDFLATEX = YES
1077
1078# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
1079# command to the generated LaTeX files. This will instruct LaTeX to keep
1080# running if errors occur, instead of asking the user for help.
1081# This option is also used when generating formulas in HTML.
1082
1083LATEX_BATCHMODE = NO
1084
1085# If LATEX_HIDE_INDICES is set to YES then doxygen will not
1086# include the index chapters (such as File Index, Compound Index, etc.)
1087# in the output.
1088
1089LATEX_HIDE_INDICES = NO
1090
1091# If LATEX_SOURCE_CODE is set to YES then doxygen will include
1092# source code with syntax highlighting in the LaTeX output.
1093# Note that which sources are shown also depends on other settings
1094# such as SOURCE_BROWSER.
1095
1096LATEX_SOURCE_CODE = NO
1097
1098#---------------------------------------------------------------------------
1099# configuration options related to the RTF output
1100#---------------------------------------------------------------------------
1101
1102# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
1103# The RTF output is optimized for Word 97 and may not look very pretty with
1104# other RTF readers or editors.
1105
1106GENERATE_RTF = NO
1107
1108# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
1109# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1110# put in front of it. If left blank `rtf' will be used as the default path.
1111
1112RTF_OUTPUT = rtf
1113
1114# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
1115# RTF documents. This may be useful for small projects and may help to
1116# save some trees in general.
1117
1118COMPACT_RTF = NO
1119
1120# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
1121# will contain hyperlink fields. The RTF file will
1122# contain links (just like the HTML output) instead of page references.
1123# This makes the output suitable for online browsing using WORD or other
1124# programs which support those fields.
1125# Note: wordpad (write) and others do not support links.
1126
1127RTF_HYPERLINKS = NO
1128
1129# Load stylesheet definitions from file. Syntax is similar to doxygen's
1130# config file, i.e. a series of assignments. You only have to provide
1131# replacements, missing definitions are set to their default value.
1132
1133RTF_STYLESHEET_FILE =
1134
1135# Set optional variables used in the generation of an rtf document.
1136# Syntax is similar to doxygen's config file.
1137
1138RTF_EXTENSIONS_FILE =
1139
1140#---------------------------------------------------------------------------
1141# configuration options related to the man page output
1142#---------------------------------------------------------------------------
1143
1144# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
1145# generate man pages
1146
1147GENERATE_MAN = NO
1148
1149# The MAN_OUTPUT tag is used to specify where the man pages will be put.
1150# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1151# put in front of it. If left blank `man' will be used as the default path.
1152
1153MAN_OUTPUT = man
1154
1155# The MAN_EXTENSION tag determines the extension that is added to
1156# the generated man pages (default is the subroutine's section .3)
1157
1158MAN_EXTENSION = .3
1159
1160# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
1161# then it will generate one additional man file for each entity
1162# documented in the real man page(s). These additional files
1163# only source the real man page, but without them the man command
1164# would be unable to find the correct page. The default is NO.
1165
1166MAN_LINKS = NO
1167
1168#---------------------------------------------------------------------------
1169# configuration options related to the XML output
1170#---------------------------------------------------------------------------
1171
1172# If the GENERATE_XML tag is set to YES Doxygen will
1173# generate an XML file that captures the structure of
1174# the code including all documentation.
1175
1176GENERATE_XML = NO
1177
1178# The XML_OUTPUT tag is used to specify where the XML pages will be put.
1179# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1180# put in front of it. If left blank `xml' will be used as the default path.
1181
1182XML_OUTPUT = xml
1183
1184# The XML_SCHEMA tag can be used to specify an XML schema,
1185# which can be used by a validating XML parser to check the
1186# syntax of the XML files.
1187
1188XML_SCHEMA =
1189
1190# The XML_DTD tag can be used to specify an XML DTD,
1191# which can be used by a validating XML parser to check the
1192# syntax of the XML files.
1193
1194XML_DTD =
1195
1196# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
1197# dump the program listings (including syntax highlighting
1198# and cross-referencing information) to the XML output. Note that
1199# enabling this will significantly increase the size of the XML output.
1200
1201XML_PROGRAMLISTING = YES
1202
1203#---------------------------------------------------------------------------
1204# configuration options for the AutoGen Definitions output
1205#---------------------------------------------------------------------------
1206
1207# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
1208# generate an AutoGen Definitions (see autogen.sf.net) file
1209# that captures the structure of the code including all
1210# documentation. Note that this feature is still experimental
1211# and incomplete at the moment.
1212
1213GENERATE_AUTOGEN_DEF = NO
1214
1215#---------------------------------------------------------------------------
1216# configuration options related to the Perl module output
1217#---------------------------------------------------------------------------
1218
1219# If the GENERATE_PERLMOD tag is set to YES Doxygen will
1220# generate a Perl module file that captures the structure of
1221# the code including all documentation. Note that this
1222# feature is still experimental and incomplete at the
1223# moment.
1224
1225GENERATE_PERLMOD = NO
1226
1227# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
1228# the necessary Makefile rules, Perl scripts and LaTeX code to be able
1229# to generate PDF and DVI output from the Perl module output.
1230
1231PERLMOD_LATEX = NO
1232
1233# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
1234# nicely formatted so it can be parsed by a human reader. This is useful
1235# if you want to understand what is going on. On the other hand, if this
1236# tag is set to NO the size of the Perl module output will be much smaller
1237# and Perl will parse it just the same.
1238
1239PERLMOD_PRETTY = YES
1240
1241# The names of the make variables in the generated doxyrules.make file
1242# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
1243# This is useful so different doxyrules.make files included by the same
1244# Makefile don't overwrite each other's variables.
1245
1246PERLMOD_MAKEVAR_PREFIX =
1247
1248#---------------------------------------------------------------------------
1249# Configuration options related to the preprocessor
1250#---------------------------------------------------------------------------
1251
1252# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
1253# evaluate all C-preprocessor directives found in the sources and include
1254# files.
1255
1256ENABLE_PREPROCESSING = YES
1257
1258# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
1259# names in the source code. If set to NO (the default) only conditional
1260# compilation will be performed. Macro expansion can be done in a controlled
1261# way by setting EXPAND_ONLY_PREDEF to YES.
1262
1263MACRO_EXPANSION = YES
1264
1265# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
1266# then the macro expansion is limited to the macros specified with the
1267# PREDEFINED and EXPAND_AS_DEFINED tags.
1268
1269EXPAND_ONLY_PREDEF = YES
1270
1271# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
1272# in the INCLUDE_PATH (see below) will be search if a #include is found.
1273
1274SEARCH_INCLUDES = YES
1275
1276# The INCLUDE_PATH tag can be used to specify one or more directories that
1277# contain include files that are not input files but should be processed by
1278# the preprocessor.
1279
1280INCLUDE_PATH =
1281
1282# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
1283# patterns (like *.h and *.hpp) to filter out the header-files in the
1284# directories. If left blank, the patterns specified with FILE_PATTERNS will
1285# be used.
1286
1287INCLUDE_FILE_PATTERNS =
1288
1289# The PREDEFINED tag can be used to specify one or more macro names that
1290# are defined before the preprocessor is started (similar to the -D option of
1291# gcc). The argument of the tag is a list of macros of the form: name
1292# or name=definition (no spaces). If the definition and the = are
1293# omitted =1 is assumed. To prevent a macro definition from being
1294# undefined via #undef or recursively expanded use the := operator
1295# instead of the = operator.
1296
1297PREDEFINED = DOXYGEN_SHOULD_IGNORE_THIS=1 \
1298 DECLSPEC= \
1299 SDLCALL= \
1300 _WIN32=1
1301
1302# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
1303# this tag can be used to specify a list of macro names that should be expanded.
1304# The macro definition that is found in the sources will be used.
1305# Use the PREDEFINED tag if you want to use a different macro definition.
1306
1307EXPAND_AS_DEFINED =
1308
1309# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
1310# doxygen's preprocessor will remove all function-like macros that are alone
1311# on a line, have an all uppercase name, and do not end with a semicolon. Such
1312# function macros are typically used for boiler-plate code, and will confuse
1313# the parser if not removed.
1314
1315SKIP_FUNCTION_MACROS = YES
1316
1317#---------------------------------------------------------------------------
1318# Configuration::additions related to external references
1319#---------------------------------------------------------------------------
1320
1321# The TAGFILES option can be used to specify one or more tagfiles.
1322# Optionally an initial location of the external documentation
1323# can be added for each tagfile. The format of a tag file without
1324# this location is as follows:
1325# TAGFILES = file1 file2 ...
1326# Adding location for the tag files is done as follows:
1327# TAGFILES = file1=loc1 "file2 = loc2" ...
1328# where "loc1" and "loc2" can be relative or absolute paths or
1329# URLs. If a location is present for each tag, the installdox tool
1330# does not have to be run to correct the links.
1331# Note that each tag file must have a unique name
1332# (where the name does NOT include the path)
1333# If a tag file is not located in the directory in which doxygen
1334# is run, you must also specify the path to the tagfile here.
1335
1336TAGFILES =
1337
1338# When a file name is specified after GENERATE_TAGFILE, doxygen will create
1339# a tag file that is based on the input files it reads.
1340
1341GENERATE_TAGFILE = ./SDL.tag
1342
1343# If the ALLEXTERNALS tag is set to YES all external classes will be listed
1344# in the class index. If set to NO only the inherited external classes
1345# will be listed.
1346
1347ALLEXTERNALS = NO
1348
1349# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
1350# in the modules index. If set to NO, only the current project's groups will
1351# be listed.
1352
1353EXTERNAL_GROUPS = YES
1354
1355# The PERL_PATH should be the absolute path and name of the perl script
1356# interpreter (i.e. the result of `which perl').
1357
1358PERL_PATH = c:\Perl\bin\perl.exe
1359
1360#---------------------------------------------------------------------------
1361# Configuration options related to the dot tool
1362#---------------------------------------------------------------------------
1363
1364# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
1365# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
1366# or super classes. Setting the tag to NO turns the diagrams off. Note that
1367# this option is superseded by the HAVE_DOT option below. This is only a
1368# fallback. It is recommended to install and use dot, since it yields more
1369# powerful graphs.
1370
1371CLASS_DIAGRAMS = YES
1372
1373# You can define message sequence charts within doxygen comments using the \msc
1374# command. Doxygen will then run the mscgen tool (see
1375# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
1376# documentation. The MSCGEN_PATH tag allows you to specify the directory where
1377# the mscgen tool resides. If left empty the tool is assumed to be found in the
1378# default search path.
1379
1380MSCGEN_PATH =
1381
1382# If set to YES, the inheritance and collaboration graphs will hide
1383# inheritance and usage relations if the target is undocumented
1384# or is not a class.
1385
1386HIDE_UNDOC_RELATIONS = YES
1387
1388# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
1389# available from the path. This tool is part of Graphviz, a graph visualization
1390# toolkit from AT&T and Lucent Bell Labs. The other options in this section
1391# have no effect if this option is set to NO (the default)
1392
1393HAVE_DOT = YES
1394
1395# By default doxygen will write a font called FreeSans.ttf to the output
1396# directory and reference it in all dot files that doxygen generates. This
1397# font does not include all possible unicode characters however, so when you need
1398# these (or just want a differently looking font) you can specify the font name
1399# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
1400# which can be done by putting it in a standard location or by setting the
1401# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
1402# containing the font.
1403
1404DOT_FONTNAME = FreeSans
1405
1406# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
1407# The default size is 10pt.
1408
1409DOT_FONTSIZE = 10
1410
1411# By default doxygen will tell dot to use the output directory to look for the
1412# FreeSans.ttf font (which doxygen will put there itself). If you specify a
1413# different font using DOT_FONTNAME you can set the path where dot
1414# can find it using this tag.
1415
1416DOT_FONTPATH =
1417
1418# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
1419# will generate a graph for each documented class showing the direct and
1420# indirect inheritance relations. Setting this tag to YES will force the
1421# the CLASS_DIAGRAMS tag to NO.
1422
1423CLASS_GRAPH = YES
1424
1425# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
1426# will generate a graph for each documented class showing the direct and
1427# indirect implementation dependencies (inheritance, containment, and
1428# class references variables) of the class with other documented classes.
1429
1430COLLABORATION_GRAPH = YES
1431
1432# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
1433# will generate a graph for groups, showing the direct groups dependencies
1434
1435GROUP_GRAPHS = YES
1436
1437# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
1438# collaboration diagrams in a style similar to the OMG's Unified Modeling
1439# Language.
1440
1441UML_LOOK = NO
1442
1443# If set to YES, the inheritance and collaboration graphs will show the
1444# relations between templates and their instances.
1445
1446TEMPLATE_RELATIONS = YES
1447
1448# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
1449# tags are set to YES then doxygen will generate a graph for each documented
1450# file showing the direct and indirect include dependencies of the file with
1451# other documented files.
1452
1453INCLUDE_GRAPH = YES
1454
1455# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
1456# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
1457# documented header file showing the documented files that directly or
1458# indirectly include this file.
1459
1460INCLUDED_BY_GRAPH = YES
1461
1462# If the CALL_GRAPH and HAVE_DOT options are set to YES then
1463# doxygen will generate a call dependency graph for every global function
1464# or class method. Note that enabling this option will significantly increase
1465# the time of a run. So in most cases it will be better to enable call graphs
1466# for selected functions only using the \callgraph command.
1467
1468CALL_GRAPH = NO
1469
1470# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
1471# doxygen will generate a caller dependency graph for every global function
1472# or class method. Note that enabling this option will significantly increase
1473# the time of a run. So in most cases it will be better to enable caller
1474# graphs for selected functions only using the \callergraph command.
1475
1476CALLER_GRAPH = NO
1477
1478# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
1479# will graphical hierarchy of all classes instead of a textual one.
1480
1481GRAPHICAL_HIERARCHY = YES
1482
1483# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
1484# then doxygen will show the dependencies a directory has on other directories
1485# in a graphical way. The dependency relations are determined by the #include
1486# relations between the files in the directories.
1487
1488DIRECTORY_GRAPH = YES
1489
1490# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
1491# generated by dot. Possible values are png, jpg, or gif
1492# If left blank png will be used.
1493
1494DOT_IMAGE_FORMAT = png
1495
1496# The tag DOT_PATH can be used to specify the path where the dot tool can be
1497# found. If left blank, it is assumed the dot tool can be found in the path.
1498
1499DOT_PATH =
1500
1501# The DOTFILE_DIRS tag can be used to specify one or more directories that
1502# contain dot files that are included in the documentation (see the
1503# \dotfile command).
1504
1505DOTFILE_DIRS =
1506
1507# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
1508# nodes that will be shown in the graph. If the number of nodes in a graph
1509# becomes larger than this value, doxygen will truncate the graph, which is
1510# visualized by representing a node as a red box. Note that doxygen if the
1511# number of direct children of the root node in a graph is already larger than
1512# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
1513# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
1514
1515DOT_GRAPH_MAX_NODES = 60
1516
1517# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
1518# graphs generated by dot. A depth value of 3 means that only nodes reachable
1519# from the root by following a path via at most 3 edges will be shown. Nodes
1520# that lay further from the root node will be omitted. Note that setting this
1521# option to 1 or 2 may greatly reduce the computation time needed for large
1522# code bases. Also note that the size of a graph can be further restricted by
1523# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
1524
1525MAX_DOT_GRAPH_DEPTH = 2
1526
1527# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
1528# background. This is disabled by default, because dot on Windows does not
1529# seem to support this out of the box. Warning: Depending on the platform used,
1530# enabling this option may lead to badly anti-aliased labels on the edges of
1531# a graph (i.e. they become hard to read).
1532
1533DOT_TRANSPARENT = NO
1534
1535# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
1536# files in one run (i.e. multiple -o and -T options on the command line). This
1537# makes dot run faster, but since only newer versions of dot (>1.8.10)
1538# support this, this feature is disabled by default.
1539
1540DOT_MULTI_TARGETS = YES
1541
1542# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
1543# generate a legend page explaining the meaning of the various boxes and
1544# arrows in the dot generated graphs.
1545
1546GENERATE_LEGEND = YES
1547
1548# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
1549# remove the intermediate dot files that are used to generate
1550# the various graphs.
1551
1552DOT_CLEANUP = YES
1553
1554#---------------------------------------------------------------------------
1555# Options related to the search engine
1556#---------------------------------------------------------------------------
1557
1558# The SEARCHENGINE tag specifies whether or not a search engine should be
1559# used. If set to NO the values of all tags below this one will be ignored.
1560
1561SEARCHENGINE = NO
diff --git a/src/contrib/SDL-2.30.2/docs/release_checklist.md b/src/contrib/SDL-2.30.2/docs/release_checklist.md
new file mode 100644
index 0000000..37d8b6d
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/docs/release_checklist.md
@@ -0,0 +1,49 @@
1# Release checklist
2
3When changing the version, run `build-scripts/update-version.sh X Y Z`,
4where `X Y Z` are the major version, minor version, and patch level. So
5`2 28 1` means "change the version to 2.28.1". This script does much of the
6mechanical work.
7
8
9## New feature release
10
11* Update `WhatsNew.txt`
12
13* Bump version number to 2.EVEN.0:
14
15 * `./build-scripts/update-version.sh 2 EVEN 0`
16
17* Do the release
18
19* Update the website file include/header.inc.php to reflect the new version
20
21## New bugfix release
22
23* Check that no new API/ABI was added
24
25 * If it was, do a new feature release (see above) instead
26
27* Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is even)
28
29 * `./build-scripts/update-version.sh 2 Y Z+1`
30
31* Do the release
32
33* Update the website file include/header.inc.php to reflect the new version
34
35## After a feature release
36
37* Create a branch like `release-2.24.x`
38
39* Bump version number to 2.ODD.0 for next development branch
40
41 * `./build-scripts/update-version.sh 2 ODD 0`
42
43## New development prerelease
44
45* Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is odd)
46
47 * `./build-scripts/update-version.sh 2 Y Z+1`
48
49* Do the release