src


Log

Author Commit Date CI Message
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Sam Lantinga 49225f5f 2016-12-31T18:11:19 We don't currently support blitting to < 8 bpp surfaces, return an error instead of corrupting memory in that case.
Sam Lantinga 2ba66d05 2016-12-31T16:21:55 Fixed bug 3535 - Misplaced comment #if/#endif closure comment Coriiander This notice is about a misplaced comment. Often times when we use an #if #endif sequence, the #endif is followed by a comment to indicate what #if statement it belonged to. The SDL_xaudio2.c file contains a misplaced comment, as follows (I stripped the other comments): #ifdef __GNUC__ # define SDL_XAUDIO2_HAS_SDK 1 #elif defined(__WINRT__) # define SDL_XAUDIO2_HAS_SDK #include "SDL_xaudio2.h" #else #if 0 #include <dxsdkver.h> #if (!defined(_DXSDK_BUILD_MAJOR) || (_DXSDK_BUILD_MAJOR < 1284)) # pragma message("Your DirectX SDK is too old. Disabling XAudio2 support.") #else # define SDL_XAUDIO2_HAS_SDK 1 #endif #endif #endif /* 0 */ That final /* 0 */ should be moved one line up. Like this (I tabbed it out for you to make it more clear):
Sam Lantinga 880842cf 2016-12-31T16:14:51 Fixed bug 3531 - internal SDL_vsnprintf implementation access memory outside given buffer ranges Tristan The internal SDL_vsnprintf implementation accesses memory outside buffer. The bug existed also inside the format (%) processing, which was fixed with Bug 3441. But there is still an invalid access, if we do not have any format inside the source string and the destination string is shorter than the format string. You can use any string for this test, as long it is longer than the buffer. Example: va_list argList; char buffer[4]; SDL_vsnprintf(buffer, sizeof(buffer), "Testing", argList); The bug is located on the 'else' branch of the format char test: while (*fmt) { if (*fmt == '%') { ... } else { if (left > 1) { *text = *fmt; --left; } ++fmt; ++text; } } if (left > 0) { *text = '\0'; } As you can see that text is always incremented, even when left is already one. When then on the last lines, *text is assigned the NULL char, the pointer is located outside bounds.
Sam Lantinga 7f2068da 2016-12-31T10:30:07 Fixed bug 3541 - DisplayIndex out of bounds in SDL_SetWindowPosition Intellectual Kitty In SDL_video.c, on line #1756, in SDL_SetWindowPosition (from today's distribution, 12-31-2016, https://hg.libsdl.org/SDL/shortlog/bf19e0c84483): if (displayIndex > _this->num_displays) { should be: if (displayIndex >= _this->num_displays) {
Philipp Wiesemann af263798 2016-12-28T20:10:48 Fixed crash if allocating memory for game controller failed.
Sam Lantinga cb8685c0 2016-12-27T02:04:38 Fixed comment style
Sam Lantinga 6d7da088 2016-12-27T01:39:07 Split controller axes into positive and negative sides so each can be bound independently. Using this a D-Pad can be mapped to a thumbstick and vice versa. Also added support for inverted axes, improving trigger binding support
Ryan C. Gordon 7c316366 2016-12-26T23:02:14 x11: Don't loop forever if the X server refuses a pointer grab.
Sam Lantinga b4e069e7 2016-12-26T02:12:21 Fixed bug 3517 - Compiler warnings with gcc -Wstrict-prototypes felix Compiling even a simple SDL2 'hello world' program with gcc -Wstrict-prototypes (GCC 6.2.1) results in warnings like: /usr/include/SDL2/SDL_gamecontroller.h:143:1: attention : function declaration isn't a prototype [-Wstrict-prototypes] extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(); ^~~~~~ It seems there is a missing 'void' between the parentheses.
Sam Lantinga 9492492d 2016-12-26T01:56:52 Fixed bug 3516 - fix build on illumos Sylvain trivial patch to fix the build on illumos -Werror=declaration-after-statement https://gist.github.com/wiedi/15b71456667f7aa2a7f8815663723bb3
Alex Szpakowski fd85f574 2016-12-23T22:49:37 Mac: back out commit 3e9b2ae41adf. It causes significant overhead on many GPUs.
Alex Szpakowski d719374c 2016-12-23T22:08:18 Mac: Fix over-saturated colors on P3 displays (e.g. the 2016 MBPs).
Philipp Wiesemann 3e928451 2016-12-23T20:36:24 Windows: Fixed compile error.
Sam Lantinga 4fc0fe1f 2016-12-23T02:23:44 Removed debug print statements
Sam Lantinga ad26769c 2016-12-22T18:43:00 Fixed compile errors on various platforms
Sam Lantinga ca019dad 2016-12-22T17:33:45 Fixed issue where the throttle and other axes on racing wheels don't start at zero and show up as immediate input when the wheel is turned for the first time. Wait until they are actually moved before generating input from them.
Sam Lantinga b2f6c4c1 2016-12-19T11:15:53 Fixed bus error when converting 16-bit to float for non-integral-multiple sample rates
Ryan C. Gordon 366c77a9 2016-12-18T20:17:33 audio: fixed one more incorrectly-hardcoded value in the resamplers.
Alex Szpakowski eda74fda 2016-12-18T13:05:14 tvOS: Expose remote swipe gestures as arrow key presses (thanks oviano!)
Alex Szpakowski 787a54c8 2016-12-18T12:28:28 iOS bug #3377: work around bugs in some third party iOS libraries (e.g. Google admob) where they assume the optional UIApplicationDelegate ?window? property always exists and will crash if it doesn?t.
Ryan C. Gordon f956df23 2016-12-17T16:15:24 audio: fixed arbitrary upsampling (thanks, Sylvain!). This was a leftover of simplifying the resamplers down from autogenerated code; I forgot to make something that the generator hardcoded into something variable. Fixes Bugzilla #3507.
Sam Lantinga b4ea63ec 2016-12-14T06:25:09 Fixed crash if there are multiple joysticks closed during the joystick update loop
Ryan C. Gordon f50a0400 2016-12-13T00:22:42 windows: add whitespace to fix macro preprocessing issue (thanks, Sven!). Apparently without a space here, "fastbuild -cache" breaks.
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 e81bf12b 2016-12-12T09:18:42 Fixed edid parsing code for older gcc compilers Ozkan Sezer This adds the name 'ad' to two unnamed unions in edid.h and adjusts edid-parse.c for it. Nameless unions are not supported in ancient gcc, which I happened to use on one of my ancient setups.
Sam Lantinga 8414c3d4 2016-12-11T12:01:44 Fixed ABI, don't change the return type of SDL_GL_SwapWindow()
Sam Lantinga 6211668e 2016-12-11T12:01:01 Fixed creating a renderer on the dummy driver on Mac OS X
Sam Lantinga cb5a0b0f 2016-12-11T11:45:33 Fixed crash when creating a dummy window on Mac OS X
David Ludwig d6bcec8f 2016-12-10T15:23:17 WinRT: build fixes These fixes are lumped into two categories: 1. add new file, SDL_dataqueue.c, to UWP/WinRT build-inputs (via MSVC project files) 2. implement a temporary, hack-fix for a build error in SDL_xinputjoystick.c. Win32's Raw Input APIs are, unfortunately, not available for use in UWP/WinRT APIs. There does appear to be a replacement API, available in the Windows.Devices.HumanInterfaceDevice namespace. This fix should be sufficient to get SDL compiling again, without affecting Win32 builds, however using the UWP/WinRT API (in UWP/WinRT builds) would almost certainly be better (for UWP/WinRT builds). TODO: research Windows.Devices.HumanInterfaceDevice, and use that if and as appropriate.
Sam Lantinga 454d9cb9 2016-12-09T05:19:31 PP_OK isn't available in the NaCl build environment on buildbot. It's defined as 0
Sam Lantinga 97d05b0d 2016-12-09T05:12:27 Fixed a bunch of SwapWindow calls that needed their return value updated
Sam Lantinga 7a39681e 2016-12-09T05:04:18 Fixed X11 OpenGL ES build
Sam Lantinga fed8cbcd 2016-12-09T05:00:35 Fixed build for EGL platforms
Sam Lantinga b936a4c3 2016-12-09T04:57:54 Added support for the XiaoMi Game Controller
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 3b18c796 2016-12-09T01:29:52 Fixed bug 3512 - Memory leak of SDL_Joystick axes_zero array Benjamin Harris Found with valgrind and confirmed in the 2.0.5 source code. One-line fix in SDL_JoystickClose?
Sam Lantinga a5250171 2016-12-08T10:13:45 Protect the game controller API the same way the joystick API is protected from multi-threaded access
Sam Lantinga 1b08f0c1 2016-12-07T11:41:20 Added the guide button for the NVIDIA Shield Controller
Sam Lantinga 91491824 2016-12-07T11:02:02 Removed unneeded warning when running from Visual Studio
Sam Lantinga acabb5d5 2016-12-06T14:22:28 Added support for XBox One controllers on Mac OS X, using the driver at: https://github.com/360Controller/360Controller/releases
Ryan C. Gordon c0231875 2016-12-06T12:23:17 audio: Fixed compiler warnings.
Ryan C. Gordon a0e003ee 2016-12-06T02:23:54 Refactored the audio queueing code to a generic SDL_DataQueue interface. This is not a public API (at the moment), but we will be needing this for other internal things soon.
Ryan C. Gordon 8b960d4e 2016-12-06T02:20:58 Added SDL_VARIABLE_LENGTH_ARRAY so this #ifdef is localized to one place.
Sam Lantinga 54188c8b 2016-12-03T09:59:43 Fixed crash at startup
Sam Lantinga 264138cc 2016-12-03T08:39:21 Added support for the Hori Fighting Commander 4
Sam Lantinga e7efcfba 2016-12-03T00:40:13 Added Linux mapping for the DragonRise Inc. Generic USB Joystick
Sam Lantinga 16074e67 2016-12-02T22:18:05 Fixed compile warning on Visual Studio
Sam Lantinga 4eda58ba 2016-12-02T21:01:13 Added SDL_HINT_MOUSE_NORMAL_SPEED_SCALE and SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE to scale the speed of the mouse. This currently doesn't affect absolute motion, which would need to be implemented on each windowing system so the cursor matches the reported mouse coordinates.
Sam Lantinga 26f05ecb 2016-12-02T02:25:12 Fixed missing prototypes on Android, patch from Sylvain
Sam Lantinga 84c0780e 2016-12-02T02:21:35 Fixed bug 3305 - Fixed TextInput status when the keyboard was dismissed with the dismiss key on the iPad Diego I was previously unaware that rotating the device to a different orientation when the keyboard is shown causes a keyboardWillHide followed by a keyboardWillShow notification. The previous patch would then mistakenly StopTextInput when rotating. This patch fixes that by checking if the device is rotating before stopping text input.
Sam Lantinga 1b689c33 2016-12-01T11:52:47 Fixed bug 3503 - osx builds don't run on 10.6 as of rev. 10651 Ozkan Sezer With rev. 10651, i.e. http://hg.libsdl.org/SDL/rev/747a6a795b21 , SDL2 - OS X builds fail to run on 10.6 (my setup: i686 / 10.6.8) because the symbol _IOPMAssertionCreateWithDescription is missing. The SDK listing it for 10.7+ does seem correct. Reverting r10651 and rebuilding makes it to function again.
Sam Lantinga a738a6fb 2016-12-01T07:31:08 Added Linux controller mapping for the Nostromo n45 Dual Analog Gamepad
Sam Lantinga 4905cd9c 2016-11-30T22:06:05 Fixed bug 3340 - SDL_BlitScaled causes access violation in some cases. Simon Hug The SDL_BlitScaled function runs into an access violation for specific blit coordinates and surface sizes. The attached testcase blits a 800x600 surface to a 1280x720 surface at the coordinates -640,-345 scaled to 1280x720. The blit function that moves the data then runs over and reads after the pixel data from the src surface causing an access violation. I can't say where exactly it goes wrong, but I think it could have something to do with the rounding in SDL_UpperBlitScaled. final_src.y is 288 and final_src.h is 313. Together that's 601, which I believe is one too much, but I just don't know the code enough to make sure that's the problem. Sylvain I think this patch fix the issue, but maybe it's worth re-writing "SDL_UpperBlitScaled" using SDL_FRect.
Philipp Wiesemann a7655d77 2016-11-30T23:31:23 Fixed warning about storing an unused value. Found by buildbot.
Sam Lantinga cb8748b7 2016-11-30T12:58:03 Fixed the controller mappings for the OUYA controller
Sam Lantinga 5fcf2577 2016-11-30T12:34:50 Added PS4 controller entries for the new Sony HID driver https://git.kernel.org/cgit/linux/kernel/git/jikos/hid.git/log/?h=for-4.10/sony
Sam Lantinga 663afa91 2016-11-30T12:25:19 Added support for the DS4 USB Wireless Adaptor
Sam Lantinga d834c08a 2016-11-29T22:02:37 Add the controller mappings to the linked list in order
Sam Lantinga dd5d85a4 2016-11-29T06:36:57 Added an API to iterate over game controller mappings
Sam Lantinga 1e8f074c 2016-11-29T05:34:20 Avoid conflicts with multiple versions of udev by first trying the library that is linked with the executable, if any, and then picking the one that is in the build environment. This fixes joystick detection for applications using the Steam Linux Runtime
Sam Lantinga 5220759f 2016-11-29T05:04:42 Made it safe to update joysticks from multiple threads, fixes crash in Steam
Sam Lantinga 7f764bd8 2016-11-26T10:26:36 once more - iterating on this is annoying
Sam Lantinga 51ccc9ed 2016-11-26T10:26:32 if the tap is explicitly disabled by code or by another program, let it remain disabled! this is different than the automatic "event tap was too slow therefore we stopped processing it" timeout which we want to re-enable after.
Sam Lantinga 25f54f0f 2016-11-26T10:26:26 tap should default to disabled, not enabled
Sam Lantinga 354a8f27 2016-11-26T10:26:22 SDL for Mac - only enable global event tap when actually necessary (app has focus and has requested relative mouse mode or has asked for a mouse grab). in other situations the event tap impacts system performance and battery life with no benefit.
Ryan C. Gordon d1c35feb 2016-11-25T00:13:13 macOS: removed deprecated UpdateSystemActivity() call. The non-deprecated approach (IOPMAssertion) already exists in SDL, and is available in Mac OS X 10.6 and later (although it was incorrectly listed as 10.7 and later in SDL). Since SDL now requires 10.6 or later, this is no longer conditionally used.
Ryan C. Gordon fb5fd67c 2016-11-24T21:41:09 Fixed all known static analysis bugs, with checker-279 on macOS.
Sam Lantinga 2f6ba615 2016-11-24T12:24:22 Guess the USB VID/PID of XInput devices
Sam Lantinga e9983c7b 2016-11-24T11:53:23 We are comparing 16-bit values
Ryan C. Gordon e93e91f0 2016-11-23T21:52:48 Pacify some GCC strict-aliasing compiler warnings.
Ryan C. Gordon 232ae688 2016-11-23T17:20:28 Still more compiler warning fixes for various platforms.
Ryan C. Gordon 40c2a6fb 2016-11-23T11:49:26 Fixed more compiler warnings.
Ryan C. Gordon 52827361 2016-11-23T10:51:44 directsound: fixed compiler warnings.
Sam Lantinga 5232b8e9 2016-11-23T06:54:19 Fixed XBox One S controller mapping for firmware revision 3.1.1221.0, including back and guide buttons
Sam Lantinga aa03b9d7 2016-11-22T22:14:28 The XBox One S controller sends keys outside the standard joystick button range
Sam Lantinga 6558ecdb 2016-11-22T04:42:07 Added mapping for XBox One S controller firmware version 3.1.1221.0
Ryan C. Gordon a949882a 2016-11-21T20:35:59 cpuinfo: fix SDL_HasNEON() on older iOS devices, fixed C++ comment.
Sam Lantinga 36156335 2016-11-20T21:34:54 Renaming of guard header names to quiet -Wreserved-id-macro Patch contributed by Sylvain
Sam Lantinga abe92710 2016-11-20T21:29:27 Fixed warning building under mingw, patch contributed by Sylvain
Sam Lantinga eaca3958 2016-11-20T21:24:09 Fixed bug 3494 - SDL_test_fuzzer.c fails compile since r10604 Ozkan Sezer As of hg rev. 10604 (http://hg.libsdl.org/SDL/rev/4fe01fd25855), SDL_test_fuzzer.c fails to build again
Sam Lantinga 4a089ca1 2016-11-20T21:18:55 Fixed bug 3486 - Can't get HINSTANCE of my window realitix SDL2 allows to create widow and to get information through SDL_SysWMinfo. But it misses something, with Vulkan, you need the HWND and HINSTANCE of the window for Win32 system. Sadly, SDL2 provides only HWND but not HINSTANCE. In some context, it can be difficult to get the HINSTANCE, indeed, I'm using pySDL2 (Python) and I can only access properties that SDL2 gives me. I have to use a dirty trick like that to get the HINSTANCE: (https://raw.githubusercontent.com/bglgwyng/pyVulkan/master/examples/win32misc.py)
Philipp Wiesemann eb9cc030 2016-11-19T23:27:37 Fixed two memory leaks if added game controller mapping has lower priority. Found by buildbot.
Philipp Wiesemann a49ac09c 2016-11-18T00:06:09 Windows: Fixed crash if using current SDL_GetWindowWMInfo() from older programs.
Philipp Wiesemann d05a39d0 2016-11-18T00:05:54 Wayland: Fixed file descriptor leaks if device was not initialized.
Philipp Wiesemann c3451262 2016-11-18T00:05:28 Emscripten: Fixed handling of deactivated mouse events. SDL_GetEventState() was called with a button state instead of an event type.
Ryan C. Gordon 32cb3494 2016-11-17T17:03:43 cpuinfo: patched to compile for getauxval() path.
Ryan C. Gordon 0b33a118 2016-11-17T16:10:32 cpuinfo: more patching for Android. Legacy platform targets are a pain.
Ryan C. Gordon a298e563 2016-11-17T16:04:00 cpuinfo: Patched to compile on Android, Linux.
Ryan C. Gordon e8f4b7c4 2016-11-17T16:01:59 cpuinfo: patched to compile. Nothing quite like experimentation via Buildbot! :/
Ryan C. Gordon 74eb78dc 2016-11-17T15:57:58 cpuinfo: more work on SDL_HasNEON().
Ryan C. Gordon db97c3d3 2016-11-17T01:41:56 cpuinfo: silence compiler warnings on non-Intel CPU architectures.
Ryan C. Gordon 66a36d56 2016-11-17T01:34:18 cpuinfo: disable NEON detection on Android for now. Will fix this properly soon.
Ryan C. Gordon 5c6b2ebf 2016-11-17T01:26:56 cpuinfo: more robust ARM preprocessor checks.
Ryan C. Gordon 35430a73 2016-11-17T01:15:16 cpuinfo: first attempt at SDL_HasNEON() implementation.
Ryan C. Gordon 7592b40b 2016-11-16T22:49:04 cpuinfo: Removed code duplication, cached CPUID details.
Philipp Wiesemann 6fe15d63 2016-11-16T22:09:40 Wayland: Fixed memory leak if output retrieval failed. Found by Cppcheck.
Philipp Wiesemann 97aa5775 2016-11-16T22:08:51 Fixed empty parameter list in signatures of internal functions.
Sam Lantinga 818d1d3e 2016-11-15T01:30:08 Fixed bug 1646 - Warnings from clang with -Weverything
Sam Lantinga 0d24495b 2016-11-15T01:24:58 Removed unused constants Except for SDL_bmp.c where they are historically interesting and I've left them in.