src/dynapi/SDL_dynapi_procs.h


Log

Author Commit Date CI Message
Sam Lantinga 5e19e66c 2019-12-22T13:39:44 Fixed bug 4914 - Expose SDL_ScaleMode and add SDL_SetTextureScaleMode/SDL_GetTextureScaleMode Konrad This was something rather trivial to add, but asked at least several times before (I did google about it as well). It should be possible to dynamically change scaling mode of the texture. It is actually trivial task, but until now it was only possible with a hint before creating a texture. I needed it for my game as well, so I took the liberty of writing it myself. This patch adds following functions: SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleMode); SDL_GetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode *scaleMode); That way you can change texture scaling on the fly.
Sam Lantinga 46e1377d 2019-12-20T20:12:03 Automatically assign player indexes to game controllers, and allow changing the player index for game controllers and joysticks. Added the functions SDL_JoystickFromPlayerIndex(), SDL_JoystickSetPlayerIndex(), SDL_GameControllerFromPlayerIndex(), and SDL_GameControllerSetPlayerIndex()
Sam Lantinga b5aff9d7 2019-11-22T13:12:12 Added SDL_GameControllerTypeForIndex() and SDL_GameControllerGetType() to return the type of controller attached.
Ozkan Sezer 405a3c82 2019-11-21T11:50:50 ran gendynapi.pl after newly added SDL_string.c functions.
Ozkan Sezer eb8f14bb 2019-11-20T20:40:50 added SDL_strtokr() as a replacement for POSIX strtok_r (bug #4046.)
Ozkan Sezer a365c7f6 2019-11-04T11:15:24 ran gendynapi.pl after SDL_HasARMSIMD() addition
Ozkan Sezer a664e95d 2019-10-01T00:05:50 dynapi: move new SDL_LockTextureToSurface addition to the end of file.
Sylvain Becker 1ae61f10 2019-09-30T20:58:44 Added a helper function SDL_LockTextureToSurface() Similar to SDL_LockTexture(), except the locked area is exposed as a SDL surface.
Sylvain Becker 70dc8d16 2019-08-30T08:55:20 Android: fix corresponding warnings
Alex Szpakowski aebaa316 2019-08-05T12:35:32 Add public APIs for creating a Metal view attached to an SDL window. Add SDL_metal.h.
Sam Lantinga 316ff384 2019-06-08T17:43:23 Fixed bug 4526 - replace SDL_RW* macros with functions for using in bindings ace I got this bug in SDL_ttf: https://bugzilla.libsdl.org/show_bug.cgi?id=4524 Sylvain proposed solution: SDL_RWseek(RWops, 0, RW_SEEK_SET); And it works, but i can use it my project, because it written in C# with SDL2-CS wrapper and there not export for macroses: #define SDL_RWsize(ctx) (ctx)->size(ctx) #define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence) #define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, RW_SEEK_CUR) #define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n) #define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n) #define SDL_RWclose(ctx) (ctx)->close(ctx) Therefore, I suggest replacing this macros with functions so that they can be exported and used in bindings
Sam Lantinga 8728ce44 2019-06-08T14:54:37 Fixed bug 4557 - SDL_SIMDAlloc and *Free should be in the public interface Martin Gerhardy These functions are really useful and should get exposed imo.
Sam Lantinga de82759c 2019-03-19T07:53:33 Added support for building SDL as a dynamic library on iOS
Sam Lantinga 5e13087b 2019-01-04T22:01:14 Updated copyright for 2019
Alex Szpakowski 5029d50e 2018-11-10T16:15:48 Add SDL_TouchDeviceType enum and SDL_GetTouchDeviceType(SDL_TouchID id). Touch device types include SDL_TOUCH_DEVICE_DIRECT (a touch screen with window-relative coordinates for touches), SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE (a trackpad-style device with absolute device coordinates), and SDL_TOUCH_DEVICE_INDIRECT_RELATIVE (a trackpad-style device with screen cursor-relative coordinates). Phone screens are an example of a direct device type. Mac trackpads are the indirect-absolute touch device type. The Apple TV remote is an indirect-relative touch device type.
Ryan C. Gordon 62494a2e 2018-10-31T15:03:41 Merge SDL-ryan-batching-renderer branch to default.
Sam Lantinga 14329256 2018-10-25T16:53:14 Generalized the XInput user index into a player index
Sam Lantinga 9987ca69 2018-10-25T12:54:42 Added SDL_JoystickGetXInputUserIndex()
Ryan C. Gordon 8340b0f0 2018-10-23T01:34:03 render: Add floating point versions of various draw APIs.
Ryan C. Gordon acb05f50 2018-10-11T16:40:01 thread: make SDL_CreateThreadWithStackSize() a public API.
Ryan C. Gordon 1ecf4dfc 2018-10-04T16:34:44 render: Added SDL_RenderFlush().
Sam Lantinga ef347048 2018-09-24T16:41:55 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.
Sam Lantinga f225af0c 2018-08-22T21:48:28 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
Sam Lantinga 6f758ad2 2018-08-21T20:03:54 Moved SDL_IsTablet() to a cross-platform API function
Sam Lantinga 7c3040e0 2018-08-21T12:11:34 First pass on the new SDL sensor API
Sam Lantinga 109544ca 2018-08-21T11:23:47 Add SDL_IsTablet() to Android and iOS SDL.
Sam Lantinga d2042e1e 2018-08-09T16:00:17 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
Ethan Lee b4fe7412 2018-08-04T11:52:46 SDL_exp
Sam Lantinga ff8c9538 2018-07-12T13:28:13 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
Sam Lantinga a5158535 2018-06-18T13:14:02 Added support for external mouse in Samsung DeX mode relative mode doesn't work, but absolute coordinates are functional
Sam Lantinga 113801b7 2018-06-05T12:46:13 Added SDL_IsChromebook() to determine if we're running on a Chromebook.
Ryan C. Gordon 4df859c5 2018-05-21T11:35:42 cpuinfo: Added SDL_HasAVX512F(). This checks for the "foundation" AVX-512 instructions (that all AVX-512 compatible CPUs support).
Sam Lantinga 43231256 2018-04-23T19:18:52 Added SDL_LinuxSetThreadPriority() to directly set the priority of a Linux thread (tid) This function tries using RealtimeKit connecting over DBUS as needed.
Sam Lantinga a8ac5885 2018-03-07T13:30:40 Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened
sezero 4c2a444e 2018-02-08T17:07:47 add SDL_log10 and SDL_log10f to include and dynapi
Sam Lantinga 6ed184ec 2018-02-06T15:03:35 Added SDL_IsAndroidTV()
Sam Lantinga e3cc5b2c 2018-01-03T10:03:25 Updated copyright for 2018
Sam Lantinga cf3d4503 2017-12-08T14:30:10 Added SDL_RenderGetMetalLayer() and SDL_RenderGetMetalCommandEncoder()
Sam Lantinga a6a4e27a 2017-11-12T22:51:12 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.
Sam Lantinga bcdf8b91 2017-11-04T17:35:03 Added SDL_fmod() and SDL_fmodf()
Sam Lantinga 34502143 2017-11-04T15:34:14 Added float versions of SDL's math functions
Ryan C. Gordon 72932906 2017-10-19T18:05:42 audio: Added SDL_AudioStreamFlush().
Sam Lantinga 80f8464d 2017-10-18T15:54:05 Added audio stream conversion functions: SDL_NewAudioStream SDL_AudioStreamPut SDL_AudioStreamGet SDL_AudioStreamAvailable SDL_AudioStreamClear SDL_FreeAudioStream
Sam Lantinga 9c580e14 2017-10-12T13:44:28 Added functions to query and set the SDL memory allocation functions: SDL_GetMemoryFunctions() SDL_SetMemoryFunctions() SDL_GetNumAllocations()
Sam Lantinga d90fce3c 2017-10-10T11:10:15 Exposed the joystick locking functions for multi-threaded access to the joystick API
Ryan C. Gordon fb283932 2017-09-06T19:35:36 vulkan: use "unsigned int" instead of "unsigned"
Sam Lantinga eb5392ad 2017-08-27T20:41:29 Added the new Vulkan API functions to exported functions
Sam Lantinga 50d3fe21 2017-08-27T18:49:11 SDL_dynapi_procs.h: adjust SDL_CreateThread for os/2
Sam Lantinga f142a796 2017-08-14T13:37:14 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.
Sam Lantinga c59d9923 2017-08-14T05:51:44 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);
Sam Lantinga f1829d95 2017-08-13T20:37:49 Added SDL_wcscmp()
Sam Lantinga dc400184 2017-08-09T11:58:38 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.
Ryan C. Gordon d4086e4a 2017-05-29T03:01:05 stdlib: added SDL_utf8strlen().
Sam Lantinga 763e1389 2017-03-09T16:09:16 Added an API to get the joystick instance ID before opening the device: SDL_JoystickGetDeviceInstanceID()
Sam Lantinga 06ccb71b 2017-02-10T11:21:15 Make sure the memory barrier functions are always available, and now they are implemented on Android __ARM_ARCH_5TE__
Sam Lantinga 3c90a52a 2017-01-27T05:59:58 Added an API to get the type of a connected joystick
Sam Lantinga 4938c505 2017-01-04T10:28:07 Added SDL_JoystickGetAxisInitialState() to get a joystick axis' initial value. This is useful for controller mapping programs to determine an axis' zero state
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Sam Lantinga 85d8a79f 2016-12-12T09:19:48 Fixed updated return value for SDL_GL_SwapWindow() Ozkan Sezer http://hg.libsdl.org/SDL/rev/464a2676d8ab 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
Sam Lantinga 8414c3d4 2016-12-11T12:01:44 Fixed ABI, don't change the return type of SDL_GL_SwapWindow()
Sam Lantinga 524bf3c2 2016-12-09T01:47:43 Fixed bug 3513 - SDL_GL_SwapWindow does not return error status Return an error code from SDL_GL_SwapWindow(), like the other SDL APIs.
Sam Lantinga dd5d85a4 2016-11-29T06:36:57 Added an API to iterate over game controller mappings
Ryan C. Gordon 35430a73 2016-11-17T01:15:16 cpuinfo: first attempt at SDL_HasNEON() implementation.
Sam Lantinga ac74e16c 2016-11-10T17:19:34 Standardized the format of the SDL joystick GUID and added functions to retrieve the USB VID/PID from a joystick and game controller.
Sam Lantinga 27d4f099 2016-10-07T23:40:44 Implemented SDL_GetHintBoolean() to make it easier to check boolean hints
Sam Lantinga d2676c29 2016-10-07T17:04:58 Fixed bug 2924 - SDL_CreateRGBSurface[From] versions that take SDL_PIXELFORMAT enum Daniel Gibson Currently, SDL_CreateRGBSurface() and SDL_CreateRGBSurfaceFrom() take Uint32 masks for RGBA to "describe" the Pixelformat of the surface. Internally those value are only used to map to one of the SDL_PIXELFORMAT_* enum values that are used for further processing. I think it would be both handy and more efficient to be able to specify SDL_PIXELFORMAT_* yourself without using SDL_PixelFormatEnumToMasks() to create masks first, so I implemented functions that do that: SDL_CreateRGBSurfaceWithFormat() and SDL_CreateRGBSurfaceWithFormatFrom() which are like the versions without "WithFormat" but instead of taking 4 Uint32s for R/G/B/A masks, they take one for a SDL_PIXELFORMAT_* enum value. Together with https://bugzilla.libsdl.org/show_bug.cgi?id=2923 creating a SDL_Surface* from RGBA data (e.g. from stb_image) is as easy as surf = SDL_SDL_CreateRGBSurfaceWithFormat(0, w, h, bppToUse*8, SDL_PIXELFORMAT_RGBA32);
Ryan C. Gordon 4f4c4b62 2016-09-29T22:52:41 Added SDL_SetWindowResizable(). (thanks, Ethan!)
Ryan C. Gordon 73153901 2016-08-06T02:47:27 audio: Implemented buffer queueing for capture devices (SDL_DequeueAudio()).
Ryan C. Gordon 5dcf6bcc 2016-01-07T14:51:22 Updated dynamic API table.
Ryan C. Gordon 3bdaf4c6 2016-01-05T02:46:10 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity(). This is currently implemented for X11, Cocoa, Windows, and DirectFB. This patch is based on work in Unreal Engine 4's fork of SDL, compliments of Epic Games.
Ryan C. Gordon 5696e88e 2016-01-05T02:29:06 Added SDL_GetWindowBordersSize(). This is currently only implemented for X11. This patch is based on work in Unreal Engine 4's fork of SDL, compliments of Epic Games.
Ryan C. Gordon e497e465 2016-01-05T02:28:56 Added SDL_SetWindowInputFocus(). This is currently only implemented for X11. This patch is based on work in Unreal Engine 4's fork of SDL, compliments of Epic Games.
Ryan C. Gordon c3114975 2016-01-04T23:52:40 Added SDL_GetDisplayUsableBounds().
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016
Ryan C. Gordon e6ad29ae 2015-11-14T12:35:45 Added SDL_JoystickFromInstanceID() and SDL_GameControllerFromInstanceID().
Sam Lantinga e015140a 2015-09-30T15:38:18 SDL - add dynapi entry points for SDL_JoystickCurrentPowerLevel
Alfred Reynolds b0e145b3 2015-07-29T17:19:06 Move GetDisplayDPI to the end of the file.
Alfred Reynolds 61c74150 2015-07-29T17:18:56 Add SDL_GetDisplayDPI routine and implement for Windows.
Ryan C. Gordon b2458630 2015-07-18T00:04:49 Fixed dynapi for new SDL_WarpMouseGlobal() function signature.
Ryan C. Gordon e346f142 2015-07-17T21:03:58 SDL_WarpMouseGlobal() should return non-void. There are platforms it isn't implemented on (and currently can't be implemented on!), and there's currently no way for an app to know this. This shouldn't break ABI on apps that moved to a revision between 2.0.3 and 2.0.4.
Philipp Wiesemann 0e45984f 2015-06-21T17:33:46 Fixed crash if initialization of EGL failed but was tried again later. The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly uninitialized data structure if loading the library first failed. A later try to use EGL then skipped initialization and assumed it was previously successful because the data structure now already existed. This led to at least one crash in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was dereferenced to make a call to eglBindAPI().
Sam Lantinga 2c4a6ea0 2015-05-26T06:27:46 Updated the copyright year to 2015
Sam Lantinga 1c6ea0f2 2015-05-13T22:39:32 Added a userdata parameter to SDL_SetWindowsMessageHook()
Sam Lantinga b2be9253 2015-05-13T22:39:27 Fixed Mac and Linux builds
Sam Lantinga 7de242e7 2015-05-13T22:39:20 Added SDL_SetWindowsMessageHook() to facilitate full IME support on Windows
Ryan C. Gordon d4aedf99 2015-04-21T09:45:58 Added SDL_SetWindowModalFor(). This is currently only implemented for X11. This patch is based on work in Unreal Engine 4's fork of SDL, compliments of Epic Games.
Ryan C. Gordon b72938c8 2015-04-20T12:22:44 Windows: Always set the system timer resolution to 1ms by default. An existing hint lets apps that don't need the timer resolution changed avoid this, to save battery, etc, but this fixes several problems in timing, audio callbacks not firing fast enough, etc. Fixes Bugzilla #2944.
Alex Szpakowski fe6c797c 2015-04-10T23:30:31 Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
Alex Szpakowski c4035654 2015-04-09T19:28:00 Added framebuffer and colorbuffer members to the uikit portion of the SDL_SysWMinfo struct, removed SDL_iOSGetViewRenderbuffer and SDL_iOSGetViewFramebuffer.
Alex Szpakowski fcd0f06a 2015-04-08T15:59:29 Renamed SDL_iPhoneGetViewFramebuffer/Renderbuffer to SDL_iOSGetViewFramebuffer/Renderbuffer. Added #defines for SDL_iOSSetAnimationCallback and SDL_iOSSetEventPump, which point to SDL_iPhoneSetAnimationCallback and SDL_iPhoneSetEventPump.
Alex Szpakowski 1152a759 2015-04-08T15:44:07 Generated dynapi prototypes for the new iPhone functions.
Ryan C. Gordon a0e878aa 2015-03-28T00:48:03 Minor input grab clarifications. Clarify that grabbing the mouse only works with one window at a time; this was always true at the system level, though SDL could previously get confused by multiple simultaneous grabs, so now we explicitly break any existing grab before starting a new one and document it as such. Also track the window that is currently grabbed, and provide an API to query for that window. This makes it easy to automate mouse ungrabbing at breakpoints with gdb7's scripting, since the scripts can now know which window to ungrab. In 2.1, we should probably change this API to SDL_GrabInput(win) and SDL_UngrabInput(void), or something.
Edward Rudd b88ca1b4 2015-02-10T16:28:56 the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here. Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture. More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
Philipp Wiesemann b48e54aa 2015-01-26T22:00:29 Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation Jonas Kulla The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c. I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
David Ludwig 70438be2 2014-12-03T10:55:23 WinRT: fixed bug whereby SDL would override an app's default orientation WinRT apps can set a default, preferred orientation via a .appxmanifest file. SDL was overriding this on app startup, and making the app use all possible orientations (landscape and portrait). Thanks to Eric Wing for the heads up on this!
Philipp Wiesemann 9c398852 2014-11-22T22:20:40 Corrected header file documentation comment.
Pierre-Loup A. Griffais 24c86b55 2014-09-11T19:24:42 [X11] Reconcile logical keyboard state with physical state on FocusIn since the window system doesn't do it for us like other platforms. This prevents sticky keys and missed keys when going in and out of focus, for example Alt would appear to stick if switching away from an SDL app with Alt-Tab and had to be pressed again. CR: Sam
Sam Lantinga 1ea86978 2014-08-17T13:11:55 Removed SDL_round() because the license wasn't compatible with zlib
Sam Lantinga 4e7db78e 2014-08-16T23:23:15 Added SDL_round(), contributed by Benoit Pierre - thanks!
Ryan C. Gordon f30e120a 2014-07-22T21:41:49 Added audio device buffer queueing API.