Log

Author Commit Date CI Message
Ludovico de Nittis 4df64027 2022-08-23T13:53:43 .editorconfig: Use correct path for wayland-protocols The Wayland protocol XML files are stored in the root directory of SDL and not in `src`. Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
Sam Lantinga 277b033e 2022-08-22T19:28:21 Refactor joystick GUID creation
antonino e3ea9b5b 2022-08-23T00:37:43 restore vrr state on exit
antonino 450e9857 2022-08-22T17:58:41 Use SDL_TRUE and SDL_FALSE
antonino aae566e1 2022-08-23T02:26:29 Use SDL_bool
antonino 605b50fc 2022-08-22T17:49:49 kmsdrm: added missing checks
Sam Lantinga c1e08739 2022-08-22T16:46:55 Added the CRC of the joystick name to the GUID This will make it possible to have mappings for different controllers that have the same VID/PID. This happens frequently with some generic controller boards that have been reused in many products. Fixes https://github.com/libsdl-org/SDL/issues/6004
Sam Lantinga 20715fa0 2022-08-22T17:09:42 Fixed build errors
Sam Lantinga 92b3c53c 2022-08-22T16:25:25 Added a hint SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE to control whether to use system mouse acceleration on raw relative motion. This is currently only implemented on Windows, and "Enhanced pointer precision" mode is not quite correct.
yurii levchenko 3ce3594e 2022-08-23T00:25:29 Split SDLSurface to public class Add SDLActivity method createSDLSurface
Sam Lantinga d166f5ef 2022-08-22T14:10:54 Fixed uninitialized variable warning
Sam Lantinga b2819e43 2022-08-22T13:10:57 Send SDL_CONTROLLERDEVICEREMOVED for all joysticks because we don't know after the fact whether it was a game controller. Fixes https://github.com/libsdl-org/SDL/issues/2092
Sam Lantinga 0e61c106 2022-08-22T12:49:41 Don't calculate relative mouse motion if we don't have a valid position Fixes https://github.com/libsdl-org/SDL/issues/1928
slime b204db1e 2022-08-21T18:06:11 cocoa: change Shape data to use ObjC objects instead of C structs. Fixes #6089
Frank Praznik d731ad76 2022-07-15T10:44:38 wayland: Fix include order when building with libdecor The libdecor header internally includes wayland-client.h, which pulls in the wayland-client-protocol.h file from the system include path and overrides the local one generated from the included Wayland protocol spec files. Move the Wayland protocol header inclusion above the libdecor header inclusion to ensure that the locally generated protocol header is used instead.
Frank Praznik 057086e3 2022-07-15T13:44:49 wayland: Add high resolution scroll wheel support Update the Wayland core protocol spec file and add support for the new axis_value120 event to handle high resolution scroll wheels. The axis_value120 replaces the axis_discrete event, which is no longer sent as of version 8 of the protocol. Note that unlike the axis_discrete event, no mention in the spec is made regarding how many axis_value120 events may occur per-axis per-frame, so the values are accumulated and committed when the pointer frame event occurs.
Ryan C. Gordon 4ca7b378 2022-08-21T11:35:14 x11: Specify windowed dimensions when creating fullscreen windows. This lets the window manager adjust the window correctly if it ever leaves fullscreen mode. Fixes #5725.
SDL Wiki Bot a7066c52 2022-08-21T14:05:04 Sync SDL wiki -> header
Anonymous Maarten 996eb2ed 2022-08-21T04:03:32 cmake: add library directories & pthread to imported targets of sdl2-config.cmake This fixes linking to SDL2::SDL2-static on systems where external libraries such as X11 are not in a standard location. Pthread also needs special care.
SDL Wiki Bot 8fb1b50a 2022-08-20T17:50:04 Sync SDL wiki -> header
Sam Lantinga ffab1396 2022-08-19T17:28:31 Fixed minimized window detection when handling WM_WINDOWPOSCHANGED When minimizing a window, we get this sequence of events: WM_WINDOWPOSCHANGING WM_GETMINMAXINFO WM_NCCALCSIZE WM_WINDOWPOSCHANGED - IsIconic() is true WM_MOVE WM_SIZE - SDL sees minimized state here When restoring a window, we get this sequence of events: WM_WINDOWPOSCHANGING WM_GETMINMAXINFO WM_NCCALCSIZE WM_NCPAINT WM_ERASEBKGND WM_WINDOWPOSCHANGED - IsIconic() is false WM_MOVE WM_SIZE - SDL sees restored state here On Windows 10 a minimized window has a non-empty client rect, so we were delivering a minimized size before SDL knows that the window is minimized, and then ignoring the restored size when handling the restore message. The fix is to use IsIconic() which returns the correct window state when WM_WINDOWPOSCHANGED is actually delivered.
Oleg Derevenetz a204ef50 2022-08-19T22:16:04 Use __ARM_ARCH instead of __ARM_ARCH__
Sam Lantinga 5a3adbfd 2022-08-19T11:11:25 Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED to control whether the player LED is set on Xbox 360 controllers
Sam Lantinga 52b6899a 2022-08-19T11:11:23 Added hints for more fine grained control over HIDAPI Xbox controller support
Anonymous Maarten bf327b52 2022-08-19T19:01:04 autotools: run ./autogen.sh
Luke Street 2b93f6e1 2022-05-20T09:55:06 cocoa/uikit: Use VK_EXT_metal_surface in Vulkan_GetInstanceExtensions Replaces VK_MVK_macos_surface and VK_MVK_ios_surface
Luke Street 029a9b2f 2022-05-19T12:57:35 cocoa/uikit: Support VK_EXT_metal_surface Uses VK_EXT_metal_surface (vkCreateMetalSurfaceEXT) when possible, otherwise falls back to the obsoleted VK_MVK_macos_surface and VK_MVK_ios_surface. Fixes #3906
antonino ad874536 2022-08-17T14:56:18 kmsdrm: enable vrr on displays that support it
Sam Lantinga 6e9c14e5 2022-08-19T09:38:42 Updated to version 2.25.0 for development
Sam Lantinga 8c9beb0c 2022-08-19T08:44:09 Updated to version Updated to version 2.24.0 for release
Sam Lantinga 6e007c36 2022-08-18T19:05:55 Add null termination to Wayland_data_source_get_data() if requested Fixes https://github.com/libsdl-org/SDL/issues/6083
Sam Lantinga 948dbe7d 2022-08-18T16:24:20 Don't include the null terminator in Wayland clipboard text Fixes https://github.com/libsdl-org/SDL/issues/6083
Sam Lantinga f6b81125 2022-08-18T16:05:22 Always define SDL_COMPILE_TIME_ASSERT as static_assert() in C++ Apparently some versions of gcc will define __STDC_VERSION__ even when compiling in C++ mode. Fixes https://github.com/libsdl-org/SDL/issues/6078
Frank Praznik 3bae2d57 2022-08-18T12:39:47 wayland: Set the libdecor app ID after visibility calls Set the frame app ID after toggling visibility or the name displayed in window manager task switchers may not display correctly.
Ryan C. Gordon 51be30f3 2022-08-17T21:37:32 emscripten-buildbot.sh: force `-s USE_SDL=0` This avoids using Emscripten-provided SDL headers from its own sysroot instead of the headers in our own include directory! Reference https://github.com/emscripten-core/emscripten/discussions/17647
Sam Lantinga 8acb4e45 2022-08-17T14:25:30 Fixed interactions between mouse capture and grab on X11 Fixes https://github.com/libsdl-org/SDL/issues/6072
Frank Praznik 7da74eb5 2022-08-17T14:59:23 wayland: Never commit with an undefined window title If libdecor performs a commit with the frame title being undefined, a crash can occur within the library or its plugins. Always ensure that the title is set to a valid string to avoid this.
Cameron Gutman 99e9156f 2022-08-16T19:50:59 testgles2: Fix typo in help text
Cameron Cawley 09b6956d 2022-08-16T15:08:10 opengl: Support NV12 textures on GPUs with only 2 texture units
Cameron Cawley 2fcd8f88 2022-08-16T14:19:26 Handle SDL_PIXELFORMAT_EXTERNAL_OES in SDL_GetPixelFormatName()
Cameron Gutman 222f1a26 2022-08-15T22:51:15 testgles2: Add --threaded option to use a render thread per window This is helpful for reproducing bugs like #6056
Sam Lantinga 9670d2bb 2022-08-15T17:27:33 Make sure we hold the joystick lock when disconnecting a HIDAPI joystick This prevents crashes when calling SDL joystick API functions from a different thread while disconnection is happening. See https://github.com/libsdl-org/SDL/issues/6063 for a more thorough review of joystick locking.
Ryan C. Gordon 26948f01 2022-08-15T20:09:09 cocoa: Make SDL_MinimizeWindow() work with borderless windows. Fixes #6046.
Frank Praznik 650612fd 2022-08-13T16:54:27 wayland: Eliminate excessive calls to SetFullscreen Eliminate excessive calls to SetFullscreen by removing the calls in the libdecor and xdg-toplevel config callbacks. These calls were being made there in case something explicitly called the window minimization function from within SDL, which unsets fullscreen, and as minimizing a window in Wayland is just a suggestion to the compositor and doesn't actually change the window state or communicate anything back to the application, it was necessary to call SetFullscreen in every call to the config functions just in case something minimized a window via SDL_MinimizeWindow() and later needed to restore it. GNOME in particular had issues when fullscreen set/unset operations were being hammered, leading to overlapping acks and commits when switching to fullscreen. With the new video system flag to disable unsetting fullscreen when minimizing a window, these calls in the configuration functions are no longer needed and can be removed. This significantly reduces calls to the SetFullscreen() function, reverts #6044 while fixing the issue, and fixes a similar problem when hiding and showing a window initially created with fullscreen flags.
Frank Praznik cc9cc202 2022-08-13T16:43:15 video: Add video device quirk flags and apply them to the video subsystem Add quirk flags to the video device struct and add flags to allow video backend drivers to disable mode switching and disable unsetting the fullscreen mode when minimizing a window. As certain platforms can have multiple video backends compiled in at once, #ifdefs, as used by other platforms, aren't suitable as different backends on the same platform may not need the same quirks. This replaces the formerly dedicated 'disable_display_mode_switching' boolean as additional quirks are needed by the Wayland backend. Helper functions have also been added to simplify reading the flag states.
Sam Lantinga 0cc8dfdb 2022-08-15T07:44:56 Added SDL_system.h for the declaration of SDL_iPhoneSetAnimationCallback() and SDL_iPhoneSetEventPump()
Mathieu Eyraud c6c688ab 2022-08-14T14:55:32 Add SDL_JOYBATTERYUPDATED event to SDL_JoystickEventState()
Frank Praznik b72cf207 2022-08-14T09:41:42 core: linux: Don't cache the RealtimeKit D-Bus connection If the D-Bus subsystem is shutdown and restarted mid-execution, the cached connection will be invalid. Fetch it each time that it is used to ensure that the connection is always from the current context.
Francisco Javier Trujillo Mata 7d5ccae2 2022-08-14T12:15:55 Fix memory leak when destroying texture
Francisco Javier Trujillo Mata 5b4b4fa1 2022-08-14T12:01:56 Decrease audio thread priority when created
Sam Lantinga cf134235 2022-08-13T08:23:40 Removed line wrapping in patch notes
Sam Lantinga cb46e1b3 2022-08-12T20:51:44 Removed unused variable
Sam Lantinga 67cb3874 2022-08-12T20:51:28 Fixed potential uninitialized variable usage
Frank Praznik 74bdb211 2022-08-12T22:01:12 wayland: Don't roundtrip in ShowWindow unless restoring a hidden window Don't call the roundtrip in ShowWindow unless restoring a previously hidden window. This fixes a regression in GNOME when creating a window with the fullscreen flag set, as the fullscreen window will be positioned down the screen by the height of the top bar if the window is made fullscreen on the primary display and the roundtrip is called when initially displaying the window.
Cameron Gutman 3046d55d 2022-08-12T22:02:26 cocoa: Return an error if GetWindowDisplayIndex() is called too early SDL_CreateWindow() may call GetWindowDisplayIndex() to compute the position of a new window that the caller has requested to be placed on a certain display. Since we haven't fully constructed the window yet, our driverdata will be nil and we will fail to get the NSScreen (which is fine). However, we need to return an error (not 0, which is a valid display index) for SDL_GetWindowDisplayIndex() to know to figure out the display index itself. Fixes positioning new windows on secondary displays when using SDL_WINDOWPOS_CENTERED_DISPLAY() and SDL_WINDOWPOS_UNDEFINED_DISPLAY().
Sam Lantinga f1416ef2 2022-08-12T20:27:22 Updated to version 2.23.2 for release candidate
Sam Lantinga 08d17f47 2022-08-12T20:26:23 Removed unused variable
Sam Lantinga be0cf257 2022-08-12T18:13:42 Only force the resize event in the DPI changed case OpenGL windows don't actually get the WM_WINDOWPOSCHANGED event in the SetWindowPos() call in WIN_SetWindowFullscreen(), so setting the window size to zero never gets reset and we're stuck with a zero sized window. Instead, just force the resize event in WM_DPICHANGED handling, where we know we need it. If we end up needing to force it in WIN_SetWindowFullscreen(), just set a flag in the window data and respond to that in WM_WINDOWPOSCHANGED, but that's a fairly risky behavior change as suddenly all applications would start getting SDL_WINDOWEVENT_SIZE_CHANGED when going fullscreen, and they may respond to that in expensive and potentially disruptive ways. For later we'll probably create a DPI changed event and respond to that in the renderer instead of this window size changed hack. This fixes https://github.com/libsdl-org/SDL/issues/6033 @ericwa
Sam Lantinga b880709e 2022-08-12T18:11:27 Added libusb hack for Gamesir-G3w which needs the same adjustment as the Hori controllers
Cameron Gutman 1b08cd20 2022-08-12T18:55:05 wayland: Add roundtrip in SetWindowFullscreen() to get new size The video core assumes that window->w/h will be updated before returning from SetWindowFullscreen(). This is needed to generate a resize event with the correct window size when exiting fullscreen. The roundtrip allows us to receive the configure callback that informs us of the new window size before returning. Fixes #6043
Cameron Gutman 780b031b 2022-08-12T16:39:39 wayland: Avoid duplicate resize events when entering fullscreen
Ethan Lee a28f426a 2022-08-12T16:13:24 render: Only update size/scale/viewport when moving to a new display, rather than all window movement. We really only care about DPI changes here, so this both reduces work and also avoids weird cases where viewport state can be corrupted by trivial window events. This doesn't _completely_ get rid of the issue but this is somewhat intentional, since apps will definitely want to do a full reset when changing displays anyhow (otherwise DPI/adapter changes will screw things up, and that's out of our control as long as both window size and drawable size are exposed at the same time. Note that OpenGL still captures window events because of weird platform-specific issues like macOS and viewport stretching! Fixes #5949
Your Name cfbeb438 2022-08-12T21:05:37 fix a bug if XINPUTGETBATTERYINFORMATION is nullptr
Sam Lantinga f42291ce 2022-08-11T16:13:14 Don't change mouse capture based on touch events Fixes https://github.com/libsdl-org/SDL/issues/5652
Sam Lantinga bf925b9e 2022-08-11T14:41:48 Fixed build
Sam Lantinga 24f97dd7 2022-08-11T14:39:49 Added an SDL error to SDL_GameControllerMapping* functions
Sam Lantinga 9f30d498 2022-08-11T14:27:08 Added note about CRC algorithm compatibility
SDL Wiki Bot f35bbe0c 2022-08-11T21:11:11 Sync SDL wiki -> header
Sam Lantinga 3861c557 2022-08-11T13:58:39 Added the hint SDL_HINT_MOUSE_RELATIVE_WARP_MOTION This hint controls whether mouse warping generates motion events in relative mode, and defaults off. Fixes https://github.com/libsdl-org/SDL/issues/6034 Fixes https://github.com/libsdl-org/SDL/issues/5741
Sam Lantinga c2db429f 2022-08-11T13:20:17 Added SDL_crc16.c to the Xcode project
Ozkan Sezer e69838e7 2022-08-11T20:11:32 add SDL_crc16.c to msvc and watcom builds
Sam Lantinga b4c4dd84 2022-08-11T09:52:58 Added SDL_crc16() to be used in joystick GUIDs after 2.24.0
Sam Lantinga a1e34b5e 2022-08-11T08:52:51 Don't send a resize event when the window is resized to the dock icon Partially addresses https://github.com/libsdl-org/SDL/issues/6033
Sam Lantinga 879af7b5 2022-08-10T14:01:23 Fixed mapping for paired Joy-Con controllers on iOS
Guldoman 5f682e77 2022-08-10T20:01:15 wayland: Remove freed display from `SDL_WaylandOutputData->output_list`
Sam Lantinga aaec244c 2022-08-10T09:04:17 Don't run the stdio automated tests if libc isn't available
Sam Lantinga e49321ce 2022-08-10T08:20:54 Fixed double-free in combined HIDAPI controller code
SDL Wiki Bot 6ecfc406 2022-08-10T15:02:11 Sync SDL wiki -> header
Sam Lantinga d4192850 2022-08-10T07:59:12 Added SDL_ResetHint() to reset a hint to the default value Resolves question of how to clear an override hint raised by @pionere in https://github.com/libsdl-org/SDL/pull/5309
Ryan C. Gordon 3119d58f 2022-08-10T10:48:23 cocoa: Change the new sync_dispatch hint to async_dispatch. This is so the default is safer.
Ryan C. Gordon c6c0a839 2022-08-10T09:54:49 windows: If a display's friendly name is blank, try the generic name. Fixes #6031.
Sam Lantinga 9ff498e7 2022-08-10T06:00:30 Make HIDAPI_JoystickOpen() more robust against internal logic errors Fixes https://github.com/libsdl-org/SDL/issues/6030
Ryan C. Gordon bdc7f958 2022-08-10T00:41:25 cocoa: Added hint to treat MacBook trackpads as touch devices, not mice. Fixes #5511.
Pierre Wendling 73d8d026 2022-08-09T22:36:59 Test: Fix Exp base case for Win32. Add epsilon to the check.
Sam Lantinga 8e782876 2022-08-09T21:30:11 Fixed spamming the controller with reset IMU commands when they are failing
Sam Lantinga eab27b90 2022-08-09T17:58:42 Make sure Switch controller initialization is synchronous and start the input timeout then
Salman Ahmed b4660e9d 2022-08-10T03:40:00 macOS: Add hint for blocking thread on OpenGL context update dispatch (#5708)
pionere 7eb13c21 2022-08-10T02:27:25 improve behavior of SDL_SetHint(WithPriority) (#5309)
Sam Lantinga 1db7d33d 2022-08-09T17:04:26 Recover from Bluetooth devices temporarily out of range
Sam Lantinga 6d012b2a 2022-08-09T16:54:11 Better fix for rescanning devices after read failure
Sam Lantinga 483a010f 2022-08-09T15:39:39 Fixed accidentally deadlocking the rumble thread with combined Joy-Cons Also added more accurate check for sensor data. At least one axis will always have acceleration because of gravity.
Sam Lantinga 5d63a3d4 2022-08-09T14:06:49 Re-enumerate devices if a read fails This allows combined Joy-Con devices to immediately separate if one of them is disconnected
Sam Lantinga da50f1bd 2022-08-09T14:05:43 Bluetooth devices can recover from over a second of dropped reports
Sam Lantinga 824f2d46 2022-08-09T13:41:58 Added a second hint SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED to control the Home button LED on Nintendo Joy-Con controllers separately from Nintendo Switch Pro controllers
Sam Lantinga 8aa6922f 2022-08-09T13:25:52 Fixed detecting Bluetooth disconnection on Nintendo Switch controllers
Ryan C. Gordon 3a9295e1 2022-08-09T16:02:16 build-scripts: Removed winrtbuild.*, no longer used. WinRT/UWP is still supported, but you have to use the VS2019 project files, now. Fixes #5639.
Anonymous Maarten 53141a56 2022-08-09T22:05:03 Expand CMake documentation a bit (#5961) * cmake: remove duplicate check_required_components macro * Expand docs/README-cmake.md a bit * cmake: path needs `/` infix
Ryan C. Gordon a346c4bb 2022-08-09T15:41:02 egl: Add support for SDL_GL_FLOATBUFFERS. Fixes #6001.
Sam Lantinga 201484ff 2022-08-09T09:03:28 Don't duplicate the serial number twice if a child doesn't set one
Sam Lantinga d90c0d41 2022-08-09T09:00:29 Include the child serial numbers in the serial number for a HIDAPI combined device