mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Merge branch 'master' into cmake-use-internal-libs
This commit is contained in:
commit
ff9c41ca5f
436 changed files with 5326 additions and 1143 deletions
16
.travis.yml
16
.travis.yml
|
@ -72,6 +72,21 @@ matrix:
|
||||||
compiler: gcc-7
|
compiler: gcc-7
|
||||||
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3"
|
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3"
|
||||||
#gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802
|
#gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802
|
||||||
|
- os: linux
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
- libsdl2-mixer-dev
|
||||||
|
- libpng-dev
|
||||||
|
- libgl1-mesa-dev
|
||||||
|
- libgme-dev
|
||||||
|
- p7zip-full
|
||||||
|
- gcc-8
|
||||||
|
compiler: gcc-8
|
||||||
|
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3"
|
||||||
|
#gcc-8 (Ubuntu 7.2.0-1ubuntu1~14.04) 8.1.0
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
#clang version 3.5.0 (tags/RELEASE_350/final)
|
#clang version 3.5.0 (tags/RELEASE_350/final)
|
||||||
|
@ -212,6 +227,7 @@ matrix:
|
||||||
- compiler: clang-3.9
|
- compiler: clang-3.9
|
||||||
- compiler: clang-4.0
|
- compiler: clang-4.0
|
||||||
- compiler: clang-5.0
|
- compiler: clang-5.0
|
||||||
|
- compiler: gcc-8
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
apt: true
|
apt: true
|
||||||
|
|
BIN
bin/Resources/libgme64.dll
Normal file
BIN
bin/Resources/libgme64.dll
Normal file
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
#
|
#
|
||||||
# Makefile for installing the mingw32 version of the SDL library
|
# Makefile for installing the mingw32 version of the SDL library
|
||||||
|
|
||||||
CROSS_PATH := /usr/local/cross-tools
|
CROSS_PATH := /usr/local
|
||||||
ARCHITECTURES := i686-w64-mingw32 x86_64-w64-mingw32
|
ARCHITECTURES := i686-w64-mingw32 x86_64-w64-mingw32
|
||||||
|
|
||||||
all install:
|
all install:
|
||||||
@echo "Type \"make native\" to install 32-bit to /usr"
|
@echo "Type \"make native\" to install 32-bit to /usr"
|
||||||
@echo "Type \"make cross\" to install 32-bit and 64-bit to CROSS_PATH ($(CROSS_PATH))"
|
@echo "Type \"make cross\" to install 32-bit and 64-bit to $(CROSS_PATH)"
|
||||||
|
|
||||||
native:
|
native:
|
||||||
make install-package arch=i686-w64-mingw32 prefix=/usr
|
make install-package arch=i686-w64-mingw32 prefix=/usr
|
||||||
|
@ -22,6 +22,7 @@ install-package:
|
||||||
sed "s|^prefix=.*|prefix=$(prefix)|" <$(arch)/bin/sdl2-config >$(prefix)/bin/sdl2-config; \
|
sed "s|^prefix=.*|prefix=$(prefix)|" <$(arch)/bin/sdl2-config >$(prefix)/bin/sdl2-config; \
|
||||||
chmod 755 $(prefix)/bin/sdl2-config; \
|
chmod 755 $(prefix)/bin/sdl2-config; \
|
||||||
sed "s|^libdir=.*|libdir=\'$(prefix)/lib\'|" <$(arch)/lib/libSDL2.la >$(prefix)/lib/libSDL2.la; \
|
sed "s|^libdir=.*|libdir=\'$(prefix)/lib\'|" <$(arch)/lib/libSDL2.la >$(prefix)/lib/libSDL2.la; \
|
||||||
|
sed "s|^libdir=.*|libdir=\'$(prefix)/lib\'|" <$(arch)/lib/libSDL2main.la >$(prefix)/lib/libSDL2main.la; \
|
||||||
sed "s|^prefix=.*|prefix=$(prefix)|" <$(arch)/lib/pkgconfig/sdl2.pc >$(prefix)/lib/pkgconfig/sdl2.pc; \
|
sed "s|^prefix=.*|prefix=$(prefix)|" <$(arch)/lib/pkgconfig/sdl2.pc >$(prefix)/lib/pkgconfig/sdl2.pc; \
|
||||||
else \
|
else \
|
||||||
echo "*** ERROR: $(arch) or $(prefix) does not exist!"; \
|
echo "*** ERROR: $(arch) or $(prefix) does not exist!"; \
|
||||||
|
|
15
libs/SDL2/SRB2NOTE.txt
Normal file
15
libs/SDL2/SRB2NOTE.txt
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# SDL Development Libaries
|
||||||
|
|
||||||
|
Download both the VC and MinGW packages and extract them here.
|
||||||
|
|
||||||
|
https://www.libsdl.org/download-2.0.php
|
||||||
|
|
||||||
|
## VC Package
|
||||||
|
|
||||||
|
* include
|
||||||
|
* lib
|
||||||
|
|
||||||
|
## MinGW Package
|
||||||
|
|
||||||
|
* i686-w64-mingw32
|
||||||
|
* x86_64-w64-mingw32
|
|
@ -1,6 +1,91 @@
|
||||||
|
|
||||||
This is a list of major changes in SDL's version history.
|
This is a list of major changes in SDL's version history.
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
2.0.9:
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
General:
|
||||||
|
* Added a new sensor API, initialized by passing SDL_INIT_SENSOR to SDL_Init(), and defined in SDL_sensor.h
|
||||||
|
* Added an event SDL_SENSORUPDATE which is sent when a sensor is updated
|
||||||
|
* Added SDL_GetDisplayOrientation() to return the current display orientation
|
||||||
|
* Added an event SDL_DISPLAYEVENT which is sent when the display orientation changes
|
||||||
|
* Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms. (Thanks to Valve for contributing the PS4 and Nintendo Switch Pro controller support)
|
||||||
|
* Added support for many other popular game controllers
|
||||||
|
* Added SDL_JoystickGetDevicePlayerIndex(), SDL_JoystickGetPlayerIndex(), and SDL_GameControllerGetPlayerIndex() to get the player index for a controller. For XInput controllers this returns the XInput index for the controller.
|
||||||
|
* Added SDL_GameControllerRumble() and SDL_JoystickRumble() which allow simple rumble without using the haptics API
|
||||||
|
* Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened
|
||||||
|
* Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_TIME to control the mouse double-click time
|
||||||
|
* Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS to control the mouse double-click radius, in pixels
|
||||||
|
* Added SDL_HasColorKey() to return whether a surface has a colorkey active
|
||||||
|
* Added SDL_HasAVX512F() to return whether the CPU has AVX-512F features
|
||||||
|
* Added SDL_IsTablet() to return whether the application is running on a tablet
|
||||||
|
* Added SDL_THREAD_PRIORITY_TIME_CRITICAL for threads that must run at the highest priority
|
||||||
|
|
||||||
|
Mac OS X:
|
||||||
|
* Fixed black screen at start on Mac OS X Mojave
|
||||||
|
|
||||||
|
Linux:
|
||||||
|
* Added SDL_LinuxSetThreadPriority() to allow adjusting the thread priority of native threads using RealtimeKit if available.
|
||||||
|
|
||||||
|
iOS:
|
||||||
|
* Fixed Asian IME input
|
||||||
|
|
||||||
|
Android:
|
||||||
|
* Updated required Android SDK to API 26, to match Google's new App Store requirements
|
||||||
|
* Added support for wired USB Xbox, PS4, and Nintendo Switch Pro controllers
|
||||||
|
* Added support for relative mouse mode on Android 7.0 and newer (except where it's broken, on Chromebooks and when in DeX mode with Samsung Experience 9.0)
|
||||||
|
* Added support for custom mouse cursors on Android 7.0 and newer
|
||||||
|
* Added the hint SDL_HINT_ANDROID_TRAP_BACK_BUTTON to control whether the back button will back out of the app (the default) or be passed to the application as SDL_SCANCODE_AC_BACK
|
||||||
|
* Added SDL_AndroidBackButton() to trigger the Android system back button behavior when handling the back button in the application
|
||||||
|
* Added SDL_IsChromebook() to return whether the app is running in the Chromebook Android runtime
|
||||||
|
* Added SDL_IsDeXMode() to return whether the app is running while docked in the Samsung DeX
|
||||||
|
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
2.0.8:
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
General:
|
||||||
|
* Added SDL_fmod() and SDL_log10()
|
||||||
|
* Each of the SDL math functions now has the corresponding float version
|
||||||
|
* Added SDL_SetYUVConversionMode() and SDL_GetYUVConversionMode() to control the formula used when converting to and from YUV colorspace. The options are JPEG, BT.601, and BT.709
|
||||||
|
|
||||||
|
Windows:
|
||||||
|
* Implemented WASAPI support on Windows UWP and removed the deprecated XAudio2 implementation
|
||||||
|
* Added resampling support on WASAPI on Windows 7 and above
|
||||||
|
|
||||||
|
Windows UWP:
|
||||||
|
* Added SDL_WinRTGetDeviceFamily() to find out what type of device your application is running on
|
||||||
|
|
||||||
|
Mac OS X:
|
||||||
|
* Added support for the Vulkan SDK for Mac:
|
||||||
|
https://www.lunarg.com/lunarg-releases-vulkan-sdk-1-0-69-0-for-mac/
|
||||||
|
* Added support for OpenGL ES using ANGLE when it's available
|
||||||
|
|
||||||
|
Mac OS X / iOS / tvOS:
|
||||||
|
* Added a Metal 2D render implementation
|
||||||
|
* Added SDL_RenderGetMetalLayer() and SDL_RenderGetMetalCommandEncoder() to insert your own drawing into SDL rendering when using the Metal implementation
|
||||||
|
|
||||||
|
iOS:
|
||||||
|
* Added the hint SDL_HINT_IOS_HIDE_HOME_INDICATOR to control whether the home indicator bar on iPhone X should be hidden. This defaults to dimming the indicator for fullscreen applications and showing the indicator for windowed applications.
|
||||||
|
|
||||||
|
iOS / Android:
|
||||||
|
* Added the hint SDL_HINT_RETURN_KEY_HIDES_IME to control whether the return key on the software keyboard should hide the keyboard or send a key event (the default)
|
||||||
|
|
||||||
|
Android:
|
||||||
|
* SDL now supports building with Android Studio and Gradle by default, and the old Ant project is available in android-project-ant
|
||||||
|
* SDL now requires the API 19 SDK to build, but can still target devices down to API 14 (Android 4.0.1)
|
||||||
|
* Added SDL_IsAndroidTV() to tell whether the application is running on Android TV
|
||||||
|
|
||||||
|
Android / tvOS:
|
||||||
|
* Added the hint SDL_HINT_TV_REMOTE_AS_JOYSTICK to control whether TV remotes should be listed as joystick devices (the default) or send keyboard events.
|
||||||
|
|
||||||
|
Linux:
|
||||||
|
* Added the hint SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR to control whether the X server should skip the compositor for the SDL application. This defaults to "1"
|
||||||
|
* Added the hint SDL_HINT_VIDEO_DOUBLE_BUFFER to control whether the Raspberry Pi and KMSDRM video drivers should use double or triple buffering (the default)
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
2.0.7:
|
2.0.7:
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
|
@ -4,20 +4,24 @@ Android
|
||||||
Matt Styles wrote a tutorial on building SDL for Android with Visual Studio:
|
Matt Styles wrote a tutorial on building SDL for Android with Visual Studio:
|
||||||
http://trederia.blogspot.de/2017/03/building-sdl2-for-android-with-visual.html
|
http://trederia.blogspot.de/2017/03/building-sdl2-for-android-with-visual.html
|
||||||
|
|
||||||
The rest of this README covers the old style build process.
|
The rest of this README covers the Android gradle style build process.
|
||||||
|
|
||||||
|
If you are using the older ant build process, it is no longer officially
|
||||||
|
supported, but you can use the "android-project-ant" directory as a template.
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
Requirements
|
Requirements
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
Android SDK (version 16 or later)
|
Android SDK (version 26 or later)
|
||||||
https://developer.android.com/sdk/index.html
|
https://developer.android.com/sdk/index.html
|
||||||
|
|
||||||
Android NDK r7 or later
|
Android NDK r15c or later
|
||||||
https://developer.android.com/tools/sdk/ndk/index.html
|
https://developer.android.com/tools/sdk/ndk/index.html
|
||||||
|
|
||||||
Minimum API level supported by SDL: 10 (Android 2.3.3)
|
Minimum API level supported by SDL: 14 (Android 4.0.1)
|
||||||
Joystick support is available for API level >= 12 devices.
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
How the port works
|
How the port works
|
||||||
|
@ -31,15 +35,12 @@ Joystick support is available for API level >= 12 devices.
|
||||||
- This eventually produces a standard Android .apk package
|
- This eventually produces a standard Android .apk package
|
||||||
|
|
||||||
The Android Java code implements an "Activity" and can be found in:
|
The Android Java code implements an "Activity" and can be found in:
|
||||||
android-project/src/org/libsdl/app/SDLActivity.java
|
android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
|
||||||
|
|
||||||
The Java code loads your game code, the SDL shared library, and
|
The Java code loads your game code, the SDL shared library, and
|
||||||
dispatches to native functions implemented in the SDL library:
|
dispatches to native functions implemented in the SDL library:
|
||||||
src/core/android/SDL_android.c
|
src/core/android/SDL_android.c
|
||||||
|
|
||||||
Your project must include some glue code that starts your main() routine:
|
|
||||||
src/main/android/SDL_android_main.c
|
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
Building an app
|
Building an app
|
||||||
|
@ -74,71 +75,30 @@ For more complex projects, follow these instructions:
|
||||||
|
|
||||||
1. Copy the android-project directory wherever you want to keep your projects
|
1. Copy the android-project directory wherever you want to keep your projects
|
||||||
and rename it to the name of your project.
|
and rename it to the name of your project.
|
||||||
2. Move or symlink this SDL directory into the "<project>/jni" directory
|
2. Move or symlink this SDL directory into the "<project>/app/jni" directory
|
||||||
3. Edit "<project>/jni/src/Android.mk" to include your source files
|
3. Edit "<project>/app/jni/src/Android.mk" to include your source files
|
||||||
4. Run 'ndk-build' (a script provided by the NDK). This compiles the C source
|
|
||||||
|
|
||||||
If you want to use the Eclipse IDE, skip to the Eclipse section below.
|
4a. If you want to use Android Studio, simply open your <project> directory and start building.
|
||||||
|
|
||||||
5. Create "<project>/local.properties" and use that to point to the Android SDK directory, by writing a line with the following form:
|
4b. 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
|
||||||
|
|
||||||
sdk.dir=PATH_TO_ANDROID_SDK
|
|
||||||
|
|
||||||
6. Run 'ant debug' in android/project. This compiles the .java and eventually
|
|
||||||
creates a .apk with the native code embedded
|
|
||||||
7. 'ant debug install' will push the apk to the device or emulator (if connected)
|
|
||||||
|
|
||||||
Here's an explanation of the files in the Android project, so you can customize them:
|
Here's an explanation of the files in the Android project, so you can customize them:
|
||||||
|
|
||||||
android-project/
|
android-project/app
|
||||||
AndroidManifest.xml - package manifest. Among others, it contains the class name
|
build.gradle - build info including the application version and SDK
|
||||||
of the main Activity and the package name of the application.
|
src/main/AndroidManifest.xml - package manifest. Among others, it contains the class name of the main Activity and the package name of the application.
|
||||||
build.properties - empty
|
|
||||||
build.xml - build description file, used by ant. The actual application name
|
|
||||||
is specified here.
|
|
||||||
default.properties - holds the target ABI for the application, android-10 and up
|
|
||||||
project.properties - holds the target ABI for the application, android-10 and up
|
|
||||||
local.properties - holds the SDK path, you should change this to the path to your SDK
|
|
||||||
jni/ - directory holding native code
|
jni/ - directory holding native code
|
||||||
jni/Android.mk - Android makefile that can call recursively the Android.mk files
|
jni/Application.mk - Application JNI settings, including target platform and STL library
|
||||||
in all subdirectories
|
jni/Android.mk - Android makefile that can call recursively the Android.mk files in all subdirectories
|
||||||
jni/SDL/ - (symlink to) directory holding the SDL library files
|
jni/SDL/ - (symlink to) directory holding the SDL library files
|
||||||
jni/SDL/Android.mk - Android makefile for creating the SDL shared library
|
jni/SDL/Android.mk - Android makefile for creating the SDL shared library
|
||||||
jni/src/ - directory holding your C/C++ source
|
jni/src/ - directory holding your C/C++ source
|
||||||
jni/src/Android.mk - Android makefile that you should customize to include your
|
jni/src/Android.mk - Android makefile that you should customize to include your source code and any library references
|
||||||
source code and any library references
|
src/main/assets/ - directory holding asset files for your application
|
||||||
res/ - directory holding resources for your application
|
src/main/res/ - directory holding resources for your application
|
||||||
res/drawable-* - directories holding icons for different phone hardware. Could be
|
src/main/res/mipmap-* - directories holding icons for different phone hardware
|
||||||
one dir called "drawable".
|
src/main/res/values/strings.xml - strings used in your application, including the application name
|
||||||
res/layout/main.xml - Usually contains a file main.xml, which declares the screen layout.
|
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.
|
||||||
We don't need it because we use the SDL video output.
|
|
||||||
res/values/strings.xml - strings used in your application, including the application name
|
|
||||||
shown on the phone.
|
|
||||||
src/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.
|
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
Build an app with static linking of libSDL
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
This build uses the Android NDK module system.
|
|
||||||
|
|
||||||
Instructions:
|
|
||||||
1. Copy the android-project directory wherever you want to keep your projects
|
|
||||||
and rename it to the name of your project.
|
|
||||||
2. Rename "<project>/jni/src/Android_static.mk" to "<project>/jni/src/Android.mk"
|
|
||||||
(overwrite the existing one)
|
|
||||||
3. Edit "<project>/jni/src/Android.mk" to include your source files
|
|
||||||
4. create and export an environment variable named NDK_MODULE_PATH that points
|
|
||||||
to the parent directory of this SDL directory. e.g.:
|
|
||||||
|
|
||||||
export NDK_MODULE_PATH="$PWD"/..
|
|
||||||
|
|
||||||
5. Edit "<project>/src/org/libsdl/app/SDLActivity.java" and remove the call to
|
|
||||||
System.loadLibrary("SDL2").
|
|
||||||
6. Run 'ndk-build' (a script provided by the NDK). This compiles the C source
|
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
|
@ -171,25 +131,23 @@ Here's an example of a minimal class file:
|
||||||
Then replace "SDLActivity" in AndroidManifest.xml with the name of your
|
Then replace "SDLActivity" in AndroidManifest.xml with the name of your
|
||||||
class, .e.g. "MyGame"
|
class, .e.g. "MyGame"
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
Customizing your application icon
|
Customizing your application icon
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
Conceptually changing your icon is just replacing the "ic_launcher.png" files in
|
Conceptually changing your icon is just replacing the "ic_launcher.png" files in
|
||||||
the drawable directories under the res directory. There are four directories for
|
the drawable directories under the res directory. There are several directories
|
||||||
different screen sizes. These can be replaced with one dir called "drawable",
|
for different screen sizes.
|
||||||
containing an icon file "ic_launcher.png" with dimensions 48x48 or 72x72.
|
|
||||||
|
|
||||||
You may need to change the name of your icon in AndroidManifest.xml to match
|
|
||||||
this icon filename.
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
Loading assets
|
Loading assets
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
Any files you put in the "assets" directory of your android-project directory
|
Any files you put in the "app/src/main/assets" directory of your project
|
||||||
will get bundled into the application package and you can load them using the
|
directory will get bundled into the application package and you can load
|
||||||
standard functions in SDL_rwops.h.
|
them using the standard functions in SDL_rwops.h.
|
||||||
|
|
||||||
There are also a few Android specific functions that allow you to get other
|
There are also a few Android specific functions that allow you to get other
|
||||||
useful paths for saving and loading data:
|
useful paths for saving and loading data:
|
||||||
|
@ -211,6 +169,7 @@ disable this behaviour, see for example:
|
||||||
|
|
||||||
http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/
|
http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
Pause / Resume behaviour
|
Pause / Resume behaviour
|
||||||
================================================================================
|
================================================================================
|
||||||
|
@ -231,6 +190,7 @@ a specific message, (which is not yet implemented!) and restore your textures
|
||||||
manually or quit the app (which is actually the kind of behaviour you'll see
|
manually or quit the app (which is actually the kind of behaviour you'll see
|
||||||
under iOS, if the OS can not restore your GL context it will just kill your app)
|
under iOS, if the OS can not restore your GL context it will just kill your app)
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
Threads and the Java VM
|
Threads and the Java VM
|
||||||
================================================================================
|
================================================================================
|
||||||
|
@ -246,6 +206,7 @@ Android_JNI_SetupThread() before doing anything else otherwise SDL will attach
|
||||||
your thread automatically anyway (when you make an SDL call), but it'll never
|
your thread automatically anyway (when you make an SDL call), but it'll never
|
||||||
detach it.
|
detach it.
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
Using STL
|
Using STL
|
||||||
================================================================================
|
================================================================================
|
||||||
|
@ -253,34 +214,10 @@ detach it.
|
||||||
You can use STL in your project by creating an Application.mk file in the jni
|
You can use STL in your project by creating an Application.mk file in the jni
|
||||||
folder and adding the following line:
|
folder and adding the following line:
|
||||||
|
|
||||||
APP_STL := stlport_static
|
APP_STL := c++_shared
|
||||||
|
|
||||||
For more information check out CPLUSPLUS-SUPPORT.html in the NDK documentation.
|
For more information go here:
|
||||||
|
https://developer.android.com/ndk/guides/cpp-support
|
||||||
================================================================================
|
|
||||||
Additional documentation
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
The documentation in the NDK docs directory is very helpful in understanding the
|
|
||||||
build process and how to work with native code on the Android platform.
|
|
||||||
|
|
||||||
The best place to start is with docs/OVERVIEW.TXT
|
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
Using Eclipse
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
First make sure that you've installed Eclipse and the Android extensions as described here:
|
|
||||||
https://developer.android.com/tools/sdk/eclipse-adt.html
|
|
||||||
|
|
||||||
Once you've copied the SDL android project and customized it, you can create an Eclipse project from it:
|
|
||||||
* File -> New -> Other
|
|
||||||
* Select the Android -> Android Project wizard and click Next
|
|
||||||
* Enter the name you'd like your project to have
|
|
||||||
* Select "Create project from existing source" and browse for your project directory
|
|
||||||
* Make sure the Build Target is set to Android 3.1 (API 12)
|
|
||||||
* Click Finish
|
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
|
@ -295,13 +232,11 @@ Especially useful is the info on setting up OpenGL ES 2.0 emulation.
|
||||||
Notice that this software emulator is incredibly slow and needs a lot of disk space.
|
Notice that this software emulator is incredibly slow and needs a lot of disk space.
|
||||||
Using a real device works better.
|
Using a real device works better.
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
Troubleshooting
|
Troubleshooting
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
You can create and run an emulator from the Eclipse IDE:
|
|
||||||
* Window -> Android SDK and AVD Manager
|
|
||||||
|
|
||||||
You can see if adb can see any devices with the following command:
|
You can see if adb can see any devices with the following command:
|
||||||
|
|
||||||
adb devices
|
adb devices
|
||||||
|
@ -338,7 +273,10 @@ You can see the complete command line that ndk-build is using by passing V=1 on
|
||||||
|
|
||||||
ndk-build V=1
|
ndk-build V=1
|
||||||
|
|
||||||
If your application crashes in native code, you can use addr2line to convert the
|
If your application crashes in native code, you can use ndk-stack to get a symbolic stack trace:
|
||||||
|
https://developer.android.com/ndk/guides/ndk-stack
|
||||||
|
|
||||||
|
If you want to go through the process manually, you can use addr2line to convert the
|
||||||
addresses in the stack trace to lines in your code.
|
addresses in the stack trace to lines in your code.
|
||||||
|
|
||||||
For example, if your crash looks like this:
|
For example, if your crash looks like this:
|
||||||
|
@ -426,36 +364,30 @@ When you're done instrumenting with valgrind, you can disable the wrapper:
|
||||||
|
|
||||||
adb shell setprop wrap.org.libsdl.app ""
|
adb shell setprop wrap.org.libsdl.app ""
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
Graphics debugging
|
Graphics debugging
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
If you are developing on a compatible Tegra-based tablet, NVidia provides
|
If you are developing on a compatible Tegra-based tablet, NVidia provides
|
||||||
Tegra Graphics Debugger at their website. Because SDL2 dynamically loads EGL
|
Tegra Graphics Debugger at their website. Because SDL2 dynamically loads EGL
|
||||||
and GLES libraries, you must follow their instructions for installing the
|
and GLES libraries, you must follow their instructions for installing the
|
||||||
interposer library on a rooted device. The non-rooted instructions are not
|
interposer library on a rooted device. The non-rooted instructions are not
|
||||||
compatible with applications that use SDL2 for video.
|
compatible with applications that use SDL2 for video.
|
||||||
|
|
||||||
The Tegra Graphics Debugger is available from NVidia here:
|
The Tegra Graphics Debugger is available from NVidia here:
|
||||||
https://developer.nvidia.com/tegra-graphics-debugger
|
https://developer.nvidia.com/tegra-graphics-debugger
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
Why is API level 10 the minimum required?
|
Why is API level 14 the minimum required?
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
API level 10 is the minimum required level at runtime (that is, on the device)
|
The latest NDK toolchain doesn't support targeting earlier than API level 14.
|
||||||
because SDL requires some functionality for running not
|
|
||||||
available on older devices. Since the incorporation of joystick support into SDL,
|
|
||||||
the minimum SDK required to *build* SDL is version 12. Devices running API levels
|
|
||||||
10-11 are still supported, only with the joystick functionality disabled.
|
|
||||||
|
|
||||||
Support for native OpenGL ES and ES2 applications was introduced in the NDK for
|
|
||||||
API level 4 and 8. EGL was made a stable API in the NDK for API level 9, which
|
|
||||||
has since then been obsoleted, with the recommendation to developers to bump the
|
|
||||||
required API level to 10.
|
|
||||||
As of this writing, according to https://developer.android.com/about/dashboards/index.html
|
As of this writing, according to https://developer.android.com/about/dashboards/index.html
|
||||||
about 90% of the Android devices accessing Google Play support API level 10 or
|
about 99% of the Android devices accessing Google Play support API level 14 or
|
||||||
higher (March 2013).
|
higher (October 2017).
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
A note regarding the use of the "dirty rectangles" rendering technique
|
A note regarding the use of the "dirty rectangles" rendering technique
|
||||||
|
@ -475,6 +407,7 @@ screen each frame.
|
||||||
|
|
||||||
Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html
|
Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
Known issues
|
Known issues
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
|
@ -64,7 +64,7 @@ level of indirection, we can do things like this:
|
||||||
export SDL_DYNAMIC_API=/my/actual/libSDL-2.0.so.0
|
export SDL_DYNAMIC_API=/my/actual/libSDL-2.0.so.0
|
||||||
./MyGameThatIsStaticallyLinkedToSDL2
|
./MyGameThatIsStaticallyLinkedToSDL2
|
||||||
|
|
||||||
And now, this game that is staticallly linked to SDL, can still be overridden
|
And now, this game that is statically linked to SDL, can still be overridden
|
||||||
with a newer, or better, SDL. The statically linked one will only be used as
|
with a newer, or better, SDL. The statically linked one will only be used as
|
||||||
far as calling into the jump table in this case. But in cases where no override
|
far as calling into the jump table in this case. But in cases where no override
|
||||||
is desired, the statically linked version will provide its own jump table,
|
is desired, the statically linked version will provide its own jump table,
|
||||||
|
|
|
@ -27,6 +27,16 @@ OpenGL ES 2.x, it usually comes pre-installed, but in any case:
|
||||||
|
|
||||||
sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev
|
sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev
|
||||||
|
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
NEON
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
If your Pi has NEON support, make sure you add -mfpu=neon to your CFLAGS so
|
||||||
|
that SDL will select some otherwise-disabled highly-optimized code. The
|
||||||
|
original Pi units don't have NEON, the Pi2 probably does, and the Pi3
|
||||||
|
definitely does.
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
Cross compiling from x86 Linux
|
Cross compiling from x86 Linux
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
|
@ -23,7 +23,7 @@ Requirements
|
||||||
typically do not include support for creating WinRT apps, to note.
|
typically do not include support for creating WinRT apps, to note.
|
||||||
(The "Community" editions of Visual C++ do, however, support both
|
(The "Community" editions of Visual C++ do, however, support both
|
||||||
desktop/Win32 and WinRT development).
|
desktop/Win32 and WinRT development).
|
||||||
- Visual Studio 2017 can be used, however it is recommented that you install
|
- Visual Studio 2017 can be used, however it is recommended that you install
|
||||||
the Visual C++ 2015 build tools. These build tools can be installed
|
the Visual C++ 2015 build tools. These build tools can be installed
|
||||||
using VS 2017's installer. Be sure to also install the workload for
|
using VS 2017's installer. Be sure to also install the workload for
|
||||||
"Universal Windows Platform development", its optional component, the
|
"Universal Windows Platform development", its optional component, the
|
||||||
|
@ -33,7 +33,7 @@ Requirements
|
||||||
earlier versions of Windows, such as Windows 7, is not always supported
|
earlier versions of Windows, such as Windows 7, is not always supported
|
||||||
by Visual Studio, and you may get error(s) when attempting to do so.
|
by Visual Studio, and you may get error(s) when attempting to do so.
|
||||||
- Visual C++ 2012 can only build apps that target versions 8.0 of Windows,
|
- Visual C++ 2012 can only build apps that target versions 8.0 of Windows,
|
||||||
or Windows Phone. 8.0-targetted apps will run on devices running 8.1
|
or Windows Phone. 8.0-targeted apps will run on devices running 8.1
|
||||||
editions of Windows, however they will not be able to take advantage of
|
editions of Windows, however they will not be able to take advantage of
|
||||||
8.1-specific features.
|
8.1-specific features.
|
||||||
- Visual C++ 2013 cannot create app projects that target Windows 8.0.
|
- Visual C++ 2013 cannot create app projects that target Windows 8.0.
|
||||||
|
@ -54,7 +54,7 @@ Requirements
|
||||||
Status
|
Status
|
||||||
------
|
------
|
||||||
|
|
||||||
Here is a rough list of what works, and what doens't:
|
Here is a rough list of what works, and what doesn't:
|
||||||
|
|
||||||
* What works:
|
* What works:
|
||||||
* compilation via Visual C++ 2012 through 2015
|
* compilation via Visual C++ 2012 through 2015
|
||||||
|
@ -70,7 +70,10 @@ Here is a rough list of what works, and what doens't:
|
||||||
SDL_GetPerformanceFrequency(), etc.)
|
SDL_GetPerformanceFrequency(), etc.)
|
||||||
* file I/O via SDL_RWops
|
* file I/O via SDL_RWops
|
||||||
* mouse input (unsupported on Windows Phone)
|
* mouse input (unsupported on Windows Phone)
|
||||||
* audio, via a modified version of SDL's XAudio2 backend
|
* audio, via SDL's WASAPI backend (if you want to record, your app must
|
||||||
|
have "Microphone" capabilities enabled in its manifest, and the user must
|
||||||
|
not have blocked access. Otherwise, capture devices will fail to work,
|
||||||
|
presenting as a device disconnect shortly after opening it.)
|
||||||
* .DLL file loading. Libraries *MUST* be packaged inside applications. Loading
|
* .DLL file loading. Libraries *MUST* be packaged inside applications. Loading
|
||||||
anything outside of the app is not supported.
|
anything outside of the app is not supported.
|
||||||
* system path retrieval via SDL's filesystem APIs
|
* system path retrieval via SDL's filesystem APIs
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
prefix=/usr/local/i686-w64-mingw32
|
prefix=/opt/local/i686-w64-mingw32
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
exec_prefix_set=no
|
exec_prefix_set=no
|
||||||
libdir=${exec_prefix}/lib
|
libdir=${exec_prefix}/lib
|
||||||
|
@ -39,17 +39,17 @@ while test $# -gt 0; do
|
||||||
echo $exec_prefix
|
echo $exec_prefix
|
||||||
;;
|
;;
|
||||||
--version)
|
--version)
|
||||||
echo 2.0.7
|
echo 2.0.9
|
||||||
;;
|
;;
|
||||||
--cflags)
|
--cflags)
|
||||||
echo -I${prefix}/include/SDL2 -Dmain=SDL_main
|
echo -I${prefix}/include/SDL2 -Dmain=SDL_main
|
||||||
;;
|
;;
|
||||||
--libs)
|
--libs)
|
||||||
echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows
|
echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows
|
||||||
;;
|
;;
|
||||||
--static-libs)
|
--static-libs)
|
||||||
# --libs|--static-libs)
|
# --libs|--static-libs)
|
||||||
echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc
|
echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -static-libgcc
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "${usage}" 1>&2
|
echo "${usage}" 1>&2
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -51,6 +51,7 @@
|
||||||
#include "SDL_power.h"
|
#include "SDL_power.h"
|
||||||
#include "SDL_render.h"
|
#include "SDL_render.h"
|
||||||
#include "SDL_rwops.h"
|
#include "SDL_rwops.h"
|
||||||
|
#include "SDL_sensor.h"
|
||||||
#include "SDL_shape.h"
|
#include "SDL_shape.h"
|
||||||
#include "SDL_system.h"
|
#include "SDL_system.h"
|
||||||
#include "SDL_thread.h"
|
#include "SDL_thread.h"
|
||||||
|
@ -80,10 +81,11 @@ extern "C" {
|
||||||
#define SDL_INIT_HAPTIC 0x00001000u
|
#define SDL_INIT_HAPTIC 0x00001000u
|
||||||
#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
|
#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
|
||||||
#define SDL_INIT_EVENTS 0x00004000u
|
#define SDL_INIT_EVENTS 0x00004000u
|
||||||
|
#define SDL_INIT_SENSOR 0x00008000u
|
||||||
#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
|
#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
|
||||||
#define SDL_INIT_EVERYTHING ( \
|
#define SDL_INIT_EVERYTHING ( \
|
||||||
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
|
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
|
||||||
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
|
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
|
||||||
)
|
)
|
||||||
/* @} */
|
/* @} */
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -158,6 +158,9 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
||||||
#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
|
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||||
|
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||||
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||||
|
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||||
#elif defined(__GNUC__) && defined(__arm__)
|
#elif defined(__GNUC__) && defined(__arm__)
|
||||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
|
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
|
||||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -140,7 +140,8 @@ typedef Uint16 SDL_AudioFormat;
|
||||||
#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001
|
#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001
|
||||||
#define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002
|
#define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002
|
||||||
#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004
|
#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004
|
||||||
#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE)
|
#define SDL_AUDIO_ALLOW_SAMPLES_CHANGE 0x00000008
|
||||||
|
#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE|SDL_AUDIO_ALLOW_SAMPLES_CHANGE)
|
||||||
/* @} */
|
/* @} */
|
||||||
|
|
||||||
/* @} *//* Audio flags */
|
/* @} *//* Audio flags */
|
||||||
|
@ -527,7 +528,7 @@ extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioForm
|
||||||
*
|
*
|
||||||
* \param stream The stream the audio data is being added to
|
* \param stream The stream the audio data is being added to
|
||||||
* \param buf A pointer to the audio data to add
|
* \param buf A pointer to the audio data to add
|
||||||
* \param int The number of bytes to write to the stream
|
* \param len The number of bytes to write to the stream
|
||||||
* \return 0 on success, or -1 on error.
|
* \return 0 on success, or -1 on error.
|
||||||
*
|
*
|
||||||
* \sa SDL_NewAudioStream
|
* \sa SDL_NewAudioStream
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -82,6 +82,9 @@ typedef unsigned int uintptr_t;
|
||||||
#define HAVE_DSOUND_H 1
|
#define HAVE_DSOUND_H 1
|
||||||
#define HAVE_DXGI_H 1
|
#define HAVE_DXGI_H 1
|
||||||
#define HAVE_XINPUT_H 1
|
#define HAVE_XINPUT_H 1
|
||||||
|
#define HAVE_MMDEVICEAPI_H 1
|
||||||
|
#define HAVE_AUDIOCLIENT_H 1
|
||||||
|
#define HAVE_ENDPOINTVOLUME_H 1
|
||||||
|
|
||||||
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
||||||
#ifdef HAVE_LIBC
|
#ifdef HAVE_LIBC
|
||||||
|
@ -109,13 +112,15 @@ typedef unsigned int uintptr_t;
|
||||||
#define HAVE_MEMCMP 1
|
#define HAVE_MEMCMP 1
|
||||||
#define HAVE_STRLEN 1
|
#define HAVE_STRLEN 1
|
||||||
#define HAVE__STRREV 1
|
#define HAVE__STRREV 1
|
||||||
#define HAVE__STRUPR 1
|
/* These functions have security warnings, so we won't use them */
|
||||||
#define HAVE__STRLWR 1
|
/* #undef HAVE__STRUPR */
|
||||||
|
/* #undef HAVE__STRLWR */
|
||||||
#define HAVE_STRCHR 1
|
#define HAVE_STRCHR 1
|
||||||
#define HAVE_STRRCHR 1
|
#define HAVE_STRRCHR 1
|
||||||
#define HAVE_STRSTR 1
|
#define HAVE_STRSTR 1
|
||||||
#define HAVE__LTOA 1
|
/* These functions have security warnings, so we won't use them */
|
||||||
#define HAVE__ULTOA 1
|
/* #undef HAVE__LTOA */
|
||||||
|
/* #undef HAVE__ULTOA */
|
||||||
#define HAVE_STRTOL 1
|
#define HAVE_STRTOL 1
|
||||||
#define HAVE_STRTOUL 1
|
#define HAVE_STRTOUL 1
|
||||||
#define HAVE_STRTOD 1
|
#define HAVE_STRTOD 1
|
||||||
|
@ -125,30 +130,45 @@ typedef unsigned int uintptr_t;
|
||||||
#define HAVE_STRNCMP 1
|
#define HAVE_STRNCMP 1
|
||||||
#define HAVE__STRICMP 1
|
#define HAVE__STRICMP 1
|
||||||
#define HAVE__STRNICMP 1
|
#define HAVE__STRNICMP 1
|
||||||
#define HAVE_ATAN 1
|
#define HAVE_ACOS 1
|
||||||
#define HAVE_ATAN2 1
|
#define HAVE_ACOSF 1
|
||||||
#define HAVE_ACOS 1
|
#define HAVE_ASIN 1
|
||||||
#define HAVE_ASIN 1
|
#define HAVE_ASINF 1
|
||||||
#define HAVE_CEIL 1
|
#define HAVE_ATAN 1
|
||||||
#define HAVE_COS 1
|
#define HAVE_ATANF 1
|
||||||
#define HAVE_COSF 1
|
#define HAVE_ATAN2 1
|
||||||
#define HAVE_FABS 1
|
#define HAVE_ATAN2F 1
|
||||||
#define HAVE_FLOOR 1
|
#define HAVE_CEILF 1
|
||||||
#define HAVE_LOG 1
|
#define HAVE__COPYSIGN 1
|
||||||
#define HAVE_POW 1
|
#define HAVE_COS 1
|
||||||
#define HAVE_SIN 1
|
#define HAVE_COSF 1
|
||||||
#define HAVE_SINF 1
|
#define HAVE_EXP 1
|
||||||
#define HAVE_SQRT 1
|
#define HAVE_EXPF 1
|
||||||
#define HAVE_SQRTF 1
|
#define HAVE_FABS 1
|
||||||
#define HAVE_TAN 1
|
#define HAVE_FABSF 1
|
||||||
#define HAVE_TANF 1
|
#define HAVE_FLOOR 1
|
||||||
#define HAVE__COPYSIGN 1
|
#define HAVE_FLOORF 1
|
||||||
|
#define HAVE_FMOD 1
|
||||||
|
#define HAVE_FMODF 1
|
||||||
|
#define HAVE_LOG 1
|
||||||
|
#define HAVE_LOGF 1
|
||||||
|
#define HAVE_LOG10 1
|
||||||
|
#define HAVE_LOG10F 1
|
||||||
|
#define HAVE_POW 1
|
||||||
|
#define HAVE_POWF 1
|
||||||
|
#define HAVE_SIN 1
|
||||||
|
#define HAVE_SINF 1
|
||||||
|
#define HAVE_SQRT 1
|
||||||
|
#define HAVE_SQRTF 1
|
||||||
|
#define HAVE_TAN 1
|
||||||
|
#define HAVE_TANF 1
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
/* These functions were added with the VC++ 2013 C runtime library */
|
/* These functions were added with the VC++ 2013 C runtime library */
|
||||||
#if _MSC_VER >= 1800
|
#if _MSC_VER >= 1800
|
||||||
#define HAVE_STRTOLL 1
|
#define HAVE_STRTOLL 1
|
||||||
#define HAVE_VSSCANF 1
|
#define HAVE_VSSCANF 1
|
||||||
#define HAVE_SCALBN 1
|
#define HAVE_SCALBN 1
|
||||||
|
#define HAVE_SCALBNF 1
|
||||||
#endif
|
#endif
|
||||||
/* This function is available with at least the VC++ 2008 C runtime library */
|
/* This function is available with at least the VC++ 2008 C runtime library */
|
||||||
#if _MSC_VER >= 1400
|
#if _MSC_VER >= 1400
|
||||||
|
@ -166,7 +186,6 @@ typedef unsigned int uintptr_t;
|
||||||
/* Enable various audio drivers */
|
/* Enable various audio drivers */
|
||||||
#define SDL_AUDIO_DRIVER_WASAPI 1
|
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||||
#define SDL_AUDIO_DRIVER_DSOUND 1
|
#define SDL_AUDIO_DRIVER_DSOUND 1
|
||||||
#define SDL_AUDIO_DRIVER_XAUDIO2 0
|
|
||||||
#define SDL_AUDIO_DRIVER_WINMM 1
|
#define SDL_AUDIO_DRIVER_WINMM 1
|
||||||
#define SDL_AUDIO_DRIVER_DISK 1
|
#define SDL_AUDIO_DRIVER_DISK 1
|
||||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||||
|
@ -174,9 +193,13 @@ typedef unsigned int uintptr_t;
|
||||||
/* Enable various input drivers */
|
/* Enable various input drivers */
|
||||||
#define SDL_JOYSTICK_DINPUT 1
|
#define SDL_JOYSTICK_DINPUT 1
|
||||||
#define SDL_JOYSTICK_XINPUT 1
|
#define SDL_JOYSTICK_XINPUT 1
|
||||||
|
#define SDL_JOYSTICK_HIDAPI 1
|
||||||
#define SDL_HAPTIC_DINPUT 1
|
#define SDL_HAPTIC_DINPUT 1
|
||||||
#define SDL_HAPTIC_XINPUT 1
|
#define SDL_HAPTIC_XINPUT 1
|
||||||
|
|
||||||
|
/* Enable the dummy sensor driver */
|
||||||
|
#define SDL_SENSOR_DUMMY 1
|
||||||
|
|
||||||
/* Enable various shared object loading systems */
|
/* Enable various shared object loading systems */
|
||||||
#define SDL_LOADSO_WINDOWS 1
|
#define SDL_LOADSO_WINDOWS 1
|
||||||
|
|
||||||
|
@ -194,7 +217,7 @@ typedef unsigned int uintptr_t;
|
||||||
#define SDL_VIDEO_RENDER_D3D 1
|
#define SDL_VIDEO_RENDER_D3D 1
|
||||||
#endif
|
#endif
|
||||||
#ifndef SDL_VIDEO_RENDER_D3D11
|
#ifndef SDL_VIDEO_RENDER_D3D11
|
||||||
#define SDL_VIDEO_RENDER_D3D11 0
|
#define SDL_VIDEO_RENDER_D3D11 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Enable OpenGL support */
|
/* Enable OpenGL support */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -51,27 +51,35 @@
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
#else
|
#else
|
||||||
#ifdef __ALTIVEC__
|
#ifdef __ALTIVEC__
|
||||||
#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__)
|
#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
|
||||||
#include <altivec.h>
|
#include <altivec.h>
|
||||||
#undef pixel
|
#undef pixel
|
||||||
|
#undef bool
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef __MMX__
|
#if defined(__ARM_NEON__) && !defined(SDL_DISABLE_ARM_NEON_H)
|
||||||
#include <mmintrin.h>
|
#include <arm_neon.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __3dNOW__
|
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
|
||||||
#include <mm3dnow.h>
|
#include <mm3dnow.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __SSE__
|
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
|
||||||
|
#include <immintrin.h>
|
||||||
|
#else
|
||||||
|
#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
|
||||||
|
#include <mmintrin.h>
|
||||||
|
#endif
|
||||||
|
#if defined(__SSE__) && !defined(SDL_DISABLE_XMMINTRIN_H)
|
||||||
#include <xmmintrin.h>
|
#include <xmmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __SSE2__
|
#if defined(__SSE2__) && !defined(SDL_DISABLE_EMMINTRIN_H)
|
||||||
#include <emmintrin.h>
|
#include <emmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __SSE3__
|
#if defined(__SSE3__) && !defined(SDL_DISABLE_PMMINTRIN_H)
|
||||||
#include <pmmintrin.h>
|
#include <pmmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif /* HAVE_IMMINTRIN_H */
|
||||||
|
#endif /* compiler version */
|
||||||
|
|
||||||
#include "begin_code.h"
|
#include "begin_code.h"
|
||||||
/* Set up for C function definitions, even when using C++ */
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
@ -154,6 +162,11 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function returns true if the CPU has AVX-512F (foundation) features.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function returns true if the CPU has NEON (ARM SIMD) features.
|
* This function returns true if the CPU has NEON (ARM SIMD) features.
|
||||||
*/
|
*/
|
||||||
|
@ -164,7 +177,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
||||||
|
|
||||||
|
|
||||||
/* Ends C function definitions when using C++ */
|
/* Ends C function definitions when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
*
|
*
|
||||||
* This is a simple file to encapsulate the EGL API headers.
|
* This is a simple file to encapsulate the EGL API headers.
|
||||||
*/
|
*/
|
||||||
#ifndef _MSC_VER
|
#if !defined(_MSC_VER) && !defined(__ANDROID__)
|
||||||
|
|
||||||
#include <EGL/egl.h>
|
#include <EGL/egl.h>
|
||||||
#include <EGL/eglext.h>
|
#include <EGL/eglext.h>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -85,6 +85,9 @@ typedef enum
|
||||||
Called on Android in onResume()
|
Called on Android in onResume()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Display events */
|
||||||
|
SDL_DISPLAYEVENT = 0x150, /**< Display state change */
|
||||||
|
|
||||||
/* Window events */
|
/* Window events */
|
||||||
SDL_WINDOWEVENT = 0x200, /**< Window state change */
|
SDL_WINDOWEVENT = 0x200, /**< Window state change */
|
||||||
SDL_SYSWMEVENT, /**< System specific event */
|
SDL_SYSWMEVENT, /**< System specific event */
|
||||||
|
@ -144,6 +147,9 @@ typedef enum
|
||||||
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
|
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
|
||||||
SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */
|
SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */
|
||||||
|
|
||||||
|
/* Sensor events */
|
||||||
|
SDL_SENSORUPDATE = 0x1200, /**< A sensor was updated */
|
||||||
|
|
||||||
/* Render events */
|
/* Render events */
|
||||||
SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
|
SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
|
||||||
SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
|
SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
|
||||||
|
@ -168,6 +174,21 @@ typedef struct SDL_CommonEvent
|
||||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||||
} SDL_CommonEvent;
|
} SDL_CommonEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Display state change event data (event.display.*)
|
||||||
|
*/
|
||||||
|
typedef struct SDL_DisplayEvent
|
||||||
|
{
|
||||||
|
Uint32 type; /**< ::SDL_DISPLAYEVENT */
|
||||||
|
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||||
|
Uint32 display; /**< The associated display index */
|
||||||
|
Uint8 event; /**< ::SDL_DisplayEventID */
|
||||||
|
Uint8 padding1;
|
||||||
|
Uint8 padding2;
|
||||||
|
Uint8 padding3;
|
||||||
|
Sint32 data1; /**< event dependent data */
|
||||||
|
} SDL_DisplayEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Window state change event data (event.window.*)
|
* \brief Window state change event data (event.window.*)
|
||||||
*/
|
*/
|
||||||
|
@ -471,6 +492,17 @@ typedef struct SDL_DropEvent
|
||||||
} SDL_DropEvent;
|
} SDL_DropEvent;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Sensor event structure (event.sensor.*)
|
||||||
|
*/
|
||||||
|
typedef struct SDL_SensorEvent
|
||||||
|
{
|
||||||
|
Uint32 type; /**< ::SDL_SENSORUPDATE */
|
||||||
|
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||||
|
Sint32 which; /**< The instance ID of the sensor */
|
||||||
|
float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */
|
||||||
|
} SDL_SensorEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief The "quit requested" event
|
* \brief The "quit requested" event
|
||||||
*/
|
*/
|
||||||
|
@ -526,6 +558,7 @@ typedef union SDL_Event
|
||||||
{
|
{
|
||||||
Uint32 type; /**< Event type, shared with all events */
|
Uint32 type; /**< Event type, shared with all events */
|
||||||
SDL_CommonEvent common; /**< Common event data */
|
SDL_CommonEvent common; /**< Common event data */
|
||||||
|
SDL_DisplayEvent display; /**< Window event data */
|
||||||
SDL_WindowEvent window; /**< Window event data */
|
SDL_WindowEvent window; /**< Window event data */
|
||||||
SDL_KeyboardEvent key; /**< Keyboard event data */
|
SDL_KeyboardEvent key; /**< Keyboard event data */
|
||||||
SDL_TextEditingEvent edit; /**< Text editing event data */
|
SDL_TextEditingEvent edit; /**< Text editing event data */
|
||||||
|
@ -542,6 +575,7 @@ typedef union SDL_Event
|
||||||
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
|
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
|
||||||
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
|
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
|
||||||
SDL_AudioDeviceEvent adevice; /**< Audio device event data */
|
SDL_AudioDeviceEvent adevice; /**< Audio device event data */
|
||||||
|
SDL_SensorEvent sensor; /**< Sensor event data */
|
||||||
SDL_QuitEvent quit; /**< Quit request event data */
|
SDL_QuitEvent quit; /**< Quit request event data */
|
||||||
SDL_UserEvent user; /**< Custom event data */
|
SDL_UserEvent user; /**< Custom event data */
|
||||||
SDL_SysWMEvent syswm; /**< System dependent window event data */
|
SDL_SysWMEvent syswm; /**< System dependent window event data */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -175,6 +175,14 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
|
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the mapping of a game controller.
|
||||||
|
* This can be called before any controllers are opened.
|
||||||
|
*
|
||||||
|
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
|
||||||
|
*/
|
||||||
|
extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open a game controller for use.
|
* Open a game controller for use.
|
||||||
* The index passed as an argument refers to the N'th game controller on the system.
|
* The index passed as an argument refers to the N'th game controller on the system.
|
||||||
|
@ -196,6 +204,13 @@ extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
|
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the player index of an opened game controller, or -1 if it's not available
|
||||||
|
*
|
||||||
|
* For XInput controllers this returns the XInput user index.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the USB vendor ID of an opened controller, if available.
|
* Get the USB vendor ID of an opened controller, if available.
|
||||||
* If the vendor ID isn't available this function returns 0.
|
* If the vendor ID isn't available this function returns 0.
|
||||||
|
@ -345,6 +360,19 @@ SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
|
||||||
extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
|
extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
|
||||||
SDL_GameControllerButton button);
|
SDL_GameControllerButton button);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Trigger a rumble effect
|
||||||
|
* Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.
|
||||||
|
*
|
||||||
|
* \param gamecontroller The controller to vibrate
|
||||||
|
* \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF
|
||||||
|
* \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF
|
||||||
|
* \param duration_ms The duration of the rumble effect, in milliseconds
|
||||||
|
*
|
||||||
|
* \return 0, or -1 if rumble isn't supported on this joystick
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close a controller previously opened with SDL_GameControllerOpen().
|
* Close a controller previously opened with SDL_GameControllerOpen().
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -117,6 +117,17 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/* FIXME: For SDL 2.1, adjust all the magnitude variables to be Uint16 (0xFFFF).
|
||||||
|
*
|
||||||
|
* At the moment the magnitude variables are mixed between signed/unsigned, and
|
||||||
|
* it is also not made clear that ALL of those variables expect a max of 0x7FFF.
|
||||||
|
*
|
||||||
|
* Some platforms may have higher precision than that (Linux FF, Windows XInput)
|
||||||
|
* so we should fix the inconsistency in favor of higher possible precision,
|
||||||
|
* adjusting for platforms that use different scales.
|
||||||
|
* -flibit
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \typedef SDL_Haptic
|
* \typedef SDL_Haptic
|
||||||
*
|
*
|
||||||
|
@ -656,8 +667,8 @@ typedef struct SDL_HapticRamp
|
||||||
* This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.
|
* This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.
|
||||||
*
|
*
|
||||||
* The Left/Right effect is used to explicitly control the large and small
|
* The Left/Right effect is used to explicitly control the large and small
|
||||||
* motors, commonly found in modern game controllers. One motor is high
|
* motors, commonly found in modern game controllers. The small (right) motor
|
||||||
* frequency, the other is low frequency.
|
* is high frequency, and the large (left) motor is low frequency.
|
||||||
*
|
*
|
||||||
* \sa SDL_HAPTIC_LEFTRIGHT
|
* \sa SDL_HAPTIC_LEFTRIGHT
|
||||||
* \sa SDL_HapticEffect
|
* \sa SDL_HapticEffect
|
||||||
|
@ -668,7 +679,7 @@ typedef struct SDL_HapticLeftRight
|
||||||
Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */
|
Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */
|
||||||
|
|
||||||
/* Replay */
|
/* Replay */
|
||||||
Uint32 length; /**< Duration of the effect. */
|
Uint32 length; /**< Duration of the effect in milliseconds. */
|
||||||
|
|
||||||
/* Rumble */
|
/* Rumble */
|
||||||
Uint16 large_magnitude; /**< Control of the large controller motor. */
|
Uint16 large_magnitude; /**< Control of the large controller motor. */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -76,6 +76,7 @@ extern "C" {
|
||||||
* "opengl"
|
* "opengl"
|
||||||
* "opengles2"
|
* "opengles2"
|
||||||
* "opengles"
|
* "opengles"
|
||||||
|
* "metal"
|
||||||
* "software"
|
* "software"
|
||||||
*
|
*
|
||||||
* The default varies by platform, but it's the first one in the list that
|
* The default varies by platform, but it's the first one in the list that
|
||||||
|
@ -210,6 +211,18 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
|
#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - Disable _NET_WM_BYPASS_COMPOSITOR
|
||||||
|
* "1" - Enable _NET_WM_BYPASS_COMPOSITOR
|
||||||
|
*
|
||||||
|
* By default SDL will use _NET_WM_BYPASS_COMPOSITOR
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
|
* \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
|
||||||
*
|
*
|
||||||
|
@ -249,6 +262,16 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
|
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable setting the double click time, in milliseconds.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable setting the double click radius, in pixels.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode
|
* \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode
|
||||||
*/
|
*/
|
||||||
|
@ -316,7 +339,7 @@ extern "C" {
|
||||||
#define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
|
#define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable controlling which orientations are allowed on iOS.
|
* \brief A variable controlling which orientations are allowed on iOS/Android.
|
||||||
*
|
*
|
||||||
* In some circumstances it is necessary to be able to explicitly control
|
* In some circumstances it is necessary to be able to explicitly control
|
||||||
* which UI orientations are allowed.
|
* which UI orientations are allowed.
|
||||||
|
@ -355,16 +378,36 @@ extern "C" {
|
||||||
#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
|
#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable controlling whether the Android / iOS built-in
|
* \brief A variable controlling whether the home indicator bar on iPhone X
|
||||||
* accelerometer should be listed as a joystick device, rather than listing
|
* should be hidden.
|
||||||
* actual joysticks only.
|
|
||||||
*
|
*
|
||||||
* This variable can be set to the following values:
|
* This variable can be set to the following values:
|
||||||
* "0" - List only real joysticks and accept input from them
|
* "0" - The indicator bar is not hidden (default for windowed applications)
|
||||||
* "1" - List real joysticks along with the accelerometer as if it were a 3 axis joystick (the default).
|
* "1" - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications)
|
||||||
|
* "2" - The indicator bar is dim and the first swipe makes it visible and the second swipe performs the "home" action (default for fullscreen applications)
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable controlling whether the Android / iOS built-in
|
||||||
|
* accelerometer should be listed as a joystick device.
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - The accelerometer is not listed as a joystick
|
||||||
|
* "1" - The accelerometer is available as a 3 axis joystick (the default).
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
|
#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable controlling whether the Android / tvOS remotes
|
||||||
|
* should be listed as joystick devices, instead of sending keyboard events.
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - Remotes send enter/escape/arrow key events
|
||||||
|
* "1" - Remotes are available as 2 axis, 2 button joysticks (the default).
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable that lets you disable the detection and use of Xinput gamepad devices
|
* \brief A variable that lets you disable the detection and use of Xinput gamepad devices
|
||||||
*
|
*
|
||||||
|
@ -432,6 +475,88 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
|
#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable controlling whether the HIDAPI joystick drivers should be used.
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - HIDAPI drivers are not used
|
||||||
|
* "1" - HIDAPI drivers are used (the default)
|
||||||
|
*
|
||||||
|
* This variable is the default for all drivers, but can be overridden by the hints for specific drivers below.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable controlling whether the HIDAPI driver for PS4 controllers should be used.
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - HIDAPI driver is not used
|
||||||
|
* "1" - HIDAPI driver is used
|
||||||
|
*
|
||||||
|
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver.
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - extended reports are not enabled (the default)
|
||||||
|
* "1" - extended reports
|
||||||
|
*
|
||||||
|
* Extended input reports allow rumble on Bluetooth PS4 controllers, but
|
||||||
|
* break DirectInput handling for applications that don't use SDL.
|
||||||
|
*
|
||||||
|
* Once extended reports are enabled, they can not be disabled without
|
||||||
|
* power cycling the controller.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable controlling whether the HIDAPI driver for Steam Controllers should be used.
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - HIDAPI driver is not used
|
||||||
|
* "1" - HIDAPI driver is used
|
||||||
|
*
|
||||||
|
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable controlling whether the HIDAPI driver for Nintendo Switch controllers should be used.
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - HIDAPI driver is not used
|
||||||
|
* "1" - HIDAPI driver is used
|
||||||
|
*
|
||||||
|
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable controlling whether the HIDAPI driver for XBox controllers should be used.
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - HIDAPI driver is not used
|
||||||
|
* "1" - HIDAPI driver is used
|
||||||
|
*
|
||||||
|
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
|
||||||
|
*
|
||||||
|
* The variable can be set to the following values:
|
||||||
|
* "0" - Do not scan for Steam Controllers
|
||||||
|
* "1" - Scan for Steam Controllers (the default)
|
||||||
|
*
|
||||||
|
* The default value is "1". This hint must be set before initializing the joystick subsystem.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
|
* \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
|
||||||
* This is a debugging aid for developers and not expected to be used by end users. The default is "1"
|
* This is a debugging aid for developers and not expected to be used by end users. The default is "1"
|
||||||
|
@ -494,6 +619,10 @@ extern "C" {
|
||||||
* This is specially useful if you build SDL against a non glibc libc library (such as musl) which
|
* This is specially useful if you build SDL against a non glibc libc library (such as musl) which
|
||||||
* provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
|
* provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
|
||||||
* Support for this hint is currently available only in the pthread, Windows, and PSP backend.
|
* Support for this hint is currently available only in the pthread, Windows, and PSP backend.
|
||||||
|
*
|
||||||
|
* Instead of this hint, in 2.0.9 and later, you can use
|
||||||
|
* SDL_CreateThreadWithStackSize(). This hint only works with the classic
|
||||||
|
* SDL_CreateThread().
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
|
#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
|
||||||
|
|
||||||
|
@ -719,6 +848,35 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH"
|
#define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable to control whether we trap the Android back button to handle it manually.
|
||||||
|
* This is necessary for the right mouse button to work on some Android devices, or
|
||||||
|
* to be able to trap the back button for use in your code reliably. If set to true,
|
||||||
|
* the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of
|
||||||
|
* SDL_SCANCODE_AC_BACK.
|
||||||
|
*
|
||||||
|
* The variable can be set to the following values:
|
||||||
|
* "0" - Back button will be handled as usual for system. (default)
|
||||||
|
* "1" - Back button will be trapped, allowing you to handle the key press
|
||||||
|
* manually. (This will also let right mouse click work on systems
|
||||||
|
* where the right mouse button functions as back.)
|
||||||
|
*
|
||||||
|
* The value of this hint is used at runtime, so it can be changed at any time.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable to control whether the return key on the soft keyboard
|
||||||
|
* should hide the soft keyboard on Android and iOS.
|
||||||
|
*
|
||||||
|
* The variable can be set to the following values:
|
||||||
|
* "0" - The return key will be handled as a key event. This is the behaviour of SDL <= 2.0.3. (default)
|
||||||
|
* "1" - The return key will hide the keyboard.
|
||||||
|
*
|
||||||
|
* The value of this hint is used at runtime, so it can be changed at any time.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief override the binding element for keyboard inputs for Emscripten builds
|
* \brief override the binding element for keyboard inputs for Emscripten builds
|
||||||
*
|
*
|
||||||
|
@ -752,7 +910,7 @@ extern "C" {
|
||||||
* "0" - SDL will generate a window-close event when it sees Alt+F4.
|
* "0" - SDL will generate a window-close event when it sees Alt+F4.
|
||||||
* "1" - SDL will only do normal key handling for Alt+F4.
|
* "1" - SDL will only do normal key handling for Alt+F4.
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
|
#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
|
* \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
|
||||||
|
@ -797,6 +955,24 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
|
#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Tell the video driver that we only want a double buffer.
|
||||||
|
*
|
||||||
|
* By default, most lowlevel 2D APIs will use a triple buffer scheme that
|
||||||
|
* wastes no CPU time on waiting for vsync after issuing a flip, but
|
||||||
|
* introduces a frame of latency. On the other hand, using a double buffer
|
||||||
|
* scheme instead is recommended for cases where low latency is an important
|
||||||
|
* factor because we save a whole frame of latency.
|
||||||
|
* We do so by waiting for vsync immediately after issuing a flip, usually just
|
||||||
|
* after eglSwapBuffers call in the backend's *_SwapWindow function.
|
||||||
|
*
|
||||||
|
* Since it's driver-specific, it's only supported where possible and
|
||||||
|
* implemented. Currently supported the following drivers:
|
||||||
|
* - KMSDRM (kmsdrm)
|
||||||
|
* - Raspberry Pi (raspberrypi)
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable controlling what driver to use for OpenGL ES contexts.
|
* \brief A variable controlling what driver to use for OpenGL ES contexts.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -97,10 +97,10 @@ typedef enum
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
SDL_JOYSTICK_POWER_UNKNOWN = -1,
|
SDL_JOYSTICK_POWER_UNKNOWN = -1,
|
||||||
SDL_JOYSTICK_POWER_EMPTY,
|
SDL_JOYSTICK_POWER_EMPTY, /* <= 5% */
|
||||||
SDL_JOYSTICK_POWER_LOW,
|
SDL_JOYSTICK_POWER_LOW, /* <= 20% */
|
||||||
SDL_JOYSTICK_POWER_MEDIUM,
|
SDL_JOYSTICK_POWER_MEDIUM, /* <= 70% */
|
||||||
SDL_JOYSTICK_POWER_FULL,
|
SDL_JOYSTICK_POWER_FULL, /* <= 100% */
|
||||||
SDL_JOYSTICK_POWER_WIRED,
|
SDL_JOYSTICK_POWER_WIRED,
|
||||||
SDL_JOYSTICK_POWER_MAX
|
SDL_JOYSTICK_POWER_MAX
|
||||||
} SDL_JoystickPowerLevel;
|
} SDL_JoystickPowerLevel;
|
||||||
|
@ -132,6 +132,12 @@ extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
|
extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the player index of a joystick, or -1 if it's not available
|
||||||
|
* This can be called before any joysticks are opened.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the GUID for the joystick at this index
|
* Return the GUID for the joystick at this index
|
||||||
* This can be called before any joysticks are opened.
|
* This can be called before any joysticks are opened.
|
||||||
|
@ -194,6 +200,13 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
|
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the player index of an opened joystick, or -1 if it's not available
|
||||||
|
*
|
||||||
|
* For XInput controllers this returns the XInput user index.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the GUID for this opened joystick
|
* Return the GUID for this opened joystick
|
||||||
*/
|
*/
|
||||||
|
@ -361,6 +374,19 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
|
||||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
|
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
|
||||||
int button);
|
int button);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Trigger a rumble effect
|
||||||
|
* Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.
|
||||||
|
*
|
||||||
|
* \param joystick The joystick to vibrate
|
||||||
|
* \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF
|
||||||
|
* \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF
|
||||||
|
* \param duration_ms The duration of the rumble effect, in milliseconds
|
||||||
|
*
|
||||||
|
* \return 0, or -1 if rumble isn't supported on this joystick
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close a joystick previously opened with SDL_JoystickOpen().
|
* Close a joystick previously opened with SDL_JoystickOpen().
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -63,10 +63,13 @@
|
||||||
/* On Android SDL provides a Java class in SDLActivity.java that is the
|
/* On Android SDL provides a Java class in SDLActivity.java that is the
|
||||||
main activity entry point.
|
main activity entry point.
|
||||||
|
|
||||||
See README-android.md for more details on extending that class.
|
See docs/README-android.md for more details on extending that class.
|
||||||
*/
|
*/
|
||||||
#define SDL_MAIN_NEEDED
|
#define SDL_MAIN_NEEDED
|
||||||
|
|
||||||
|
/* We need to export SDL_main so it can be launched from Java */
|
||||||
|
#define SDLMAIN_DECLSPEC DECLSPEC
|
||||||
|
|
||||||
#elif defined(__NACL__)
|
#elif defined(__NACL__)
|
||||||
/* On NACL we use ppapi_simple to set up the application helper code,
|
/* On NACL we use ppapi_simple to set up the application helper code,
|
||||||
then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before
|
then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before
|
||||||
|
@ -85,6 +88,10 @@
|
||||||
#define C_LINKAGE
|
#define C_LINKAGE
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#ifndef SDLMAIN_DECLSPEC
|
||||||
|
#define SDLMAIN_DECLSPEC
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file SDL_main.h
|
* \file SDL_main.h
|
||||||
*
|
*
|
||||||
|
@ -107,7 +114,7 @@
|
||||||
/**
|
/**
|
||||||
* The prototype for the application's main() function
|
* The prototype for the application's main() function
|
||||||
*/
|
*/
|
||||||
extern C_LINKAGE DECLSPEC int SDL_main(int argc, char *argv[]);
|
extern C_LINKAGE SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
|
||||||
|
|
||||||
|
|
||||||
#include "begin_code.h"
|
#include "begin_code.h"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -287,7 +287,9 @@ enum
|
||||||
SDL_PIXELFORMAT_NV12 = /**< Planar mode: Y + U/V interleaved (2 planes) */
|
SDL_PIXELFORMAT_NV12 = /**< Planar mode: Y + U/V interleaved (2 planes) */
|
||||||
SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'),
|
SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'),
|
||||||
SDL_PIXELFORMAT_NV21 = /**< Planar mode: Y + V/U interleaved (2 planes) */
|
SDL_PIXELFORMAT_NV21 = /**< Planar mode: Y + V/U interleaved (2 planes) */
|
||||||
SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1')
|
SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),
|
||||||
|
SDL_PIXELFORMAT_EXTERNAL_OES = /**< Android video texture format */
|
||||||
|
SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct SDL_Color
|
typedef struct SDL_Color
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -121,7 +121,12 @@
|
||||||
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
||||||
/* Try to find out if we're compiling for WinRT or non-WinRT */
|
/* Try to find out if we're compiling for WinRT or non-WinRT */
|
||||||
#if defined(_MSC_VER) && defined(__has_include)
|
#if defined(_MSC_VER) && defined(__has_include)
|
||||||
#define HAVE_WINAPIFAMILY_H __has_include(<winapifamily.h>)
|
#if __has_include(<winapifamily.h>)
|
||||||
|
#define HAVE_WINAPIFAMILY_H 1
|
||||||
|
#else
|
||||||
|
#define HAVE_WINAPIFAMILY_H 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */
|
/* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */
|
||||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_) /* _MSC_VER == 1700 for Visual Studio 2012 */
|
#elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_) /* _MSC_VER == 1700 for Visual Studio 2012 */
|
||||||
#define HAVE_WINAPIFAMILY_H 1
|
#define HAVE_WINAPIFAMILY_H 1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -898,6 +898,27 @@ extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
|
extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the CAMetalLayer associated with the given Metal renderer
|
||||||
|
*
|
||||||
|
* \param renderer The renderer to query
|
||||||
|
*
|
||||||
|
* \return CAMetalLayer* on success, or NULL if the renderer isn't a Metal renderer
|
||||||
|
*
|
||||||
|
* \sa SDL_RenderGetMetalCommandEncoder()
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the Metal command encoder for the current frame
|
||||||
|
*
|
||||||
|
* \param renderer The renderer to query
|
||||||
|
*
|
||||||
|
* \return id<MTLRenderCommandEncoder> on success, or NULL if the renderer isn't a Metal renderer
|
||||||
|
*
|
||||||
|
* \sa SDL_RenderGetMetalLayer()
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer);
|
||||||
|
|
||||||
/* Ends C function definitions when using C++ */
|
/* Ends C function definitions when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#define SDL_REVISION "hg-11645:2088cd828335"
|
#define SDL_REVISION "hg-12373:8feb5da6f2fb"
|
||||||
#define SDL_REVISION_NUMBER 11645
|
#define SDL_REVISION_NUMBER 12373
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
251
libs/SDL2/i686-w64-mingw32/include/SDL2/SDL_sensor.h
Normal file
251
libs/SDL2/i686-w64-mingw32/include/SDL2/SDL_sensor.h
Normal file
|
@ -0,0 +1,251 @@
|
||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied
|
||||||
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
arising from the use of this software.
|
||||||
|
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it
|
||||||
|
freely, subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software
|
||||||
|
in a product, an acknowledgment in the product documentation would be
|
||||||
|
appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file SDL_sensor.h
|
||||||
|
*
|
||||||
|
* Include file for SDL sensor event handling
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _SDL_sensor_h
|
||||||
|
#define _SDL_sensor_h
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
#include "SDL_error.h"
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
/* *INDENT-OFF* */
|
||||||
|
extern "C" {
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief SDL_sensor.h
|
||||||
|
*
|
||||||
|
* In order to use these functions, SDL_Init() must have been called
|
||||||
|
* with the ::SDL_INIT_SENSOR flag. This causes SDL to scan the system
|
||||||
|
* for sensors, and load appropriate drivers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct _SDL_Sensor;
|
||||||
|
typedef struct _SDL_Sensor SDL_Sensor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a unique ID for a sensor for the time it is connected to the system,
|
||||||
|
* and is never reused for the lifetime of the application.
|
||||||
|
*
|
||||||
|
* The ID value starts at 0 and increments from there. The value -1 is an invalid ID.
|
||||||
|
*/
|
||||||
|
typedef Sint32 SDL_SensorID;
|
||||||
|
|
||||||
|
/* The different sensors defined by SDL
|
||||||
|
*
|
||||||
|
* Additional sensors may be available, using platform dependent semantics.
|
||||||
|
*
|
||||||
|
* Hare are the additional Android sensors:
|
||||||
|
* https://developer.android.com/reference/android/hardware/SensorEvent.html#values
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDL_SENSOR_INVALID = -1, /**< Returned for an invalid sensor */
|
||||||
|
SDL_SENSOR_UNKNOWN, /**< Unknown sensor type */
|
||||||
|
SDL_SENSOR_ACCEL, /**< Accelerometer */
|
||||||
|
SDL_SENSOR_GYRO /**< Gyroscope */
|
||||||
|
} SDL_SensorType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accelerometer sensor
|
||||||
|
*
|
||||||
|
* The accelerometer returns the current acceleration in SI meters per
|
||||||
|
* second squared. This includes gravity, so a device at rest will have
|
||||||
|
* an acceleration of SDL_STANDARD_GRAVITY straight down.
|
||||||
|
*
|
||||||
|
* values[0]: Acceleration on the x axis
|
||||||
|
* values[1]: Acceleration on the y axis
|
||||||
|
* values[2]: Acceleration on the z axis
|
||||||
|
*
|
||||||
|
* For phones held in portrait mode, the axes are defined as follows:
|
||||||
|
* -X ... +X : left ... right
|
||||||
|
* -Y ... +Y : bottom ... top
|
||||||
|
* -Z ... +Z : farther ... closer
|
||||||
|
*
|
||||||
|
* The axis data is not changed when the phone is rotated.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetDisplayOrientation()
|
||||||
|
*/
|
||||||
|
#define SDL_STANDARD_GRAVITY 9.80665f
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gyroscope sensor
|
||||||
|
*
|
||||||
|
* The gyroscope returns the current rate of rotation in radians per second.
|
||||||
|
* The rotation is positive in the counter-clockwise direction. That is,
|
||||||
|
* an observer looking from a positive location on one of the axes would
|
||||||
|
* see positive rotation on that axis when it appeared to be rotating
|
||||||
|
* counter-clockwise.
|
||||||
|
*
|
||||||
|
* values[0]: Angular speed around the x axis
|
||||||
|
* values[1]: Angular speed around the y axis
|
||||||
|
* values[2]: Angular speed around the z axis
|
||||||
|
*
|
||||||
|
* For phones held in portrait mode, the axes are defined as follows:
|
||||||
|
* -X ... +X : left ... right
|
||||||
|
* -Y ... +Y : bottom ... top
|
||||||
|
* -Z ... +Z : farther ... closer
|
||||||
|
*
|
||||||
|
* The axis data is not changed when the phone is rotated.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetDisplayOrientation()
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Function prototypes */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Count the number of sensors attached to the system right now
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_NumSensors(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the implementation dependent name of a sensor.
|
||||||
|
*
|
||||||
|
* This can be called before any sensors are opened.
|
||||||
|
*
|
||||||
|
* \return The sensor name, or NULL if device_index is out of range.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the type of a sensor.
|
||||||
|
*
|
||||||
|
* This can be called before any sensors are opened.
|
||||||
|
*
|
||||||
|
* \return The sensor type, or SDL_SENSOR_INVALID if device_index is out of range.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the platform dependent type of a sensor.
|
||||||
|
*
|
||||||
|
* This can be called before any sensors are opened.
|
||||||
|
*
|
||||||
|
* \return The sensor platform dependent type, or -1 if device_index is out of range.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the instance ID of a sensor.
|
||||||
|
*
|
||||||
|
* This can be called before any sensors are opened.
|
||||||
|
*
|
||||||
|
* \return The sensor instance ID, or -1 if device_index is out of range.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Open a sensor for use.
|
||||||
|
*
|
||||||
|
* The index passed as an argument refers to the N'th sensor on the system.
|
||||||
|
*
|
||||||
|
* \return A sensor identifier, or NULL if an error occurred.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the SDL_Sensor associated with an instance id.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the implementation dependent name of a sensor.
|
||||||
|
*
|
||||||
|
* \return The sensor name, or NULL if the sensor is NULL.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the type of a sensor.
|
||||||
|
*
|
||||||
|
* This can be called before any sensors are opened.
|
||||||
|
*
|
||||||
|
* \return The sensor type, or SDL_SENSOR_INVALID if the sensor is NULL.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the platform dependent type of a sensor.
|
||||||
|
*
|
||||||
|
* This can be called before any sensors are opened.
|
||||||
|
*
|
||||||
|
* \return The sensor platform dependent type, or -1 if the sensor is NULL.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the instance ID of a sensor.
|
||||||
|
*
|
||||||
|
* This can be called before any sensors are opened.
|
||||||
|
*
|
||||||
|
* \return The sensor instance ID, or -1 if the sensor is NULL.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current state of an opened sensor.
|
||||||
|
*
|
||||||
|
* The number of values and interpretation of the data is sensor dependent.
|
||||||
|
*
|
||||||
|
* \param sensor The sensor to query
|
||||||
|
* \param data A pointer filled with the current sensor state
|
||||||
|
* \param num_values The number of values to write to data
|
||||||
|
*
|
||||||
|
* \return 0 or -1 if an error occurred.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_SensorGetData(SDL_Sensor * sensor, float *data, int num_values);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close a sensor previously opened with SDL_SensorOpen()
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the current state of the open sensors.
|
||||||
|
*
|
||||||
|
* This is called automatically by the event loop if sensor events are enabled.
|
||||||
|
*
|
||||||
|
* This needs to be called from the thread that initialized the sensor subsystem.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_SensorUpdate(void);
|
||||||
|
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
/* *INDENT-OFF* */
|
||||||
|
}
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
#endif
|
||||||
|
#include "close_code.h"
|
||||||
|
|
||||||
|
#endif /* _SDL_sensor_h */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -86,6 +86,28 @@
|
||||||
#ifdef HAVE_FLOAT_H
|
#ifdef HAVE_FLOAT_H
|
||||||
# include <float.h>
|
# include <float.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(HAVE_ALLOCA) && !defined(alloca)
|
||||||
|
# if defined(HAVE_ALLOCA_H)
|
||||||
|
# include <alloca.h>
|
||||||
|
# elif defined(__GNUC__)
|
||||||
|
# define alloca __builtin_alloca
|
||||||
|
# elif defined(_MSC_VER)
|
||||||
|
# include <malloc.h>
|
||||||
|
# define alloca _alloca
|
||||||
|
# elif defined(__WATCOMC__)
|
||||||
|
# include <malloc.h>
|
||||||
|
# elif defined(__BORLANDC__)
|
||||||
|
# include <malloc.h>
|
||||||
|
# elif defined(__DMC__)
|
||||||
|
# include <stdlib.h>
|
||||||
|
# elif defined(__AIX__)
|
||||||
|
#pragma alloca
|
||||||
|
# elif defined(__MRC__)
|
||||||
|
void *alloca(unsigned);
|
||||||
|
# else
|
||||||
|
char *alloca();
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of elements in an array.
|
* The number of elements in an array.
|
||||||
|
@ -328,28 +350,6 @@ SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_ALLOCA) && !defined(alloca)
|
|
||||||
# if defined(HAVE_ALLOCA_H)
|
|
||||||
# include <alloca.h>
|
|
||||||
# elif defined(__GNUC__)
|
|
||||||
# define alloca __builtin_alloca
|
|
||||||
# elif defined(_MSC_VER)
|
|
||||||
# include <malloc.h>
|
|
||||||
# define alloca _alloca
|
|
||||||
# elif defined(__WATCOMC__)
|
|
||||||
# include <malloc.h>
|
|
||||||
# elif defined(__BORLANDC__)
|
|
||||||
# include <malloc.h>
|
|
||||||
# elif defined(__DMC__)
|
|
||||||
# include <stdlib.h>
|
|
||||||
# elif defined(__AIX__)
|
|
||||||
#pragma alloca
|
|
||||||
# elif defined(__MRC__)
|
|
||||||
void *alloca(unsigned);
|
|
||||||
# else
|
|
||||||
char *alloca();
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_ALLOCA
|
#ifdef HAVE_ALLOCA
|
||||||
#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
|
#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
|
||||||
#define SDL_stack_free(data)
|
#define SDL_stack_free(data)
|
||||||
|
@ -445,12 +445,12 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
|
extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
|
||||||
|
|
||||||
extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
|
extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
|
||||||
extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
|
extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
|
||||||
|
|
||||||
|
extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
|
||||||
extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
|
extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
|
||||||
extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||||
extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||||
|
@ -501,18 +501,35 @@ extern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern DECLSPEC double SDLCALL SDL_acos(double x);
|
extern DECLSPEC double SDLCALL SDL_acos(double x);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_acosf(float x);
|
||||||
extern DECLSPEC double SDLCALL SDL_asin(double x);
|
extern DECLSPEC double SDLCALL SDL_asin(double x);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_asinf(float x);
|
||||||
extern DECLSPEC double SDLCALL SDL_atan(double x);
|
extern DECLSPEC double SDLCALL SDL_atan(double x);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_atanf(float x);
|
||||||
extern DECLSPEC double SDLCALL SDL_atan2(double x, double y);
|
extern DECLSPEC double SDLCALL SDL_atan2(double x, double y);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_atan2f(float x, float y);
|
||||||
extern DECLSPEC double SDLCALL SDL_ceil(double x);
|
extern DECLSPEC double SDLCALL SDL_ceil(double x);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_ceilf(float x);
|
||||||
extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
|
extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y);
|
||||||
extern DECLSPEC double SDLCALL SDL_cos(double x);
|
extern DECLSPEC double SDLCALL SDL_cos(double x);
|
||||||
extern DECLSPEC float SDLCALL SDL_cosf(float x);
|
extern DECLSPEC float SDLCALL SDL_cosf(float x);
|
||||||
|
extern DECLSPEC double SDLCALL SDL_exp(double x);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_expf(float x);
|
||||||
extern DECLSPEC double SDLCALL SDL_fabs(double x);
|
extern DECLSPEC double SDLCALL SDL_fabs(double x);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_fabsf(float x);
|
||||||
extern DECLSPEC double SDLCALL SDL_floor(double x);
|
extern DECLSPEC double SDLCALL SDL_floor(double x);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_floorf(float x);
|
||||||
|
extern DECLSPEC double SDLCALL SDL_fmod(double x, double y);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_fmodf(float x, float y);
|
||||||
extern DECLSPEC double SDLCALL SDL_log(double x);
|
extern DECLSPEC double SDLCALL SDL_log(double x);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_logf(float x);
|
||||||
|
extern DECLSPEC double SDLCALL SDL_log10(double x);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_log10f(float x);
|
||||||
extern DECLSPEC double SDLCALL SDL_pow(double x, double y);
|
extern DECLSPEC double SDLCALL SDL_pow(double x, double y);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_powf(float x, float y);
|
||||||
extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
|
extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_scalbnf(float x, int n);
|
||||||
extern DECLSPEC double SDLCALL SDL_sin(double x);
|
extern DECLSPEC double SDLCALL SDL_sin(double x);
|
||||||
extern DECLSPEC float SDLCALL SDL_sinf(float x);
|
extern DECLSPEC float SDLCALL SDL_sinf(float x);
|
||||||
extern DECLSPEC double SDLCALL SDL_sqrt(double x);
|
extern DECLSPEC double SDLCALL SDL_sqrt(double x);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -97,6 +97,17 @@ typedef struct SDL_Surface
|
||||||
typedef int (SDLCALL *SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
|
typedef int (SDLCALL *SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
|
||||||
struct SDL_Surface * dst, SDL_Rect * dstrect);
|
struct SDL_Surface * dst, SDL_Rect * dstrect);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief The formula used for converting between YUV and RGB
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDL_YUV_CONVERSION_JPEG, /**< Full range JPEG */
|
||||||
|
SDL_YUV_CONVERSION_BT601, /**< BT.601 (the default) */
|
||||||
|
SDL_YUV_CONVERSION_BT709, /**< BT.709 */
|
||||||
|
SDL_YUV_CONVERSION_AUTOMATIC /**< BT.601 for SD content, BT.709 for HD content */
|
||||||
|
} SDL_YUV_CONVERSION_MODE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allocate and free an RGB surface.
|
* Allocate and free an RGB surface.
|
||||||
*
|
*
|
||||||
|
@ -237,6 +248,13 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
|
||||||
extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
|
extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
|
||||||
int flag, Uint32 key);
|
int flag, Uint32 key);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Returns whether the surface has a color key
|
||||||
|
*
|
||||||
|
* \return SDL_TRUE if the surface has a color key, or SDL_FALSE if the surface is NULL or has no color key
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface * surface);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Gets the color key (transparent pixel) in a blittable surface.
|
* \brief Gets the color key (transparent pixel) in a blittable surface.
|
||||||
*
|
*
|
||||||
|
@ -509,6 +527,20 @@ extern DECLSPEC int SDLCALL SDL_LowerBlitScaled
|
||||||
(SDL_Surface * src, SDL_Rect * srcrect,
|
(SDL_Surface * src, SDL_Rect * srcrect,
|
||||||
SDL_Surface * dst, SDL_Rect * dstrect);
|
SDL_Surface * dst, SDL_Rect * dstrect);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Set the YUV conversion mode
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the YUV conversion mode
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionMode(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the YUV conversion mode, returning the correct mode for the resolution when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionModeForResolution(int width, int height);
|
||||||
|
|
||||||
/* Ends C function definitions when using C++ */
|
/* Ends C function definitions when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -76,6 +76,18 @@ extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *a
|
||||||
#endif /* __WIN32__ */
|
#endif /* __WIN32__ */
|
||||||
|
|
||||||
|
|
||||||
|
/* Platform specific functions for Linux */
|
||||||
|
#ifdef __LINUX__
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Sets the UNIX nice value for a thread, using setpriority() if possible, and RealtimeKit if available.
|
||||||
|
|
||||||
|
\return 0 on success, or -1 on error.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority);
|
||||||
|
|
||||||
|
#endif /* __LINUX__ */
|
||||||
|
|
||||||
/* Platform specific functions for iOS */
|
/* Platform specific functions for iOS */
|
||||||
#if defined(__IPHONEOS__) && __IPHONEOS__
|
#if defined(__IPHONEOS__) && __IPHONEOS__
|
||||||
|
|
||||||
|
@ -108,6 +120,26 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void);
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);
|
extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Return true if the application is running on Android TV
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Return true if the application is running on a Chromebook
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Return true is the application is running on a Samsung DeX docking station
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Trigger the Android system back button behavior.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
See the official Android developer guide for more information:
|
See the official Android developer guide for more information:
|
||||||
http://developer.android.com/guide/topics/data/data-storage.html
|
http://developer.android.com/guide/topics/data/data-storage.html
|
||||||
|
@ -169,6 +201,25 @@ typedef enum
|
||||||
} SDL_WinRT_Path;
|
} SDL_WinRT_Path;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief WinRT Device Family
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
/** \brief Unknown family */
|
||||||
|
SDL_WINRT_DEVICEFAMILY_UNKNOWN,
|
||||||
|
|
||||||
|
/** \brief Desktop family*/
|
||||||
|
SDL_WINRT_DEVICEFAMILY_DESKTOP,
|
||||||
|
|
||||||
|
/** \brief Mobile family (for example smartphone) */
|
||||||
|
SDL_WINRT_DEVICEFAMILY_MOBILE,
|
||||||
|
|
||||||
|
/** \brief XBox family */
|
||||||
|
SDL_WINRT_DEVICEFAMILY_XBOX,
|
||||||
|
} SDL_WinRT_DeviceFamily;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Retrieves a WinRT defined path on the local file system
|
* \brief Retrieves a WinRT defined path on the local file system
|
||||||
*
|
*
|
||||||
|
@ -203,8 +254,20 @@ extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
|
extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Detects the device family of WinRT plattform on runtime
|
||||||
|
*
|
||||||
|
* \return Device family
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();
|
||||||
|
|
||||||
#endif /* __WINRT__ */
|
#endif /* __WINRT__ */
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Return true if the current device is a tablet.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void);
|
||||||
|
|
||||||
/* Ends C function definitions when using C++ */
|
/* Ends C function definitions when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -33,12 +33,6 @@
|
||||||
#include "SDL_video.h"
|
#include "SDL_video.h"
|
||||||
#include "SDL_version.h"
|
#include "SDL_version.h"
|
||||||
|
|
||||||
#include "begin_code.h"
|
|
||||||
/* Set up for C function definitions, even when using C++ */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file SDL_syswm.h
|
* \file SDL_syswm.h
|
||||||
*
|
*
|
||||||
|
@ -110,6 +104,12 @@ typedef void *EGLSurface;
|
||||||
#include "SDL_egl.h"
|
#include "SDL_egl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "begin_code.h"
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These are the various supported windowing subsystems
|
* These are the various supported windowing subsystems
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -54,12 +54,13 @@ typedef unsigned int SDL_TLSID;
|
||||||
/**
|
/**
|
||||||
* The SDL thread priority.
|
* The SDL thread priority.
|
||||||
*
|
*
|
||||||
* \note On many systems you require special privileges to set high priority.
|
* \note On many systems you require special privileges to set high or time critical priority.
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SDL_THREAD_PRIORITY_LOW,
|
SDL_THREAD_PRIORITY_LOW,
|
||||||
SDL_THREAD_PRIORITY_NORMAL,
|
SDL_THREAD_PRIORITY_NORMAL,
|
||||||
SDL_THREAD_PRIORITY_HIGH
|
SDL_THREAD_PRIORITY_HIGH,
|
||||||
|
SDL_THREAD_PRIORITY_TIME_CRITICAL
|
||||||
} SDL_ThreadPriority;
|
} SDL_ThreadPriority;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -105,14 +106,24 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
|
||||||
pfnSDL_CurrentBeginThread pfnBeginThread,
|
pfnSDL_CurrentBeginThread pfnBeginThread,
|
||||||
pfnSDL_CurrentEndThread pfnEndThread);
|
pfnSDL_CurrentEndThread pfnEndThread);
|
||||||
|
|
||||||
|
extern DECLSPEC SDL_Thread *SDLCALL
|
||||||
|
SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *),
|
||||||
|
const char *name, const size_t stacksize, void *data,
|
||||||
|
pfnSDL_CurrentBeginThread pfnBeginThread,
|
||||||
|
pfnSDL_CurrentEndThread pfnEndThread);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a thread.
|
* Create a thread.
|
||||||
*/
|
*/
|
||||||
#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
|
#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
|
||||||
#undef SDL_CreateThread
|
#undef SDL_CreateThread
|
||||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
|
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
|
||||||
|
#undef SDL_CreateThreadWithStackSize
|
||||||
|
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
|
||||||
#else
|
#else
|
||||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
|
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
|
||||||
|
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined(__OS2__)
|
#elif defined(__OS2__)
|
||||||
|
@ -132,15 +143,31 @@ extern DECLSPEC SDL_Thread *SDLCALL
|
||||||
SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
|
SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
|
||||||
pfnSDL_CurrentBeginThread pfnBeginThread,
|
pfnSDL_CurrentBeginThread pfnBeginThread,
|
||||||
pfnSDL_CurrentEndThread pfnEndThread);
|
pfnSDL_CurrentEndThread pfnEndThread);
|
||||||
|
extern DECLSPEC SDL_Thread *SDLCALL
|
||||||
|
SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data,
|
||||||
|
pfnSDL_CurrentBeginThread pfnBeginThread,
|
||||||
|
pfnSDL_CurrentEndThread pfnEndThread);
|
||||||
#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
|
#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
|
||||||
#undef SDL_CreateThread
|
#undef SDL_CreateThread
|
||||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
|
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
|
||||||
|
#undef SDL_CreateThreadWithStackSize
|
||||||
|
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
|
||||||
#else
|
#else
|
||||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
|
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
|
||||||
|
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a thread with a default stack size.
|
||||||
|
*
|
||||||
|
* This is equivalent to calling:
|
||||||
|
* SDL_CreateThreadWithStackSize(fn, name, 0, data);
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_Thread *SDLCALL
|
||||||
|
SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a thread.
|
* Create a thread.
|
||||||
*
|
*
|
||||||
|
@ -158,9 +185,17 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
|
||||||
* If a system imposes requirements, SDL will try to munge the string for
|
* If a system imposes requirements, SDL will try to munge the string for
|
||||||
* it (truncate, etc), but the original string contents will be available
|
* it (truncate, etc), but the original string contents will be available
|
||||||
* from SDL_GetThreadName().
|
* from SDL_GetThreadName().
|
||||||
|
*
|
||||||
|
* The size (in bytes) of the new stack can be specified. Zero means "use
|
||||||
|
* the system default" which might be wildly different between platforms
|
||||||
|
* (x86 Linux generally defaults to eight megabytes, an embedded device
|
||||||
|
* might be a few kilobytes instead).
|
||||||
|
*
|
||||||
|
* In SDL 2.1, stacksize will be folded into the original SDL_CreateThread
|
||||||
|
* function.
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC SDL_Thread *SDLCALL
|
extern DECLSPEC SDL_Thread *SDLCALL
|
||||||
SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);
|
SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -59,7 +59,7 @@ typedef struct SDL_version
|
||||||
*/
|
*/
|
||||||
#define SDL_MAJOR_VERSION 2
|
#define SDL_MAJOR_VERSION 2
|
||||||
#define SDL_MINOR_VERSION 0
|
#define SDL_MINOR_VERSION 0
|
||||||
#define SDL_PATCHLEVEL 7
|
#define SDL_PATCHLEVEL 9
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Macro to determine SDL version program was compiled against.
|
* \brief Macro to determine SDL version program was compiled against.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -110,7 +110,9 @@ typedef enum
|
||||||
SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */
|
SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */
|
||||||
SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
|
SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
|
||||||
SDL_WINDOW_FOREIGN = 0x00000800, /**< window not created by SDL */
|
SDL_WINDOW_FOREIGN = 0x00000800, /**< window not created by SDL */
|
||||||
SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000, /**< window should be created in high-DPI mode if supported */
|
SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000, /**< window should be created in high-DPI mode if supported.
|
||||||
|
On macOS NSHighResolutionCapable must be set true in the
|
||||||
|
application's Info.plist for this to have any effect. */
|
||||||
SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to INPUT_GRABBED) */
|
SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to INPUT_GRABBED) */
|
||||||
SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
|
SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
|
||||||
SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */
|
SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */
|
||||||
|
@ -167,6 +169,24 @@ typedef enum
|
||||||
SDL_WINDOWEVENT_HIT_TEST /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
|
SDL_WINDOWEVENT_HIT_TEST /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
|
||||||
} SDL_WindowEventID;
|
} SDL_WindowEventID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Event subtype for display events
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDL_DISPLAYEVENT_NONE, /**< Never used */
|
||||||
|
SDL_DISPLAYEVENT_ORIENTATION /**< Display orientation has changed to data1 */
|
||||||
|
} SDL_DisplayEventID;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDL_ORIENTATION_UNKNOWN, /**< The display orientation can't be determined */
|
||||||
|
SDL_ORIENTATION_LANDSCAPE, /**< The display is in landscape mode, with the right side up, relative to portrait mode */
|
||||||
|
SDL_ORIENTATION_LANDSCAPE_FLIPPED, /**< The display is in landscape mode, with the left side up, relative to portrait mode */
|
||||||
|
SDL_ORIENTATION_PORTRAIT, /**< The display is in portrait mode */
|
||||||
|
SDL_ORIENTATION_PORTRAIT_FLIPPED /**< The display is in portrait mode, upside down */
|
||||||
|
} SDL_DisplayOrientation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief An opaque handle to an OpenGL context.
|
* \brief An opaque handle to an OpenGL context.
|
||||||
*/
|
*/
|
||||||
|
@ -314,18 +334,6 @@ extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex);
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
|
extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Get the dots/pixels-per-inch for a display
|
|
||||||
*
|
|
||||||
* \note Diagonal, horizontal and vertical DPI can all be optionally
|
|
||||||
* returned if the parameter is non-NULL.
|
|
||||||
*
|
|
||||||
* \return 0 on success, or -1 if no DPI information is available or the index is out of range.
|
|
||||||
*
|
|
||||||
* \sa SDL_GetNumVideoDisplays()
|
|
||||||
*/
|
|
||||||
extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get the usable desktop area represented by a display, with the
|
* \brief Get the usable desktop area represented by a display, with the
|
||||||
* primary display located at 0,0
|
* primary display located at 0,0
|
||||||
|
@ -345,6 +353,27 @@ extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, fl
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
|
extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the dots/pixels-per-inch for a display
|
||||||
|
*
|
||||||
|
* \note Diagonal, horizontal and vertical DPI can all be optionally
|
||||||
|
* returned if the parameter is non-NULL.
|
||||||
|
*
|
||||||
|
* \return 0 on success, or -1 if no DPI information is available or the index is out of range.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetNumVideoDisplays()
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the orientation of a display
|
||||||
|
*
|
||||||
|
* \return The orientation of the display, or SDL_ORIENTATION_UNKNOWN if it isn't available.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetNumVideoDisplays()
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Returns the number of available display modes.
|
* \brief Returns the number of available display modes.
|
||||||
*
|
*
|
||||||
|
@ -470,7 +499,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
|
||||||
* If the window is created with any of the SDL_WINDOW_OPENGL or
|
* If the window is created with any of the SDL_WINDOW_OPENGL or
|
||||||
* SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function
|
* SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function
|
||||||
* (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the
|
* (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the
|
||||||
* corrensponding UnloadLibrary function is called by SDL_DestroyWindow().
|
* corresponding UnloadLibrary function is called by SDL_DestroyWindow().
|
||||||
*
|
*
|
||||||
* If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver,
|
* If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver,
|
||||||
* SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail.
|
* SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail.
|
||||||
|
|
|
@ -69,30 +69,43 @@ typedef VkSurfaceKHR SDL_vulkanSurface; /* for compatibility with Tizen */
|
||||||
* \brief Dynamically load a Vulkan loader library.
|
* \brief Dynamically load a Vulkan loader library.
|
||||||
*
|
*
|
||||||
* \param [in] path The platform dependent Vulkan loader library name, or
|
* \param [in] path The platform dependent Vulkan loader library name, or
|
||||||
* \c NULL to open the default Vulkan loader library.
|
* \c NULL.
|
||||||
*
|
*
|
||||||
* \return \c 0 on success, or \c -1 if the library couldn't be loaded.
|
* \return \c 0 on success, or \c -1 if the library couldn't be loaded.
|
||||||
*
|
*
|
||||||
* This should be done after initializing the video driver, but before
|
* If \a path is NULL SDL will use the value of the environment variable
|
||||||
|
* \c SDL_VULKAN_LIBRARY, if set, otherwise it loads the default Vulkan
|
||||||
|
* loader library.
|
||||||
|
*
|
||||||
|
* This should be called after initializing the video driver, but before
|
||||||
* creating any Vulkan windows. If no Vulkan loader library is loaded, the
|
* creating any Vulkan windows. If no Vulkan loader library is loaded, the
|
||||||
* default library will be loaded upon creation of the first Vulkan window.
|
* default library will be loaded upon creation of the first Vulkan window.
|
||||||
*
|
*
|
||||||
* \note If you specify a non-NULL \a path, you should retrieve all of the
|
* \note It is fairly common for Vulkan applications to link with \a libvulkan
|
||||||
* Vulkan functions used in your program from the dynamic library using
|
* instead of explicitly loading it at run time. This will work with
|
||||||
|
* SDL provided the application links to a dynamic library and both it
|
||||||
|
* and SDL use the same search path.
|
||||||
|
*
|
||||||
|
* \note If you specify a non-NULL \c path, an application should retrieve all
|
||||||
|
* of the Vulkan functions it uses from the dynamic library using
|
||||||
* \c SDL_Vulkan_GetVkGetInstanceProcAddr() unless you can guarantee
|
* \c SDL_Vulkan_GetVkGetInstanceProcAddr() unless you can guarantee
|
||||||
* \a path points to the same vulkan loader library that you linked to.
|
* \c path points to the same vulkan loader library the application
|
||||||
|
* linked to.
|
||||||
*
|
*
|
||||||
* \note On Apple devices, if \a path is NULL, SDL will attempt to find
|
* \note On Apple devices, if \a path is NULL, SDL will attempt to find
|
||||||
* the vkGetInstanceProcAddr address within all the mach-o images of
|
* the vkGetInstanceProcAddr address within all the mach-o images of
|
||||||
* the current process. This is because the currently (v0.17.0)
|
* the current process. This is because it is fairly common for Vulkan
|
||||||
* recommended MoltenVK (Vulkan on Metal) usage is as a static library.
|
* applications to link with libvulkan (and historically MoltenVK was
|
||||||
* If it is not found then SDL will attempt to load \c libMoltenVK.dylib.
|
* provided as a static library). If it is not found then, on macOS, SDL
|
||||||
* Applications using the dylib alternative therefore do not need to do
|
* will attempt to load \c vulkan.framework/vulkan, \c libvulkan.1.dylib,
|
||||||
* anything special when calling SDL.
|
* \c MoltenVK.framework/MoltenVK and \c libMoltenVK.dylib in that order.
|
||||||
|
* On iOS SDL will attempt to load \c libMoltenVK.dylib. Applications
|
||||||
|
* using a dynamic framework or .dylib must ensure it is included in its
|
||||||
|
* application bundle.
|
||||||
*
|
*
|
||||||
* \note On non-Apple devices, SDL requires you to either not link to the
|
* \note On non-Apple devices, application linking with a static libvulkan is
|
||||||
* Vulkan loader or link to a dynamic library version. This limitation
|
* not supported. Either do not link to the Vulkan loader or link to a
|
||||||
* may be removed in a future version of SDL.
|
* dynamic library version.
|
||||||
*
|
*
|
||||||
* \note This function will fail if there are no working Vulkan drivers
|
* \note This function will fail if there are no working Vulkan drivers
|
||||||
* installed.
|
* installed.
|
||||||
|
@ -122,11 +135,11 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
||||||
* \brief Get the names of the Vulkan instance extensions needed to create
|
* \brief Get the names of the Vulkan instance extensions needed to create
|
||||||
* a surface with \c SDL_Vulkan_CreateSurface().
|
* a surface with \c SDL_Vulkan_CreateSurface().
|
||||||
*
|
*
|
||||||
* \param [in] window Window for which the required Vulkan instance
|
* \param [in] \c NULL or window Window for which the required Vulkan instance
|
||||||
* extensions should be retrieved
|
* extensions should be retrieved
|
||||||
* \param [in,out] count pointer to an \c unsigned related to the number of
|
* \param [in,out] pCount pointer to an \c unsigned related to the number of
|
||||||
* required Vulkan instance extensions
|
* required Vulkan instance extensions
|
||||||
* \param [out] names \c NULL or a pointer to an array to be filled with the
|
* \param [out] pNames \c NULL or a pointer to an array to be filled with the
|
||||||
* required Vulkan instance extensions
|
* required Vulkan instance extensions
|
||||||
*
|
*
|
||||||
* \return \c SDL_TRUE on success, \c SDL_FALSE on error.
|
* \return \c SDL_TRUE on success, \c SDL_FALSE on error.
|
||||||
|
@ -140,6 +153,10 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
||||||
* is smaller than the number of required extensions, \c SDL_FALSE will be
|
* is smaller than the number of required extensions, \c SDL_FALSE will be
|
||||||
* returned instead of \c SDL_TRUE, to indicate that not all the required
|
* returned instead of \c SDL_TRUE, to indicate that not all the required
|
||||||
* extensions were returned.
|
* extensions were returned.
|
||||||
|
*
|
||||||
|
* \note If \c window is not NULL, it will be checked against its creation
|
||||||
|
* flags to ensure that the Vulkan flag is present. This parameter
|
||||||
|
* will be removed in a future major release.
|
||||||
*
|
*
|
||||||
* \note The returned list of extensions will contain \c VK_KHR_surface
|
* \note The returned list of extensions will contain \c VK_KHR_surface
|
||||||
* and zero or more platform specific extensions
|
* and zero or more platform specific extensions
|
||||||
|
@ -147,12 +164,13 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
||||||
* \note The extension names queried here must be enabled when calling
|
* \note The extension names queried here must be enabled when calling
|
||||||
* VkCreateInstance, otherwise surface creation will fail.
|
* VkCreateInstance, otherwise surface creation will fail.
|
||||||
*
|
*
|
||||||
* \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag.
|
* \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag
|
||||||
|
* or be \c NULL
|
||||||
*
|
*
|
||||||
* \code
|
* \code
|
||||||
* unsigned int count;
|
* unsigned int count;
|
||||||
* // get count of required extensions
|
* // get count of required extensions
|
||||||
* if(!SDL_Vulkan_GetInstanceExtensions(window, &count, NULL))
|
* if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, NULL))
|
||||||
* handle_error();
|
* handle_error();
|
||||||
*
|
*
|
||||||
* static const char *const additionalExtensions[] =
|
* static const char *const additionalExtensions[] =
|
||||||
|
@ -166,7 +184,7 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
||||||
* handle_error();
|
* handle_error();
|
||||||
*
|
*
|
||||||
* // get names of required extensions
|
* // get names of required extensions
|
||||||
* if(!SDL_Vulkan_GetInstanceExtensions(window, &count, names))
|
* if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, names))
|
||||||
* handle_error();
|
* handle_error();
|
||||||
*
|
*
|
||||||
* // copy additional extensions after required extensions
|
* // copy additional extensions after required extensions
|
||||||
|
@ -240,6 +258,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(
|
||||||
* platform with high-DPI support (Apple calls this "Retina"), and not disabled
|
* platform with high-DPI support (Apple calls this "Retina"), and not disabled
|
||||||
* by the \c SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.
|
* by the \c SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.
|
||||||
*
|
*
|
||||||
|
* \note On macOS high-DPI support must be enabled for an application by
|
||||||
|
* setting NSHighResolutionCapable to true in its Info.plist.
|
||||||
|
*
|
||||||
* \sa SDL_GetWindowSize()
|
* \sa SDL_GetWindowSize()
|
||||||
* \sa SDL_CreateWindow()
|
* \sa SDL_CreateWindow()
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
# sdl2 cmake project-config input for ./configure scripts
|
# sdl2 cmake project-config input for ./configure scripts
|
||||||
|
|
||||||
set(prefix "/usr/local/i686-w64-mingw32")
|
set(prefix "/opt/local/i686-w64-mingw32")
|
||||||
set(exec_prefix "${prefix}")
|
set(exec_prefix "${prefix}")
|
||||||
set(libdir "${exec_prefix}/lib")
|
set(libdir "${exec_prefix}/lib")
|
||||||
set(SDL2_PREFIX "/usr/local/i686-w64-mingw32")
|
set(SDL2_PREFIX "/opt/local/i686-w64-mingw32")
|
||||||
set(SDL2_EXEC_PREFIX "/usr/local/i686-w64-mingw32")
|
set(SDL2_EXEC_PREFIX "/opt/local/i686-w64-mingw32")
|
||||||
set(SDL2_LIBDIR "${exec_prefix}/lib")
|
set(SDL2_LIBDIR "${exec_prefix}/lib")
|
||||||
set(SDL2_INCLUDE_DIRS "${prefix}/include/SDL2")
|
set(SDL2_INCLUDE_DIRS "${prefix}/include/SDL2")
|
||||||
set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} -lmingw32 -lSDL2main -lSDL2 -mwindows")
|
set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} -lmingw32 -lSDL2main -lSDL2 -mwindows")
|
||||||
string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES)
|
string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES)
|
||||||
|
|
Binary file not shown.
Binary file not shown.
41
libs/SDL2/i686-w64-mingw32/lib/libSDL2.la
Normal file
41
libs/SDL2/i686-w64-mingw32/lib/libSDL2.la
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
# libSDL2.la - a libtool library file
|
||||||
|
# Generated by libtool (GNU libtool) 2.4.2
|
||||||
|
#
|
||||||
|
# Please DO NOT delete this file!
|
||||||
|
# It is necessary for linking the library.
|
||||||
|
|
||||||
|
# The name that we can dlopen(3).
|
||||||
|
dlname='../bin/SDL2.dll'
|
||||||
|
|
||||||
|
# Names of this library.
|
||||||
|
library_names='libSDL2.dll.a'
|
||||||
|
|
||||||
|
# The name of the static archive.
|
||||||
|
old_library='libSDL2.a'
|
||||||
|
|
||||||
|
# Linker flags that can not go in dependency_libs.
|
||||||
|
inherited_linker_flags=''
|
||||||
|
|
||||||
|
# Libraries that this one depends upon.
|
||||||
|
dependency_libs=' -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid'
|
||||||
|
|
||||||
|
# Names of additional weak libraries provided by this library
|
||||||
|
weak_library_names=''
|
||||||
|
|
||||||
|
# Version information for libSDL2.
|
||||||
|
current=9
|
||||||
|
age=9
|
||||||
|
revision=0
|
||||||
|
|
||||||
|
# Is this an already installed library?
|
||||||
|
installed=yes
|
||||||
|
|
||||||
|
# Should we warn about portability when linking against -modules?
|
||||||
|
shouldnotlink=no
|
||||||
|
|
||||||
|
# Files to dlopen/dlpreopen
|
||||||
|
dlopen=''
|
||||||
|
dlpreopen=''
|
||||||
|
|
||||||
|
# Directory that this library needs to be installed in:
|
||||||
|
libdir='/Users/valve/release/SDL/SDL2-2.0.9/i686-w64-mingw32/lib'
|
Binary file not shown.
41
libs/SDL2/i686-w64-mingw32/lib/libSDL2_test.la
Normal file
41
libs/SDL2/i686-w64-mingw32/lib/libSDL2_test.la
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
# libSDL2_test.la - a libtool library file
|
||||||
|
# Generated by libtool (GNU libtool) 2.4.2
|
||||||
|
#
|
||||||
|
# Please DO NOT delete this file!
|
||||||
|
# It is necessary for linking the library.
|
||||||
|
|
||||||
|
# The name that we can dlopen(3).
|
||||||
|
dlname=''
|
||||||
|
|
||||||
|
# Names of this library.
|
||||||
|
library_names=''
|
||||||
|
|
||||||
|
# The name of the static archive.
|
||||||
|
old_library='libSDL2_test.a'
|
||||||
|
|
||||||
|
# Linker flags that can not go in dependency_libs.
|
||||||
|
inherited_linker_flags=''
|
||||||
|
|
||||||
|
# Libraries that this one depends upon.
|
||||||
|
dependency_libs=''
|
||||||
|
|
||||||
|
# Names of additional weak libraries provided by this library
|
||||||
|
weak_library_names=''
|
||||||
|
|
||||||
|
# Version information for libSDL2_test.
|
||||||
|
current=0
|
||||||
|
age=0
|
||||||
|
revision=0
|
||||||
|
|
||||||
|
# Is this an already installed library?
|
||||||
|
installed=yes
|
||||||
|
|
||||||
|
# Should we warn about portability when linking against -modules?
|
||||||
|
shouldnotlink=no
|
||||||
|
|
||||||
|
# Files to dlopen/dlpreopen
|
||||||
|
dlopen=''
|
||||||
|
dlpreopen=''
|
||||||
|
|
||||||
|
# Directory that this library needs to be installed in:
|
||||||
|
libdir='/Users/valve/release/SDL/SDL2-2.0.9/i686-w64-mingw32/lib'
|
Binary file not shown.
41
libs/SDL2/i686-w64-mingw32/lib/libSDL2main.la
Normal file
41
libs/SDL2/i686-w64-mingw32/lib/libSDL2main.la
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
# libSDL2main.la - a libtool library file
|
||||||
|
# Generated by libtool (GNU libtool) 2.4.2
|
||||||
|
#
|
||||||
|
# Please DO NOT delete this file!
|
||||||
|
# It is necessary for linking the library.
|
||||||
|
|
||||||
|
# The name that we can dlopen(3).
|
||||||
|
dlname=''
|
||||||
|
|
||||||
|
# Names of this library.
|
||||||
|
library_names=''
|
||||||
|
|
||||||
|
# The name of the static archive.
|
||||||
|
old_library='libSDL2main.a'
|
||||||
|
|
||||||
|
# Linker flags that can not go in dependency_libs.
|
||||||
|
inherited_linker_flags=''
|
||||||
|
|
||||||
|
# Libraries that this one depends upon.
|
||||||
|
dependency_libs=''
|
||||||
|
|
||||||
|
# Names of additional weak libraries provided by this library
|
||||||
|
weak_library_names=''
|
||||||
|
|
||||||
|
# Version information for libSDL2main.
|
||||||
|
current=0
|
||||||
|
age=0
|
||||||
|
revision=0
|
||||||
|
|
||||||
|
# Is this an already installed library?
|
||||||
|
installed=yes
|
||||||
|
|
||||||
|
# Should we warn about portability when linking against -modules?
|
||||||
|
shouldnotlink=no
|
||||||
|
|
||||||
|
# Files to dlopen/dlpreopen
|
||||||
|
dlopen=''
|
||||||
|
dlpreopen=''
|
||||||
|
|
||||||
|
# Directory that this library needs to be installed in:
|
||||||
|
libdir='/Users/valve/release/SDL/SDL2-2.0.9/i686-w64-mingw32/lib'
|
|
@ -1,15 +1,15 @@
|
||||||
# sdl pkg-config source file
|
# sdl pkg-config source file
|
||||||
|
|
||||||
prefix=/usr/local/i686-w64-mingw32
|
prefix=/opt/local/i686-w64-mingw32
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
libdir=${exec_prefix}/lib
|
libdir=${exec_prefix}/lib
|
||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
|
|
||||||
Name: sdl2
|
Name: sdl2
|
||||||
Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
|
Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
|
||||||
Version: 2.0.7
|
Version: 2.0.9
|
||||||
Requires:
|
Requires:
|
||||||
Conflicts:
|
Conflicts:
|
||||||
Libs: -L${libdir} -lmingw32 -lSDL2main -lSDL2 -mwindows
|
Libs: -L${libdir} -lmingw32 -lSDL2main -lSDL2 -mwindows
|
||||||
Libs.private: -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc
|
Libs.private: -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -static-libgcc
|
||||||
Cflags: -I${includedir}/SDL2 -Dmain=SDL_main
|
Cflags: -I${includedir}/SDL2 -Dmain=SDL_main
|
||||||
|
|
6
libs/SDL2/include/SDL.h
Executable file → Normal file
6
libs/SDL2/include/SDL.h
Executable file → Normal file
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -51,6 +51,7 @@
|
||||||
#include "SDL_power.h"
|
#include "SDL_power.h"
|
||||||
#include "SDL_render.h"
|
#include "SDL_render.h"
|
||||||
#include "SDL_rwops.h"
|
#include "SDL_rwops.h"
|
||||||
|
#include "SDL_sensor.h"
|
||||||
#include "SDL_shape.h"
|
#include "SDL_shape.h"
|
||||||
#include "SDL_system.h"
|
#include "SDL_system.h"
|
||||||
#include "SDL_thread.h"
|
#include "SDL_thread.h"
|
||||||
|
@ -80,10 +81,11 @@ extern "C" {
|
||||||
#define SDL_INIT_HAPTIC 0x00001000u
|
#define SDL_INIT_HAPTIC 0x00001000u
|
||||||
#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
|
#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
|
||||||
#define SDL_INIT_EVENTS 0x00004000u
|
#define SDL_INIT_EVENTS 0x00004000u
|
||||||
|
#define SDL_INIT_SENSOR 0x00008000u
|
||||||
#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
|
#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
|
||||||
#define SDL_INIT_EVERYTHING ( \
|
#define SDL_INIT_EVERYTHING ( \
|
||||||
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
|
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
|
||||||
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
|
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
|
||||||
)
|
)
|
||||||
/* @} */
|
/* @} */
|
||||||
|
|
||||||
|
|
2
libs/SDL2/include/SDL_assert.h
Executable file → Normal file
2
libs/SDL2/include/SDL_assert.h
Executable file → Normal file
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
5
libs/SDL2/include/SDL_atomic.h
Executable file → Normal file
5
libs/SDL2/include/SDL_atomic.h
Executable file → Normal file
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -158,6 +158,9 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
||||||
#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
|
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||||
|
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||||
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||||
|
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||||
#elif defined(__GNUC__) && defined(__arm__)
|
#elif defined(__GNUC__) && defined(__arm__)
|
||||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
|
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
|
||||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||||
|
|
7
libs/SDL2/include/SDL_audio.h
Executable file → Normal file
7
libs/SDL2/include/SDL_audio.h
Executable file → Normal file
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -140,7 +140,8 @@ typedef Uint16 SDL_AudioFormat;
|
||||||
#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001
|
#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001
|
||||||
#define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002
|
#define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002
|
||||||
#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004
|
#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004
|
||||||
#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE)
|
#define SDL_AUDIO_ALLOW_SAMPLES_CHANGE 0x00000008
|
||||||
|
#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE|SDL_AUDIO_ALLOW_SAMPLES_CHANGE)
|
||||||
/* @} */
|
/* @} */
|
||||||
|
|
||||||
/* @} *//* Audio flags */
|
/* @} *//* Audio flags */
|
||||||
|
@ -527,7 +528,7 @@ extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioForm
|
||||||
*
|
*
|
||||||
* \param stream The stream the audio data is being added to
|
* \param stream The stream the audio data is being added to
|
||||||
* \param buf A pointer to the audio data to add
|
* \param buf A pointer to the audio data to add
|
||||||
* \param int The number of bytes to write to the stream
|
* \param len The number of bytes to write to the stream
|
||||||
* \return 0 on success, or -1 on error.
|
* \return 0 on success, or -1 on error.
|
||||||
*
|
*
|
||||||
* \sa SDL_NewAudioStream
|
* \sa SDL_NewAudioStream
|
||||||
|
|
2
libs/SDL2/include/SDL_bits.h
Executable file → Normal file
2
libs/SDL2/include/SDL_bits.h
Executable file → Normal file
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
2
libs/SDL2/include/SDL_blendmode.h
Executable file → Normal file
2
libs/SDL2/include/SDL_blendmode.h
Executable file → Normal file
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
2
libs/SDL2/include/SDL_clipboard.h
Executable file → Normal file
2
libs/SDL2/include/SDL_clipboard.h
Executable file → Normal file
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
73
libs/SDL2/include/SDL_config.h
Executable file → Normal file
73
libs/SDL2/include/SDL_config.h
Executable file → Normal file
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -82,6 +82,9 @@ typedef unsigned int uintptr_t;
|
||||||
#define HAVE_DSOUND_H 1
|
#define HAVE_DSOUND_H 1
|
||||||
#define HAVE_DXGI_H 1
|
#define HAVE_DXGI_H 1
|
||||||
#define HAVE_XINPUT_H 1
|
#define HAVE_XINPUT_H 1
|
||||||
|
#define HAVE_MMDEVICEAPI_H 1
|
||||||
|
#define HAVE_AUDIOCLIENT_H 1
|
||||||
|
#define HAVE_ENDPOINTVOLUME_H 1
|
||||||
|
|
||||||
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
||||||
#ifdef HAVE_LIBC
|
#ifdef HAVE_LIBC
|
||||||
|
@ -109,13 +112,15 @@ typedef unsigned int uintptr_t;
|
||||||
#define HAVE_MEMCMP 1
|
#define HAVE_MEMCMP 1
|
||||||
#define HAVE_STRLEN 1
|
#define HAVE_STRLEN 1
|
||||||
#define HAVE__STRREV 1
|
#define HAVE__STRREV 1
|
||||||
#define HAVE__STRUPR 1
|
/* These functions have security warnings, so we won't use them */
|
||||||
#define HAVE__STRLWR 1
|
/* #undef HAVE__STRUPR */
|
||||||
|
/* #undef HAVE__STRLWR */
|
||||||
#define HAVE_STRCHR 1
|
#define HAVE_STRCHR 1
|
||||||
#define HAVE_STRRCHR 1
|
#define HAVE_STRRCHR 1
|
||||||
#define HAVE_STRSTR 1
|
#define HAVE_STRSTR 1
|
||||||
#define HAVE__LTOA 1
|
/* These functions have security warnings, so we won't use them */
|
||||||
#define HAVE__ULTOA 1
|
/* #undef HAVE__LTOA */
|
||||||
|
/* #undef HAVE__ULTOA */
|
||||||
#define HAVE_STRTOL 1
|
#define HAVE_STRTOL 1
|
||||||
#define HAVE_STRTOUL 1
|
#define HAVE_STRTOUL 1
|
||||||
#define HAVE_STRTOD 1
|
#define HAVE_STRTOD 1
|
||||||
|
@ -125,30 +130,45 @@ typedef unsigned int uintptr_t;
|
||||||
#define HAVE_STRNCMP 1
|
#define HAVE_STRNCMP 1
|
||||||
#define HAVE__STRICMP 1
|
#define HAVE__STRICMP 1
|
||||||
#define HAVE__STRNICMP 1
|
#define HAVE__STRNICMP 1
|
||||||
#define HAVE_ATAN 1
|
#define HAVE_ACOS 1
|
||||||
#define HAVE_ATAN2 1
|
#define HAVE_ACOSF 1
|
||||||
#define HAVE_ACOS 1
|
#define HAVE_ASIN 1
|
||||||
#define HAVE_ASIN 1
|
#define HAVE_ASINF 1
|
||||||
#define HAVE_CEIL 1
|
#define HAVE_ATAN 1
|
||||||
#define HAVE_COS 1
|
#define HAVE_ATANF 1
|
||||||
#define HAVE_COSF 1
|
#define HAVE_ATAN2 1
|
||||||
#define HAVE_FABS 1
|
#define HAVE_ATAN2F 1
|
||||||
#define HAVE_FLOOR 1
|
#define HAVE_CEILF 1
|
||||||
#define HAVE_LOG 1
|
#define HAVE__COPYSIGN 1
|
||||||
#define HAVE_POW 1
|
#define HAVE_COS 1
|
||||||
#define HAVE_SIN 1
|
#define HAVE_COSF 1
|
||||||
#define HAVE_SINF 1
|
#define HAVE_EXP 1
|
||||||
#define HAVE_SQRT 1
|
#define HAVE_EXPF 1
|
||||||
#define HAVE_SQRTF 1
|
#define HAVE_FABS 1
|
||||||
#define HAVE_TAN 1
|
#define HAVE_FABSF 1
|
||||||
#define HAVE_TANF 1
|
#define HAVE_FLOOR 1
|
||||||
#define HAVE__COPYSIGN 1
|
#define HAVE_FLOORF 1
|
||||||
|
#define HAVE_FMOD 1
|
||||||
|
#define HAVE_FMODF 1
|
||||||
|
#define HAVE_LOG 1
|
||||||
|
#define HAVE_LOGF 1
|
||||||
|
#define HAVE_LOG10 1
|
||||||
|
#define HAVE_LOG10F 1
|
||||||
|
#define HAVE_POW 1
|
||||||
|
#define HAVE_POWF 1
|
||||||
|
#define HAVE_SIN 1
|
||||||
|
#define HAVE_SINF 1
|
||||||
|
#define HAVE_SQRT 1
|
||||||
|
#define HAVE_SQRTF 1
|
||||||
|
#define HAVE_TAN 1
|
||||||
|
#define HAVE_TANF 1
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
/* These functions were added with the VC++ 2013 C runtime library */
|
/* These functions were added with the VC++ 2013 C runtime library */
|
||||||
#if _MSC_VER >= 1800
|
#if _MSC_VER >= 1800
|
||||||
#define HAVE_STRTOLL 1
|
#define HAVE_STRTOLL 1
|
||||||
#define HAVE_VSSCANF 1
|
#define HAVE_VSSCANF 1
|
||||||
#define HAVE_SCALBN 1
|
#define HAVE_SCALBN 1
|
||||||
|
#define HAVE_SCALBNF 1
|
||||||
#endif
|
#endif
|
||||||
/* This function is available with at least the VC++ 2008 C runtime library */
|
/* This function is available with at least the VC++ 2008 C runtime library */
|
||||||
#if _MSC_VER >= 1400
|
#if _MSC_VER >= 1400
|
||||||
|
@ -166,7 +186,6 @@ typedef unsigned int uintptr_t;
|
||||||
/* Enable various audio drivers */
|
/* Enable various audio drivers */
|
||||||
#define SDL_AUDIO_DRIVER_WASAPI 1
|
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||||
#define SDL_AUDIO_DRIVER_DSOUND 1
|
#define SDL_AUDIO_DRIVER_DSOUND 1
|
||||||
#define SDL_AUDIO_DRIVER_XAUDIO2 0
|
|
||||||
#define SDL_AUDIO_DRIVER_WINMM 1
|
#define SDL_AUDIO_DRIVER_WINMM 1
|
||||||
#define SDL_AUDIO_DRIVER_DISK 1
|
#define SDL_AUDIO_DRIVER_DISK 1
|
||||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||||
|
@ -174,9 +193,13 @@ typedef unsigned int uintptr_t;
|
||||||
/* Enable various input drivers */
|
/* Enable various input drivers */
|
||||||
#define SDL_JOYSTICK_DINPUT 1
|
#define SDL_JOYSTICK_DINPUT 1
|
||||||
#define SDL_JOYSTICK_XINPUT 1
|
#define SDL_JOYSTICK_XINPUT 1
|
||||||
|
#define SDL_JOYSTICK_HIDAPI 1
|
||||||
#define SDL_HAPTIC_DINPUT 1
|
#define SDL_HAPTIC_DINPUT 1
|
||||||
#define SDL_HAPTIC_XINPUT 1
|
#define SDL_HAPTIC_XINPUT 1
|
||||||
|
|
||||||
|
/* Enable the dummy sensor driver */
|
||||||
|
#define SDL_SENSOR_DUMMY 1
|
||||||
|
|
||||||
/* Enable various shared object loading systems */
|
/* Enable various shared object loading systems */
|
||||||
#define SDL_LOADSO_WINDOWS 1
|
#define SDL_LOADSO_WINDOWS 1
|
||||||
|
|
||||||
|
@ -194,7 +217,7 @@ typedef unsigned int uintptr_t;
|
||||||
#define SDL_VIDEO_RENDER_D3D 1
|
#define SDL_VIDEO_RENDER_D3D 1
|
||||||
#endif
|
#endif
|
||||||
#ifndef SDL_VIDEO_RENDER_D3D11
|
#ifndef SDL_VIDEO_RENDER_D3D11
|
||||||
#define SDL_VIDEO_RENDER_D3D11 0
|
#define SDL_VIDEO_RENDER_D3D11 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Enable OpenGL support */
|
/* Enable OpenGL support */
|
||||||
|
|
0
libs/SDL2/include/SDL_config.h.cmake
Executable file → Normal file
0
libs/SDL2/include/SDL_config.h.cmake
Executable file → Normal file
0
libs/SDL2/include/SDL_config.h.in
Executable file → Normal file
0
libs/SDL2/include/SDL_config.h.in
Executable file → Normal file
0
libs/SDL2/include/SDL_config_android.h
Executable file → Normal file
0
libs/SDL2/include/SDL_config_android.h
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue