Sam Lantinga
2a05f4681b
Fixed bug 4264 - SDL_CreateTextureFromSurface generates error message but returns ok
...
Anthony @ POW Games
SDL_CreateTextureFromSurface makes an internal call to SDL_GetColorKey which can return an error and spams the error log with "Surface doesn't have a colorkey" even though the original function didn't return an error.
2018-09-24 16:41:55 -07:00
Sam Lantinga
2d69f1cbf5
Added SDL_GetDisplayOrientation() to get the display orientation, and added a new event SDL_DISPLAYEVENT to notify the application when the orientation changes.
...
Documented the values returned by the accelerometer and gyroscope sensors
2018-08-22 21:48:28 -07:00
Sam Lantinga
9505b76b0d
Moved SDL_IsTablet() to a cross-platform API function
2018-08-21 20:03:54 -07:00
Sam Lantinga
6a6db94f54
First pass on the new SDL sensor API
2018-08-21 12:11:34 -07:00
Sam Lantinga
ce26218414
Add SDL_IsTablet() to Android and iOS SDL.
2018-08-21 11:23:47 -07:00
Sam Lantinga
a7f26f9e6c
Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms.
...
Added SDL_GameControllerRumble() and SDL_JoystickRumble() for simple force feedback outside of the SDL haptics API
2018-08-09 16:00:17 -07:00
Ethan Lee
8c5c6c609f
SDL_exp
2018-08-04 11:52:46 -04:00
Sam Lantinga
b5aa40ef52
Allow trapping the back button so right mouse click can work on some Android systems (thanks Rachel!)
...
Also, added a function SDL_AndroidBackButton() so applications can respond to the back button directly
2018-07-12 13:28:13 -07:00
Sam Lantinga
1b23f13ffe
Added support for external mouse in Samsung DeX mode
...
relative mode doesn't work, but absolute coordinates are functional
2018-06-18 13:14:02 -07:00
Sam Lantinga
af2e341ea6
Added SDL_IsChromebook() to determine if we're running on a Chromebook.
2018-06-05 12:46:13 -07:00
Ryan C. Gordon
cc16ae0ff1
cpuinfo: Added SDL_HasAVX512F().
...
This checks for the "foundation" AVX-512 instructions (that all AVX-512
compatible CPUs support).
2018-05-21 11:35:42 -04:00
Ryan C. Gordon
9a624abf88
dynapi: don't let system loader resolve the initializer to the wrong version.
...
Fixes problems launching Firewatch on Linux (which statically links SDL but
also dynamically loads a system-wide copy from a plugin shared library) with
a newer SDL build.
2018-05-17 12:50:46 -04:00
Sam Lantinga
f25a7fa870
Added SDL_LinuxSetThreadPriority() to directly set the priority of a Linux thread (tid)
...
This function tries using RealtimeKit connecting over DBUS as needed.
2018-04-23 19:18:52 -07:00
Sam Lantinga
86de973b6c
Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened
2018-03-07 13:30:40 -08:00
sezero
7287068da5
revert the recent typecast assignment changes (see bug #4079 )
...
also change the void* typedefs for the two vulkan function
pointers added in vulkan_internal.h into generic function
pointer typedefs.
2018-02-12 17:00:00 +03:00
sezero
4afad75308
add SDL_log10 and SDL_log10f to include and dynapi
2018-02-08 17:07:47 +03:00
Sam Lantinga
2c08c2b899
Added SDL_IsAndroidTV()
2018-02-06 15:03:35 -08:00
Sam Lantinga
49ae998d51
Fixed ISO C99 compatibility
...
SDL now builds with gcc 7.2 with the following command line options:
-Wall -pedantic-errors -Wno-deprecated-declarations -Wno-overlength-strings --std=c99
2018-01-30 18:08:34 -08:00
Sam Lantinga
a9072159b2
Updated copyright for 2018
2018-01-03 10:03:25 -08:00
Sam Lantinga
4365b10afb
Added SDL_RenderGetMetalLayer() and SDL_RenderGetMetalCommandEncoder()
2017-12-08 14:30:10 -08:00
Sam Lantinga
44087f9b2f
Updated SDL's YUV support, many thanks to Adrien Descamps
...
New functions get and set the YUV colorspace conversion mode:
SDL_SetYUVConversionMode()
SDL_GetYUVConversionMode()
SDL_GetYUVConversionModeForResolution()
SDL_ConvertPixels() converts between all supported RGB and YUV formats, with SSE acceleration for converting from planar YUV formats (YV12, NV12, etc) to common RGB/RGBA formats.
Added a new test program, testyuv, to verify correctness and speed of YUV conversion functionality.
2017-11-12 22:51:12 -08:00
Sam Lantinga
644c159d94
Added SDL_fmod() and SDL_fmodf()
2017-11-04 17:35:03 -07:00
Sam Lantinga
48bcdfd8cc
Added float versions of SDL's math functions
2017-11-04 15:34:14 -07:00
Ryan C. Gordon
ba79be8ef6
audio: Added SDL_AudioStreamFlush().
2017-10-19 18:05:42 -04:00
Sam Lantinga
34f15d9394
Added audio stream conversion functions:
...
SDL_NewAudioStream
SDL_AudioStreamPut
SDL_AudioStreamGet
SDL_AudioStreamAvailable
SDL_AudioStreamClear
SDL_FreeAudioStream
2017-10-18 15:54:05 -07:00
Sam Lantinga
eea9c57d52
Added functions to query and set the SDL memory allocation functions:
...
SDL_GetMemoryFunctions()
SDL_SetMemoryFunctions()
SDL_GetNumAllocations()
2017-10-12 13:44:28 -07:00
Sam Lantinga
a074f79dd9
Exposed the joystick locking functions for multi-threaded access to the joystick API
2017-10-10 11:10:15 -07:00
Ryan C. Gordon
ff03b74f22
vulkan: use "unsigned int" instead of "unsigned"
2017-09-06 19:35:36 -04:00
Sam Lantinga
248b190b77
Fixed typedef redefinition errors when including both SDL_vulkan.h and vulkan.h
...
You should always include vulkan/vulkan.h first, then include SDL_vulkan.h
2017-08-27 23:13:15 -07:00
Sam Lantinga
9d76703568
Added the new Vulkan API functions to exported functions
2017-08-27 20:41:29 -07:00
Sam Lantinga
c98f0fd7c2
SDL_dynapi.c: add missing SDLCALL to macros.
2017-08-27 18:53:30 -07:00
Sam Lantinga
21ae2fdc8a
Swapped conditional arguments for standard SDL readability
2017-08-27 18:52:43 -07:00
Sam Lantinga
88c5f65897
SDL_dynapi.h: revert commit a6da0a386f68 in order to enable dynapi
...
[ optional ]
2017-08-27 18:49:36 -07:00
Sam Lantinga
0cca713d25
SDL_dynapi_procs.h: adjust SDL_CreateThread for os/2
2017-08-27 18:49:11 -07:00
Ryan C. Gordon
a094d56363
OS/2: fixed inverted logic bug (thanks, Ozkan!).
2017-08-25 12:27:18 -04:00
Ryan C. Gordon
cb985c7b9c
OS/2: proper fix for dynapi (thanks, Ozkan!).
2017-08-25 11:31:12 -04:00
Ryan C. Gordon
5f75287239
dynapi: fill in OS/2 loading code (thanks, Ozkan!).
...
Partially fixes Bugzilla #3765 .
2017-08-22 15:50:39 -04:00
Sam Lantinga
6a2d119c58
SDL_dynapi.h: disable dynapi for os/2.
2017-08-21 13:00:58 -07:00
Sam Lantinga
233d8a01c9
Fixed bug 2441 - SDL_DuplicateSurface
...
Rainer Deyke
I've written a small patch that adds a small SDL_DuplicateSurface function to SDL. I've written the function as part of a larger (as yet unfinished) patch, but I think this function is useful enough that it merits inclusion in SDL on its own.
2017-08-14 13:37:14 -07:00
Sam Lantinga
df0ee407ab
Implemented more flexible blending modes for accelerated renderers
...
This fixes bug 2594 - Propose new blend mode, SDL_BLENDMODE_BLEND_DSTA
blendMode = SDL_ComposeCustomBlendMode(SDL_BLENDFACTOR_SRC_ALPHA,
SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA,
SDL_BLENDOPERATION_ADD,
SDL_BLENDFACTOR_ZERO,
SDL_BLENDFACTOR_ONE,
SDL_BLENDOPERATION_ADD);
This fixes bug 2828 - Subtractive Blending
blendMode = SDL_ComposeCustomBlendMode(SDL_BLENDFACTOR_SRC_ALPHA,
SDL_BLENDFACTOR_ONE,
SDL_BLENDOPERATION_SUBTRACT,
SDL_BLENDFACTOR_ZERO,
SDL_BLENDFACTOR_ONE,
SDL_BLENDOPERATION_SUBTRACT);
This goes partway to fixing bug 3684 - Add support for a pre-multiplied alpha blending mode
blendMode = SDL_ComposeCustomBlendMode(SDL_BLENDFACTOR_ONE,
SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA,
SDL_BLENDOPERATION_ADD,
SDL_BLENDFACTOR_ONE,
SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA,
SDL_BLENDOPERATION_ADD);
2017-08-14 05:51:44 -07:00
Sam Lantinga
2f632ba2c6
Added SDL_wcscmp()
2017-08-13 20:37:49 -07:00
Sam Lantinga
8adb12e5eb
Added an API SDL_LoadFile_RW() to load all the data from an SDL data stream, and a convenience macro SDL_LoadFile() to load all the data from a file.
2017-08-09 11:58:38 -07:00
Ryan C. Gordon
b1e646da0f
Support for QNX 7.0 (thanks, Elad!).
...
Fixes Bugzilla #3686 .
2017-07-01 17:50:47 -04:00
Ryan C. Gordon
bf09ce5fce
stdlib: added SDL_utf8strlen().
2017-05-29 03:01:05 -04:00
Sam Lantinga
e147ccd615
Added an API to get the joystick instance ID before opening the device: SDL_JoystickGetDeviceInstanceID()
2017-03-09 16:09:16 -08:00
Sam Lantinga
548c43b893
Make sure the memory barrier functions are always available, and now they are implemented on Android __ARM_ARCH_5TE__
2017-02-10 11:21:15 -08:00
Sam Lantinga
9cff625c90
Added an API to get the type of a connected joystick
2017-01-27 05:59:58 -08:00
Sam Lantinga
1e81ac1559
Added SDL_JoystickGetAxisInitialState() to get a joystick axis' initial value.
...
This is useful for controller mapping programs to determine an axis' zero state
2017-01-04 10:28:07 -08:00
Sam Lantinga
d77ab77a7a
Updated copyright for 2017
2017-01-01 18:33:28 -08:00
Sam Lantinga
5d0f852a47
Fixed updated return value for SDL_GL_SwapWindow()
...
Ozkan Sezer
http://hg.libsdl.org/SDL/rev/00fe449fbefe seems to have
forgotten removing the return from SDL_dynapi_procs.h, and this patch
does that. Without it, MSVC warns:
c:\sdl2\src\dynapi\SDL_dynapi_procs.h(598) : warning C4098:
'SDL_GL_SwapWindow_DEFAULT' : 'void' function returning a value
c:\sdl2\src\dynapi\SDL_dynapi_procs.h(598) : warning C4098:
'SDL_GL_SwapWindow' : 'void' function returning a value
2016-12-12 09:19:48 -08:00