src/dynapi/SDL_dynapi.c


Log

Author Commit Date CI Message
Ozkan Sezer 06b305d2 2023-02-03T17:40:40 dynapi: cast GetProcAddress() result to void*
Ozkan Sezer 6a520177 2023-01-12T14:01:02 SDL_dynapi.c: add extern "C" guards, just in case..
Sam Lantinga 0479df53 2023-01-09T09:48:21 Updated copyright for 2023
Ozkan Sezer 0a8f9777 2022-12-30T11:11:10 SDL_dynapi.c: LoadLibraryA() returns HMODULE.
Sylvain 09ee811f 2022-12-01T09:39:08 Small format changed (using clang-format 15.0.2-1) (cherry picked from commit 778b8926b4808f0642a331ed84a9e8e19899b6db)
Sam Lantinga b8d85c69 2022-11-30T12:51:59 Update for SDL3 coding style (#6717) I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base. In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted. The script I ran for the src directory is added as build-scripts/clang-format-src.sh This fixes: #6592 #6593 #6594 (cherry picked from commit 5750bcb174300011b91d1de20edb288fcca70f8c)
Ryan C. Gordon 69f02234 2022-11-29T14:13:02 dynapi: Abstract out the environment variable name. (cherry picked from commit cc487ffb801f862aec7e2b415e74c563c4d528d5)
Ryan C. Gordon 2d7816e3 2022-10-12T09:59:31 dynapi: Disable support for API call logging by default. We can manually enable it if necessary, but it bloats the library to leave it on just in case. Fixes #6381.
Ryan C. Gordon 17322e2b 2022-10-10T13:07:52 dynapi: Optionally log every call into the SDL API. This will only log things going through dynapi, which means it won't do anything if dynapi is disabled for a given build, but also things that call the `*_REAL` version of an API won't log either (which is to say, if an internal piece of SDL calls a public API, it won't log it, but if an application calls that same entry point, it will). Since this just inserts a different function pointer, unless you explicitly request this at runtime, it won't add any overhead, and, of course, the entire thing can be turned off with a single #define so it doesn't even add extra unused code to the shared library if the kill switch is flipped.
chalonverse f317d619 2022-07-01T13:59:14 Xbox GDKX support (#5869) * Xbox GDK support (14 squashed commits) * Added basic keyboard testing * Update readme * Code review fixes * Fixed issue where controller add/removal wasn't working (since the device notification events don't work on Xbox, have to use the joystick thread to poll XInput)
Sam Lantinga 1d1fb95a 2022-06-28T06:21:45 Removed double va_end()
Sylvain f815580d 2022-06-28T13:09:38 Fix SIGSEV in SDL_error. Re-apply same pattern on this uncompiled code (see #5795)
Sam Lantinga cbd01874 2022-06-27T16:59:50 Removed the limit on the size of the SDL error message Also added SDL_GetOriginalMemoryFunctions() Fixes https://github.com/libsdl-org/SDL/issues/5795
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
Cameron Cawley 25a614bc 2021-09-14T20:37:35 Add SDL_asprintf and SDL_vasprintf
Sam Lantinga 432ee7d8 2021-09-22T09:29:21 Fixed building SDL_dynapi.c without stdio support
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Sam Lantinga a8780c6a 2020-01-16T20:49:25 Updated copyright date for 2020
Sylvain Becker 3d100df3 2019-10-30T15:43:49 Readability: remove const-qualifation from function declaration const-qualification of parameters only has an effect in function definitions
Ryan C. Gordon ec04110d 2019-10-14T12:41:06 dynapi: Deal with failure cases better, other fixes. Fixes Bugzilla #4803.
Ozkan Sezer ceee7def 2019-07-31T00:05:28 minor build fixes.
Sam Lantinga 5e13087b 2019-01-04T22:01:14 Updated copyright for 2019
Ozkan Sezer cbacb0f1 2018-10-14T23:50:50 add missing include.
Ryan C. Gordon e2619f1d 2018-05-17T12:50:46 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.
sezero 40b27fd5 2018-02-12T17:00:00 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.
Sam Lantinga 90e72bf4 2018-01-30T18:08:34 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
Sam Lantinga e3cc5b2c 2018-01-03T10:03:25 Updated copyright for 2018
Sam Lantinga 37ce9f27 2017-08-27T23:13:15 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
Sam Lantinga b7c5d151 2017-08-27T18:53:30 SDL_dynapi.c: add missing SDLCALL to macros.
Sam Lantinga a38f127e 2017-08-27T18:52:43 Swapped conditional arguments for standard SDL readability
Ryan C. Gordon 8c39d1d0 2017-08-25T12:27:18 OS/2: fixed inverted logic bug (thanks, Ozkan!).
Ryan C. Gordon 2213077a 2017-08-25T11:31:12 OS/2: proper fix for dynapi (thanks, Ozkan!).
Ryan C. Gordon a3890ff6 2017-08-22T15:50:39 dynapi: fill in OS/2 loading code (thanks, Ozkan!). Partially fixes Bugzilla #3765.
Ryan C. Gordon 22241ed0 2017-07-01T17:50:47 Support for QNX 7.0 (thanks, Elad!). Fixes Bugzilla #3686.
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Sam Lantinga 9a8642bd 2016-11-01T10:30:46 Fixed bug 3478 - Patch Haiku to use dlopen instead of load_add_on Kai Sterker SDL2 on Haiku so far uses Haiku-specific APIs for loading dynamic objects as add-ons, instead of using dlopen to load them as libraries. This, for example, leads to SDL_mixer not being able to load its audio backends, when compiled with standard settings. As discussed at https://www.freelists.org/post/haikuports/SDL2-mixer-ogg-music-not-playing-and-other-stuff,2 , the best way to deal with this would be using dlopen instead of load_add_on. The following patch implements this change by dropping the Haiku-specific bits and using dlopen instead.
Ryan C. Gordon fa8c83c1 2016-01-03T06:50:50 Remove almost all instances of "volatile" keyword. As Tiffany pointed out in Bugzilla, volatile is not useful for thread safety: https://software.intel.com/en-us/blogs/2007/11/30/volatile-almost-useless-for-multi-threaded-programming/ Some of these volatiles didn't need to be, some were otherwise protected by spinlocks or mutexes, and some got moved over to SDL_atomic_t data, etc. Fixes Bugzilla #3220.
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016
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
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.
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.
Ryan C. Gordon 2a1e4223 2015-01-05T01:07:36 Dynamic API: don't leak if a library loaded but didn't have the entry point.
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 da6d9a9f 2014-06-04T10:56:56 Added annotations to help code analysis tools CR: Bruce Dawson
David Ludwig 3dcb451f 2014-04-09T21:29:19 Added a README file regarding WinRT support To note, this file is currently formatted with CRLF line endings, rather than LF, to allow the file to be viewed with Notepad.
Sam Lantinga 58edac3e 2014-02-02T00:53:27 Fixed bug 2374 - Update copyright for 2014... Is it that time already??
Ryan C. Gordon d75665c7 2014-01-08T01:07:57 Maybe fix Cygwin.
Ryan C. Gordon 960458e5 2014-01-08T00:58:03 Patched to compile on Cygwin.
Ryan C. Gordon d5c977ad 2014-01-08T00:31:19 Patched to compile on OpenBSD.
Ryan C. Gordon 090327e7 2013-12-09T16:03:18 Implemented the Dynamic API magic.