src


Log

Author Commit Date CI Message
Sam Lantinga 17410887 2022-06-03T15:02:31 Separated controller type data into a C file
Sam Lantinga ae2cc29f 2022-06-03T09:44:34 Make sure initial state is set correctly for the D3D renderer Fixes https://github.com/libsdl-org/SDL/issues/5749
David Gow 847539af 2022-06-01T23:06:19 wayland: Only call libdecor_dispatch() if we've loaded libdecor As of #5703, we call libdecor_dispatch() in Wayland_WaitEventTimeout(), but this will crash if we don't load libdecor, as SDL_VideoData::shell.libdecor will be NULL. Since we don't load libdecor if we don't intend to use it (i.e., if should_use_libdecor returns false), this results in a crash under KDE in almost all circumstances.
Sam Lantinga 7fa46ec4 2022-05-31T11:11:19 The Google Pixel fingerprint sensor also shows up on Linux when running on the phone
Ethan Lee 964e979d 2022-05-30T16:17:04 hidapi: Allow disabling libusb support at runtime
Sam Lantinga c87b0142 2022-05-30T12:02:08 Fixed building with C89 compiler
Guldoman f78f7752 2022-05-28T03:53:43 ime: windows: allocate space for null terminator
Sam Lantinga fd2a2eea 2022-05-28T07:49:18 Fixed declaration-after-statement warning
Sam Lantinga d2c4d74d 2022-05-27T15:49:35 Fixed build with MinGW-64 windows.devices.power.h The MinGW-64 header defines the parameters as ABI::Windows::Foundation::IReference<INT32 > **, but the Windows header defines the parameters as __FIReference_1_int**
Sam Lantinga bd22ca76 2022-05-27T15:40:50 Revert "Workaround for compiling with MinGW-w64" This reverts commit efdf43aa9b4f4d623ffba01f503d9793d5021330. The broken mingw headers aren't in an official release yet, so reporting this upstream.
Sam Lantinga efdf43aa 2022-05-27T15:34:45 Workaround for compiling with MinGW-w64 Fixes bug https://github.com/libsdl-org/SDL/issues/5589
Sam Lantinga bef9f2b2 2022-05-26T20:45:13 Don't trigger device notifications when Steam Deck backlight changes
Cameron Cawley 347659e8 2022-05-25T22:07:12 riscos: Ensure that last_mouse_buttons is initialised correctly
Cameron Cawley cb43eb43 2022-05-25T21:43:36 riscos: Ensure the mouse focus is set when creating the window
Cameron Cawley 6eda520f 2022-05-25T21:40:28 riscos: Add a basic implementation of SDL_ShowCursor()
Sam Lantinga 22d6e09a 2022-05-25T11:04:58 Don't try to call hid_ble_scan() if HIDAPI is disabled Fixes https://github.com/libsdl-org/SDL/issues/5699
Sam Lantinga b28d304b 2022-05-24T17:24:03 Only include controller_type.h in SDL_joystick.c It has a huge array of controllers and we only want it instantiated once
Ozkan Sezer 9220f92b 2022-05-25T01:01:02 hidapi/libusb/hid.c (read_thread): mark as SDLCALL
Simon McVittie 412ceb84 2022-05-24T16:27:54 video: Only check major version in SDL_GetWindowWMInfo Since #5602, SDL is intended to have the same ABI across the whole major-version 2 cycle, so we should not check that the minor version matches the one that was used to compile an application. There are two checks that could make sense here. The first check is that the major version matches the expected major version. This is usually unnecessary and is not usually done (if we're calling into the wrong library we'll likely crash anyway), but since we have the information, we might as well continue to use it. The second check is whether the version provided by the caller is equal to or greater than a threshold version at which additional fields were added to the struct. If it is, we should populate those fields; if it is not, then we cannot. This is only useful on platforms where additional fields have genuinely been added during the lifetime of SDL 2, like Windows and DirectFB (but not X11). This commit changes the first check to be consistent about only looking at the minor version, while leaving the second check using SDL_VERSIONNUM (which will be removed or widened in SDL 3, but it's fine for now). Resolves: https://github.com/libsdl-org/SDL/issues/5711 Fixes: cd7c2f1 "Switch versioning scheme to be the same as GLib and Flatpak" Signed-off-by: Simon McVittie <smcv@collabora.com>
Mathieu Eyraud fe46569c 2022-05-21T10:44:50 Fix potential memory leak in SDL_AddHintCallback
Ivan Le Lann e4b5afa5 2022-05-21T13:16:12 fix unused variable depending on YUV format
Christian Rauch e59cba95 2022-05-21T13:50:56 add libdecor_dispatch
Ryan C. Gordon dc62fec5 2022-05-20T21:07:25 audio: Fix locking in backends that manage their own callback threads. Otherwise you might get a race where an app pauses the device, but the audio callback still manages to run after the pause is in place.
Sam Lantinga b1cf3229 2022-05-19T16:49:47 Fixed HIDAPI PS4 controller being picked up when running under Steam Input with PS4 configuration enabled
Ryan C. Gordon 9edd411a 2022-05-19T17:15:10 x11: send move/resize events when waiting on fullscreen change. Otherwise we ignore the Configure/etc events when they come in because the window is already in an identical state as far as SDL is concerned. Fixes #5593. May also fix: Issue #5572. Issue #5595.
Cameron Cawley b798e49c 2022-05-19T21:44:38 Fix build warning with MSVC
Cameron Cawley f0566702 2022-05-19T16:58:11 Fix enabling SDL_DYNAMIC_API in OpenWatcom builds
Cameron Cawley 3d52d049 2022-05-19T15:38:35 Remove the '_' prefix from symbol names in Windows OpenWatcom builds
Cameron Cawley 9dfa000b 2022-05-18T20:20:03 Initial support for building for Windows with OpenWatcom
Sam Lantinga 5669743a 2022-05-19T09:45:57 Make sure SDL_CaptureMouse() is only called on the main thread Windows handles mouse capture on a per-thread basis, and capture must be done on the thread used to create a window. Fixes https://github.com/libsdl-org/SDL/issues/5577
Ozkan Sezer 15781a69 2022-05-19T18:55:02 dynapi: fix SDL_DYNAPI_PROC for SDL_iPhoneSetAnimationCallback()
Cameron Cawley f5cf0e37 2022-05-19T14:51:25 Remove unused and duplicate defines from SDL_dynapi_overrides.h
Ozkan Sezer 03ebc439 2022-05-19T14:01:10 dynapi: add missing SDLCALL for SDL_TLSSet's dtor param.
Pierre Wendling 501a4991 2022-05-05T18:44:32 Add clang-format on/off comments where necessary. Comments were added in places where INDENT-ON/OFF comments are. Places like stdlib's asm don't need it as clang-format doesn't try to indent it.
Sam Lantinga 0e6d4baa 2022-05-19T01:23:24 Fixed compile warning on gcc 11
Sam Lantinga c7dff3a2 2022-05-19T00:35:22 Attempt to get the X1 and X2 button state on X11 by using the current event state instead of direct X11 query.
Sam Lantinga 57130b75 2022-05-19T00:31:20 Revert "x11: get x1/x2 button state in GetGlobalMouseState" This reverts commit 3fcc2cb500a752698687ad0c8bb14778e6cb84c3. Button4 and Button5 are for the scrollwheel, not the extended buttons. I don't know of a way to query the state of the extended buttons using X11.
Sam Lantinga 47f1cb55 2022-05-18T23:48:15 Fixed picking up the correct mapping for virtual controllers on Android Fixes https://github.com/libsdl-org/SDL/issues/5662
Sam Lantinga f7b774a7 2022-05-18T17:59:17 Fixed build error on Linux if HAVE_INOTIFY isn't defined Fixes https://github.com/libsdl-org/SDL/issues/5682
Sam Lantinga f9a9d3c8 2022-05-18T17:23:49 Also restore previous capture window if CaptureMouse() fails
Sam Lantinga 7044452d 2022-05-18T17:15:10 Handle recursion in SDL_UpdateMouseCapture() Fixes https://github.com/libsdl-org/SDL/pull/5608
Ozkan Sezer dbd54dd7 2022-05-19T03:00:04 adjust dynapi after commit 0cca71a changes for SDL_qsort and SDL_bsearch
Sam Lantinga e19a9a79 2022-05-18T15:29:59 Fixed a message box getting the mouse capture state out of sync
Cameron Cawley 622311c0 2022-05-18T22:51:58 Add extra XInput structures and defines for older SDKs
Cameron Cawley c8eea020 2022-05-18T21:14:20 Fix C89 build errors in Windows builds
Cameron Cawley 0cca71a8 2022-05-18T22:12:05 Use SDLCALL for callbacks in public APIs
Cameron Cawley ffab9f46 2022-05-18T21:07:33 Avoid clashing with system headers when redefining standard library functions
Sam Lantinga 06aca7ed 2022-05-18T10:09:24 Fixed warping back into the window when gaining focus with warp relative mode enabled
Sam Lantinga b44241ab 2022-05-18T08:50:59 Don't send mouse events when warping in relative mode This fixes games which set relative mode and then did mouse warping at the same time Reference https://github.com/libsdl-org/SDL/issues/5609
Ivan Epifanov 8c5bda6a 2022-05-18T17:58:35 Vita: remove Vita-specific RWOps code
Sam Lantinga aa6ea607 2022-05-18T06:57:28 Fixed whitespace Whitespace inconsistencies reported in https://github.com/libsdl-org/SDL/pull/5673
Ryan C. Gordon 56665e1d 2022-05-17T12:50:13 cocoa: Try to use better system cursors. These try to pull from the .pdf files that are installed with macOS, which fit our needs better, and fall back to the most reasonable defaults available from NSCursor if we can't load them. Since these are installed under /System, they should be sandbox accessible, and if this totally fails, it should still go on, albeit with a less good cursor. Reference Issue #2123.
Alex Szpakowski e9c7b519 2022-05-16T21:03:41 macOS: Fix reference counts of internal window data. Fixes crashes when destroying or recreating a window (#5664).
Ozkan Sezer a4800495 2022-05-17T01:33:20 disable dynapi for os/2, at least for now. (see bugs #5667 and #5669.)
Ozkan Sezer ec1a0f62 2022-05-17T01:33:02 SDL_malloc.c: workaround calling convention issues for real_xxx procs.
Sam Lantinga 1f2a2416 2022-05-16T09:02:35 Add new virtual joysticks to the end of the list This guarantees that the device index that's returned is stable, as long as no joystick hotplug events occur.
Sam Lantinga 3c3ccb1d 2022-05-16T08:55:54 Fixed crash if a virtual joystick was disconnected
Ryan C. Gordon 2317a96c 2022-05-16T10:50:13 x11: Use XC_top_left_corner/XC_top_right_corner instead of XC_fleur. On Gnome (and hopefully others!), this produces something that actually matches SDL_SYSTEM_CURSOR_SIZENWSE/SDL_SYSTEM_CURSOR_SIZENESW. On other desktop enviroments, it probably fits the spirit better than XC_fleur in any case. Reference Issue #2123.
Sam Lantinga 48b6cd8b 2022-05-16T07:23:30 Fixed whitespace
Sam Lantinga f0bc5c9c 2022-05-16T07:21:28 Added effects support for virtual controllers
Sam Lantinga b3a18706 2022-05-16T06:37:38 Removed unused variables
Sam Lantinga 7e005bd8 2022-05-16T06:22:18 Fixed mapping the paddle buttons with the virtual controller
Sam Lantinga bfac54b5 2022-05-15T20:33:28 Added the ability to specify which buttons and axes are present for virtual controllers
Sam Lantinga 94eeb587 2022-05-15T20:01:12 First pass at extending virtual controller functionality Added the ability to specify a name and the product VID/PID for a virtual controller Also added a test case to testgamecontroller, if you pass --virtual as a parameter
Sam Lantinga 7ad15c5b 2022-05-15T09:35:52 Added game controller support for virtual joysticks Fixes https://github.com/libsdl-org/SDL/issues/5662
Sam Lantinga 996b3dc3 2022-05-15T09:33:28 Fixed warning building with Visual Studio
Ethan Lee e4bb3c86 2022-05-11T18:13:44 wayland: Fix build for configs without libdecor
Ethan Lee 6222bd31 2022-05-11T16:26:43 wayland: Don't create a new libdecor context if one already exists
Ethan Lee 6f88cbe4 2022-05-11T16:04:34 wayland: Support xdg_decoration requesting client-side decorations. Don't be fooled by the diff size - this ended up being a big refactor of the shell surface management, masked only by some helper macros I wrote for the popup support. This change makes it so when xdg_decoration is supported, but CSD is requested, the system bails on xdg support entirely and resets all the windows to use libdecor instead. This transition isn't pretty, but once it's done it will be smooth if decorations are an OS toggle since libdecor will take things from there. In hindsight, we really should have designed libdecor to be passed a toplevel, having it manage that for us keeps causing major refactors for _every_ change.
Eddy Jansson d7866ffa 2022-05-11T19:39:30 assert: Check for integer overflow. Move rendering of the assert message into a separate function so we can remove the ugly loop construction. Changes the logic such that allocation failure no longer immediately returns SDL_ASSERTION_ABORT, instead we fall back to the truncated message. If an error is indicated from SDL_snprintf, then we do abort with SDL_ASSERTION_ABORT.
Michael Fitzmayer 9b75fa01 2022-05-11T18:31:34 N-Gage port: add changes from code reviews, overall cleanup (#5618) * Add changes from code review by @ccawley2011, #5597, overall cleanup * Update N-Gage README, minor cleanup and rephrasing * Call SDL_SetMainReady() before calling SDL_main, return SDL_main instead of main
Sam Lantinga 6da99d4a 2022-05-11T08:40:17 Don't use SDL_SIMDFree() if the pixels haven't been allocated with SDL_SIMDAlloc()
Cameron Cawley 2f924020 2022-05-05T20:12:07 Add SDL_SCANCODE_CALL and SDL_SCANCODE_ENDCALL
Cameron Cawley 2bc37362 2022-05-05T13:31:26 Add SDL_SCANCODE_SOFTLEFT and SDL_SCANCODE_SOFTRIGHT
Alex Szpakowski f871c178 2022-05-10T17:32:24 macOS: remove dead code for supporting 10.6 at runtime.
Eddy Jansson f7280dce 2022-05-10T14:52:14 log: Check for integer overflow.
Alex Szpakowski ec8fa577 2022-05-07T21:57:23 macOS: always use Objective-C ARC (automatic ref counting). Change Cocoa SDL_VideoData and SDL_WindowData implementations from C structs to Objective-C objects, since bridging between C and ObjC is easier that way.
Simon McVittie 2a794801 2022-05-09T14:58:51 cpuinfo: Check for overflow in SIMD allocation If the size to be allocated is very large and untrusted, then adding the padding etc. might be enough to cause unsigned overflow, after which a very small amount of memory will be allocated. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie cf1daafa 2022-05-09T18:48:46 cpuinfo: Set padding to 0 if none is needed It'll be simpler to use overflow detection after this refactor. Signed-off-by: Simon McVittie <smcv@collabora.com>
Frank Richter 0e63b514 2022-05-07T14:52:35 Don't define memcpy(), memset() when using static VC runtime. The linker will complain about duplicated symbols otherwise (see #3662, #5156).
Sam Lantinga 8cd908e0 2022-05-06T10:51:55 Fixed building with Visual Studio 2013 Added SDL_vacopy.h since it needs to be included after Windows headers
Sam Lantinga a3c1ca1f 2022-05-06T09:07:36 Added support for the Backbone One guide button The guide button is activated on a long press (> 400ms)
Simon McVittie fff97c95 2022-05-04T16:40:11 build: Mechanically generate ABI versions from version number If we're strict about applying something resembling semantic versioning to the "marketing" version number, then we can mechanically generate the ABI version from it. This limits the range of valid micro versions (patchlevels) to 0-99. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie cd7c2f1d 2022-05-03T15:16:11 Switch versioning scheme to be the same as GLib and Flatpak For stable releases, this gives us the ability to make bugfix-only point releases such as 2.24.1 if we want to, and distinguish between them programmatically. For example, this ability could have been useful after 2.0.16 to fix Xwayland regressions, and after 2.0.18 to fix event loop regressions. For development releases, this gives us the ability to make multiple prereleases during the same feature cycle, and distinguish between them programmatically. For example, this would have been useful during 2.0.22 development, which went through three prereleases before reaching the final release. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 63814ec7 2022-05-03T14:39:00 Add static assertions that the version number is consistent Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie d4b82bfa 2022-05-03T13:17:59 Add static assertions for version numbers' limits Signed-off-by: Simon McVittie <smcv@collabora.com>
Cameron Cawley b398a847 2022-05-03T23:21:10 Add SDL_FLOATWORDORDER for older ARM toolchains
Alexander Kanavin adac3bd1 2022-05-03T12:31:50 video: restore ability to disable fb accel via hint Somewhere in code refactoring between .20 and .22 this check was lost, and so the hint had no effect anymore.
Ozkan Sezer 3f813cf1 2022-05-04T10:05:56 SDL_rawinputjoystick.c: fixed -Werror=declaration-after-statement
atfrase db9e14e5 2022-01-31T13:55:37 disabled linux joystick debugging outputs and reverted unnecessary comment edit
atfrase 3b53555b 2022-01-28T14:53:28 copied default Steam Controller mapping for wired and wireless-dongle USB pids
atfrase 13b1bf4f 2022-01-28T13:31:08 added default gamepad mapping for Steam Controller with new GUID (possibly caused by the firmware update to enable BLE?)
atfrase f7a19f9e 2022-01-14T13:14:42 relaxed the digital hat deadzone slightly, and fixed typo in DEBUG_GAMEPAD_MAPPING define
atfrase 3696e23d 2022-01-14T10:45:16 added hints SDL_HINT_LINUX_DIGITAL_HATS and SDL_HINT_LINUX_HAT_DEADZONES to control the new Linux hat handling; added define DEBUG_GAMEPAD_MAPPINGS to log messages when generating default gamepad mapings for Linux joysticks
atfrase 0b8e796e 2022-01-12T22:00:46 added hueristic to differentiate digital vs analog 'hat' input axes and expose the latter as regular axes; added automatic deadzones to hat outputs, in case analog axes are still mapped to digital hats; updated automatic gamepad control mapping to more completely follow the spec
Michael Fitzmayer fbd230bb 2022-05-03T17:51:49 Add support for the Nokia N-Gage (#5597) * Add initial support for the Nokia N-Gage * N-Gage: disable clipping for the time being, issue needs to be resolved later * Move va_copy definition to SDL_internal.h * Move stdlib.h include to SDL_config_ngage.h, much cleaner this way * Remove redundant include, add HAVE_STDLIB_H * Revert "N-Gage: disable clipping for the time being, issue needs to be resolved later" This reverts commit 4f5f0fc36cc7f34fad05e45671dfa7b8dc32fd51. * N-Gage: fix clipping issue by providing proper math functions
emily 3fcc2cb5 2022-05-03T11:19:39 x11: get x1/x2 button state in GetGlobalMouseState
Susko3 6150245d 2022-05-03T00:11:44 Add new verbosity level for logging of `SDL_SysWMEvent`s Now logged only if SDL_HINT_EVENT_LOGGING is set to "3" or above.
Daniel Brookman d1a3981b 2022-05-02T15:22:46 Fix crash when reading background events for MFi controllers on macOS Enabling GCController.shouldMonitorBackgroundEvents to read background events for MFi controllers before receiving the first GCControllerDidConnectNotification is apparently a no-go on macOS (12.3.1 for me), and would crash on attempt. Apple's documentation is... not great, and doesn't point this out. This waits for IOS_AddMFIJoystickDevice() to get called down the chain from GCControllerDidConnectNotification, and enables GCController.shouldMonitorBackgroundEvents if it hadn't been already. On iOS and tvOS, GCController.shouldMonitorBackgroundEvents is ignored, so there's no need to check their versions.
Jan200101 bb0b6dd4 2022-05-02T20:12:13 Fixed using WGI without XInput