src


Log

Author Commit Date CI Message
Cameron Gutman dfa64ead 2021-02-25T19:22:31 KMSDRM: Add hint to enable the backend without DRM master In some cases, it can be useful to have the KMSDRM backend even if it cannot be used for rendering. An app may want to use SDL for input processing while using another rendering API (such as an MMAL overlay on Raspberry Pi) or using its own code to render to DRM overlays that SDL doesn't support. This also moves the check for DRM master to an earlier point where we can fail initialization of the backend, rather than allowing the backend to initialize then failing the creation of a window later.
Cameron Gutman 8c5b7af2 2021-02-25T19:30:47 Wayland: Fix mouse pointer hiding on Plasma Wayland Unlike Mutter and Sway, KWin actually checks the serial passed in wl_pointer_set_cursor(). The serial provided is supposed to be the serial of the pointer enter event, but We were always passing 0. This caused KWin to drop our requests to hide the cursor. Thanks to the KDE folks for spotting this in my debug logs. Fixes #3576
Cacodemon345 d2d834b9 2021-02-25T15:21:59 KMSDRM: Add gamma support
Ozkan Sezer 72f7a10c 2021-02-25T19:40:28 disable pixman ARM blitters for __aarch64__ | _M_ARM64 Closes: https://github.com/libsdl-org/SDL/issues/4095
Ozkan Sezer e561ce3a 2021-02-25T01:40:02 SDL_cpuinfo.c: replaced gcc i386 checks with __i386__ .
JibbSmart c287087f 2021-02-23T09:26:03 Only change joystick->nbuttons for Joy-Cons, since they're the only ones that have these "paddles"
JibbSmart ee52624f 2021-02-22T17:23:13 Switch Joy-Con SL and SR buttons are now mapped to matching paddle positions so that all buttons can be accessed when using SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS
Mathieu Eyraud 7a2b6f33 2021-02-22T13:32:42 Guard Inotify stuff with macro This fix implicit declaration of close and unused variable warning.
Mathieu Eyraud 8481229f 2021-02-22T15:00:52 Fix error handling in KMSDRM_AddDisplay Add missing `goto cleanup` and check that `dispdata` is not NULL before dereferencing it.
Mathieu Eyraud 2df9c15e 2021-02-22T14:51:42 Fix memory leak in KMSDRM_Vulkan_CreateSurface Variable `device_props` is never freed.
Mathieu Eyraud 844d5e3e 2021-02-21T11:54:50 Fix memory leak in ConnectSensor 'name' is leaked in case of error.
Vanfanel 11cb53d2 2021-02-21T23:28:49 [KMSDRM] Add missing break and modify comments.
Vanfanel 9172e413 2021-02-21T22:57:22 [KMSDRM] Fix intermitent bug in Vulkan initialization on Raspberry Pi 4.
Sam Lantinga 1a17ab30 2021-02-21T11:03:26 Added mappings for popular controllers on Chromebooks
David Gow db58166e 2021-02-21T17:28:08 joystick: hidapi: Properly include <unistd.h> when inotify not available In the extremely unlikely event that inotify is not available (and, therefore, HAVE_INOTIFY is not #defined), SDL will no-longer build. This is because <unistd.h> is only included when HAVE_INOTIFY is defined, and PR #4098 adds a call to access(…, F_OK), which requires <unistd.h>. (Note that the F_OK symbol is the only one which actually prevented SDL from compiling, but both access() and close() fell back to implicit definitions, which is a bit concerning.) Fixes: 8d43f45a7b ("Don't use udev for joystick enumeration if running in a container")
Amir 360740ac 2021-02-19T18:07:53 correct dynapi
Amir 1a924bc0 2021-02-19T12:54:57 add SDL_AndroidShowToast for https://developer.android.com/reference/android/widget/Toast
Ludovico de Nittis 8d43f45a 2021-02-16T14:13:30 Don't use udev for joystick enumeration if running in a container If we are running in a container, like Flatpak[1] or pressure-vessel[2], it's likely that we are using user namespaces, therefore udev event notification via netlink won't work reliably. Use their filesystem API to detect them and automatically fallback to the inotify-based enumeration. [1] <https://flatpak.org/> [2] <https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/tree/master/pressure-vessel> Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
Ludovico de Nittis 2c326915 2021-02-16T12:39:48 Use inotify for HIDAPI joystick enumeration if not using udev This improves SDL's ability to detect HIDAPI joystick hotplug in a container environment because we cannot reliably receive events from udev in a container. For a more detailed explanation of why this issue happens with containers, please check the previous commit "joystick: Use inotify to detect joystick unplug if not using udev" (b0eba1c5). Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
Ludovico de Nittis b17242bf 2021-02-16T11:50:20 Allow libudev for HIDAPI joystick to be disabled at runtime As already explained in the previous commit "joystick: Allow libudev to be disabled at runtime" (13e7d1a9), libudev can fail in a container. To make it easier to experiment with, we add a new environment variable "SDL_HIDAPI_JOYSTICK_DISABLE_UDEV" that disables udev and let it fallback to the device enumeration using polling. Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
Jay 0052339b 2021-02-20T19:53:44 Move handleURLEvent setEventHandler to init
Sam Lantinga 42607909 2021-02-20T22:51:57 Remove devices from the list after they've been disconnected due to read errors. This fixes problems with controllers not being re-detected when a computer goes to sleep and a controller is removed and plugged back in while it's asleep.
Oschowa 08547adb 2021-02-20T09:28:03 pulseaudio: Add "zerocopy" playback path
Romain Roffé ef85ed93 2021-02-17T20:53:35 pulseaudio: Initialize fragsize to fix mic recording fragsize wasn't initialized, and it is used for recording. If the value was 0 or -1, pulseaudio configures it itself. But sometimes we can get a random (and large) value that makes pulseaudio give us large sample at a very low frequency. https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/master/src/pulse/def.h#L453 https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/v13.0/src/pulsecore/protocol-native.c#L409
Vanfanel e4a81a98 2021-02-17T12:06:29 [KMSDRM] Correct indentation.
Cameron Cawley 98bf79cf 2021-02-16T18:13:15 Minor improvements for CPU detection on ARM
Matt Borgerson 4aa2e748 2021-02-16T10:20:29 Add Xbox Controller S entry to gamecontrollerdb
Ozkan Sezer f2a2d0c6 2021-02-15T22:56:20 SDL_render_d3d.c: fix build with SDL_LEAN_AND_MEAN
Alex Szpakowski 09231c42 2021-02-15T11:51:00 Fix flags check in test code
Alex Szpakowski 9b9d0d48 2021-02-15T11:49:09 mac/iOS: allow Metal in windows created without an explicit backend Fixes SDL_CreateWindowAndRenderer (and similar situations) not choosing a Metal backend. See #3991. Passing an explicit backend into CreateWindow, eg SDL_WINDOW_OPENGL or SDL_WINDOW_METAL, will still prevent the window from being used with other backend types.
Ozkan Sezer a2fbc452 2021-02-15T03:02:32 replace i386 checks with __i386__
Cacodemon345 cf15faae 2021-02-14T14:24:38 Change "memset" to "SDL_zero"
Cacodemon345 c5f9e061 2021-02-14T13:13:34 Disable FreeBSD console mouse when initializing evdev input Enable it again after quitting evdev input.
Misa 3da58b47 2021-02-13T15:11:40 Fix errors with fallback impls of SDL_isxdigit() and SDL_ispunct() SDL_isxdigit() should only accept A-Fa-f, not A-Za-z (it shouldn't use SDL_isalpha()). SDL_ispunct() shouldn't accept spaces (it should use SDL_isgraph() instead).
Misa dfe219ec 2021-02-13T11:21:19 Add all missing "is characteristic" stdlib functions SDL has been missing a bunch of these 'isX' functions for some time, where X is some characteristic of a given character. This commit adds the rest of them to the SDL stdlib, so now we have: - SDL_isalpha() - SDL_isalnum() - SDL_isblank() - SDL_iscntrl() - SDL_isxdigit() - SDL_ispunct() - SDL_isprint() - SDL_isgraph()
Charlie Birks 1a48ca66 2021-02-04T16:20:54 emscripten: Create directory recursively in GetPrefPath
Stephan Vedder fa367cdd 2020-11-24T10:56:50 emscripten: Fix alt key being a nav key
Alon Zakai 20be1d63 2020-07-15T09:13:03 emscripten: Automatically resume audio contexts This uses the mechanism added in emscripten-core/emscripten#10843 which was applied to SDL1 and OpenAL. This adds the same for SDL2. This also reverts commit 865eaddffed50dbd13e6564c3f73902472cf74e8 which did something similar, but the new mechanism is more effective.
Charlie Birks edaf3f9c 2020-04-21T15:02:06 emscripten: Extend the "nav key" blacklist Add the F keys and Ctrl/Alt+*. Consistent with other naviagtion disabling. Also, none of these generate keypress events anyway.
Ethan Lee a99eec77 2021-02-12T14:31:43 wayland: Minor whitespace fix
Ryan C. Gordon 65fbf36c 2021-02-12T14:46:49 Cleaned up a few more Bugzilla mentions.
Ryan C. Gordon 4ff51d29 2021-02-12T14:15:29 Deprecate SDL_GetRevisionNumber and update things for git instead of hg. Fixes #4063
soredake 39153f81 2021-02-11T09:37:58 add Linux mapping for Ipega PG-9087S, closes #3783
Jay Petacat f443a6fc 2021-02-11T02:05:02 Fix format string warnings for width-based integers The DJGPP compiler emits many warnings for conflicts between print format specifiers and argument types. To fix the warnings, I added `SDL_PRIx32` macros for use with `Sint32` and `Uint32` types. The macros alias those found in <inttypes.h> or fallback to a reasonable default. As an alternative, print arguments could be cast to plain old integers. I opted slightly for the current solution as it felt more technically correct, despite making the format strings more verbose.
Sam Lantinga 5427f486 2021-02-11T17:28:07 Added support for trigger rumble for all Microsoft Xbox One controllers
Sam Lantinga 1f7ec3fa 2021-02-11T17:27:22 Added support for the PowerA Xbox One Series X Wired Controller
Ethan Lee cad67082 2021-02-04T19:04:56 wayland: Check for both _WAYLAND_CLIENT_H and WAYLAND_CLIENT_H
Sam Lantinga 629334f2 2021-02-09T15:02:55 Fixed bug 5543 - Wayland: Fix waylandvideo.h warnings wahil1976 This patch fixes the warnings seen when compiling the Wayland backend. This will also be required in the future to avoid issues with compilation.
Cameron Gutman f70e1973 2021-02-08T18:31:08 Fix waiting on condition variables with the SRW lock implmentation When SleepConditionVariableSRW() releases the SRW lock internally, it causes our SDL_mutex_srw state to become inconsistent. The lock is unowned yet inside, the owner is still the sleeping thread and more importantly the owner count is still 1. The next time someone acquires the lock, they will bump the owner count from 1 to 2. At that point, the lock is hosed. From the internal lock state, it looks to us like that owner has acquired the lock recursively, even though they have not. When they call SDL_UnlockMutex(), it will see the owner count > 0 and not call ReleaseSRWLockExclusive(). Now when someone calls SDL_CondSignal(), SleepConditionVariableSRW() will start the wakeup process by attempting to re-acquire the SRW lock. This will deadlock because the lock was never released after the other thread had used it. The thread waiting on the condition variable will never be able to wake up, even if the SDL_CondWaitTimeout() function is used and the timeout expires.
Sam Lantinga d9ba2044 2021-02-08T16:55:01 Backed out changeset 852a7bdbdf4b This causes a use-after-free memory error
Christian Rauch 4183211a 2021-02-08T16:01:37 free the 'display' after it was added to global list
Manuel Alfayate Corchete 005e2c59 2021-02-09T00:57:25 [KMS/DRM] Bugfix number #5535: Improve reliability, by wahil1976.
Ozkan Sezer dc45a228 2021-02-08T00:20:56 avoid some pedantic warnings in array initializers
Sam Lantinga 9c3aa7f0 2021-02-06T15:43:17 SDL: fix packet handling for original version of Stadia FW
Ozkan Sezer bb9e049d 2021-02-07T00:37:00 minor updates to libc function checks
Manuel Alfayate Corchete 19fa85d8 2021-02-06T16:05:55 [KMS/DRM] Fix build warning.
Manuel Alfayate Corchete 6ee53258 2021-02-06T14:03:53 [KMS/DRM] Replace indent tabs with spaces, as intended.
Manuel Alfayate Corchete 59cd46c2 2021-02-05T22:16:50 [KMS/DRM] Merge patch for bug #5532: No need to correct cursor position now that all windows are fullscreen. Link: https://bugzilla.libsdl.org/show_bug.cgi?id=5519.
Manuel Alfayate Corchete 538f7ad6 2021-02-05T00:27:11 [KMS/DRM] Remove redundant SDL_SendWindowEvent() call.
Manuel Alfayate Corchete 7beba050 2021-02-04T23:35:52 [KMS/DRM] Restore all-windows-are-fullscreen functionality, since there is no window manager in KMSDRM.
Cameron Gutman f4d58689 2021-02-03T18:00:22 Fix Xbox Series X controller on macOS There were two different implementations of IsBluetoothXboxOneController(), one in SDL_hidapi_xbox360.c and one in SDL_hidapi_xboxone.c. The latter had been updated to include USB_PRODUCT_XBOX_ONE_SERIES_X_BLUETOOTH while the former had not. This mismatch led to the Xbox Series X failing on macOS only. We have special code for handling the 360Controller driver for macOS which requires us to use the Xbox 360 driver for wired Xbox One controllers, and the SDL_hidapi_xbox360 version of IsBluetoothXboxOneController() was used to determine which devices were wired. In addition to adding the missing USB_PRODUCT_XBOX_ONE_SERIES_X_BLUETOOTH, this change moves IsBluetoothXboxOneController() into a single shared function which will ensure this bug won't happen again.
Sam Lantinga ff297753 2021-02-04T10:46:34 Fixed compiler warning
Sam Lantinga a60af1e4 2021-02-04T07:00:06 Backed out changeset 1cde3dd0f44d - this breaks windows which are created and then set to FULLSCREEN_DESKTOP
Sam Lantinga e404b525 2021-02-03T21:31:50 KMSDRM doesn't have a window manager, so all windows are fullscreen
Sylvain Becker 549bc133 2021-02-03T09:51:42 SDL_vulkan_utils: minor code clean-up
Sylvain Becker c0166a29 2021-02-03T09:32:09 SDL_ConvertColorkeyToAlpha: remove and clarify a FIXME This function doesn't handle bpp 1 or 3 case, because those formats never have an alpha channel
Sam Lantinga 85235985 2021-02-02T11:53:31 Fixed detecting the paddles on the Xbox Elite Series 1 controller
Sam Lantinga 69e9b2ac 2021-02-01T22:35:46 Fixed bug 5471 - Creating a fullscreen desktop window goes windowed temporarily This is caused by the Metal renderer recreating the window because by default we create an OpenGL window on macOS. It turns out that at least on macOS 10.15, a window that has been initialized for OpenGL can also be used with Metal. So we'll skip recreating the window in that case.
Sam Lantinga ef2f13e1 2021-02-01T22:30:31 Added test command line options to force different window types
Sam Lantinga 2426949a 2021-02-01T21:56:56 Removed support for clock_gettime_nsec_np() SDL_GetTicks() was broken and it's not adding any real value here.
Sam Lantinga fadfa510 2021-02-01T09:21:11 Don't uncorrelate while rumble is active and stay correlated longer in case raw input messages are lagging a bit.
Manuel Alfayate Corchete 2c764331 2021-01-31T04:04:26 [KMS/DRM] Merge patch for bug 5522#: Implement KMSDRM_GetWindowWMInfo().
Manuel Alfayate Corchete bfa51c38 2021-01-31T03:48:29 [KMS/DRM] Fix for bug #5518: only do async pageflips when hardware supports them.
Cameron Gutman 79cd8cab 2021-01-27T20:41:36 Add default handler for Alt+Tab while keyboard grab is enabled By default, we will minimize the window when we receive Alt+Tab with a full-screen keyboard grabbed window to allow the user to escape the full-screen application. Some applications like remote desktop clients may want to handle Alt+Tab themselves, so provide an opt-out via SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED=0.
Sylvain Becker 9d707113 2021-01-30T20:09:35 Revert checks on destination scaling size (see bug #5510)
Manuel Alfayate Corchete 088fb525 2021-01-29T23:32:42 [KMS/DRM] Correct small omission on bugfix #5513: y-coord correction has to be done on WarpMouseGlobal, too.
Sam Lantinga 2cc70ca3 2021-01-29T13:04:01 Fixed crash if the GameCube controller hasn't been opened yet
Sylvain Becker d6a6662f 2021-01-29T20:34:20 Remove checks on destination scaling size (see bug #5510)
Manuel Alfayate Corchete 8d95aba1 2021-01-29T18:17:16 [KMS/DRM] Remove unused KMSDRM_SetWindowGrab prototype in header file.
Manuel Alfayate Corchete b17c4950 2021-01-29T18:08:04 [KMS/DRM] Patch for bug #5513. KMSDRM backend can now manage and use several displays.
Cameron Gutman a78bce9e 2021-01-28T20:02:01 Properly handle keys already down when the hook is installed For keys that are already down when we install the keyboard hook, we need to allow the WM_KEYUP/WM_SYSKEYUP message to be processed normally. This ensures that other applications see the key up, which prevents the key from being stuck down from the perspective of other apps when our grab is released.
Sylvain Becker dc0ec827 2021-01-29T13:38:39 Remove old YUV fixme
Sylvain Becker ebb81431 2021-01-29T12:04:48 Add checks for maximun scaling size (see bug #5510)
Sam Lantinga 7f710e93 2021-01-28T14:54:01 Make sure we don't create a game controller mapping for HID devices that aren't supported by HIDAPI
Sam Lantinga 7e19c634 2021-01-28T14:53:59 Note that the Logitech G29 (PS4) is a racing wheel
Sebastian Krzyszkowiak e862856e 2021-02-01T08:57:39 wayland: Don't crash when the properties of already existing wl_output change
Sam Lantinga cef198c9 2021-02-01T08:55:48 Fixed bug 5524 - Pass NSString to NSLog() Hiroyuki Iwatsuki If you pass the C string directly to NSLog(), it will be garbled with Japanese and probably other language strings, or no log will be output at all. NSLog("Hello, World!"); // => "Hello, World!" NSLog("こんにちは、世界!"); // => No output... Therefore, you need to convert the string to an NSString before passing it to NSLog(). NSString *str = [NSString stringWithUTF8String:"こんにちは、世界!"]; NSLog(@"%@", str); // => "こんにちは、世界!" Thank you.
Christian Rauch 0ed16ced 2021-01-31T19:10:02 free 'outputs' in 'Wayland_DestroyWindow'
Christian Rauch a4467846 2021-01-31T19:09:44 free the 'data_device_manager'
Sebastian Krzyszkowiak 3ae2ec34 2021-01-31T19:06:37 wayland: Fix transform and scale handling when setting display mode
Sylvain Becker d59f8daf 2021-01-28T15:34:33 Fixed bug 5510 - simplify the scaling functions blit auto (generated file)
Sylvain Becker 0b338bff 2021-01-28T15:33:47 Fixed bug 5510 - simplify the scaling functions
Sylvain Becker dd6e02df 2021-01-28T11:03:45 SDL_stretch: remove un-used vars, same notation as blit functions
Sam Lantinga 1dc9180f 2021-01-27T21:30:25 Fixed compiler warnings
Sam Lantinga d59a9268 2021-01-27T21:30:21 Fixed build warning
Sam Lantinga eb83da02 2021-01-27T21:30:17 Fixed PS4 controllers over Bluetooth on Windows 7
Sam Lantinga d95a9eae 2021-01-27T21:30:13 Added WIN_IsWindows8OrGreater() for internal use
Cameron Gutman 808249a5 2021-01-27T19:40:55 X11: Ungrab the keyboard when the mouse leaves the window GNOME Mutter requires keyboard grab for certain important functionality like window resizing, interaction with the application context menu, and opening the Activites view. To allow Mutter to grab the keyboard as needed, we'll ungrab when the mouse leaves our window. To be safe, we'll do this for all WMs since forks of Mutter and Matacity (and possibly others) may have the same behavior, and we don't want to have to keep track of those.
Ozkan Sezer 87f09007 2021-01-28T00:11:24 SDL_LowerSoftStretchLinear: assign result from scale_mat() to ret. otherwise it would always return -1 when SSE and NEON instrinsics are absent.
Sam Lantinga 24d6fda2 2021-01-27T12:50:09 Fixed bug 3816 - asm code in video/SDL_stretch.c Sylvain I propose this new version for SDL_stretch.c that drops mprotect and asm Code is similar to the StretchLinear, but the steps computation are kept similar to the nearest. so that: - it's pixel perfect with nearest - as fast as asm I think - no asm, nor mprotect - benefit for all archicture