Log

Author Commit Date CI Message
Sam Lantinga 4990bd05 2022-07-27T16:17:32 Added debug code to show available inputs on iOS/tvOS controllers
Anonymous Maarten 65473ae3 2022-07-25T02:01:59 autoconf: use ax_compute_relative_paths
Sam Lantinga dbf79405 2022-07-27T10:31:24 Enable capturing raw Xinput2 touch events and use to flag global mouse state as dirty - Touch events may be translated to mouse movement events without the normal Xinput2 raw motion events being sent. Not all touch events will necessarily move the mouse but this ensures we update the global mouse state just in case. - Fix up some formatting CR: saml
Ryan C. Gordon 42165fe8 2022-07-27T12:12:03 kmsdrm: slightly better device index hint parsing.
Anonymous Maarten 02c87471 2022-07-27T15:05:41 math.h does not always provide M_PI This fixes the following error when building with SDL_LIBC: SDL\test\testautomation_math.c(1965): error C2065: 'M_PI': undeclared identifier
Anonymous Maarten 5da85376 2022-07-26T21:47:52 stdlib: move all mslibc functions to SDL_mslibc.c This allows disabling LTO on them by only specifying a single file.
Sam Lantinga a169259f 2022-07-27T09:05:02 Actually we don't need to unlock to send k_eSwitchProprietaryCommandIDs_ForceUSB since we don't wait for reply
Sam Lantinga c51464d9 2022-07-27T09:00:39 Put the Nintendo Switch Pro controller back into enhanced mode as needed Fixes https://github.com/libsdl-org/SDL/issues/3450
Anonymous Maarten 5c70e45c 2022-07-25T23:46:36 cmake: don't use result of 'find_library' for Android libraries
Anonymous Maarten 430c3908 2022-07-25T23:35:59 ci: test 'sdl2-config --static-libs' + 'pkg-config sdl2 --static' on ci
Anonymous Maarten 4690689a 2022-07-25T23:06:52 cmake: on Apple, don't use find_library for frameworks + use EXTRA_LDFLAGS
Sam Lantinga 613ce785 2022-07-26T13:34:27 Fixed interpreting SDL_KMSDRM_DEVICE_INDEX="" as index 0
Pierre Wendling 36d45679 2022-07-26T15:42:01 CI: Fix CMake workflow. - Add quotes the OSX_ARCHITECTURES list. - Extract the flag in the matrix.
Ryan C. Gordon cc982ea7 2022-07-26T15:43:34 kmsdrm: let device indexes be > 2 digits.
Pierre Wendling c37c1f7a 2022-07-26T15:24:38 CI: Make macOS universal build with CMake.
diddily 1f276a51 2022-07-26T13:30:59 Fix Main Thread Checker warning on macOS Cache off NSWindow's windowNumber in SDL_WindowData on setup and use that in `Cocoa_SendWakeupEvent` to prevent accessing windowNumber off the main thread.
Ryan C. Gordon 31d38f2f 2022-07-26T15:14:37 WhatsNew.txt: Note that minimum macOS version is now 10.9.
Ryan C. Gordon 542a4da3 2022-07-26T15:11:19 kmsdrm: check SDL_HINT_KMSDRM_DEVICE_INDEX hint in dri_getindex(). Otherwise, it would work for Init but not Available.
Ryan C. Gordon 218c3dbb 2022-07-26T14:45:26 cocoa: Don't crash if moving a message box created before SDL_Init. Fixes #5928.
Sam Lantinga f789bc7d 2022-07-26T11:36:01 Updated minimum OS targets on Apple platforms to match supported platforms using Xcode 13
Ryan C. Gordon 8ff738f2 2022-07-26T12:40:47 audio: Report SDL_AUDIODEVICEREMOVED for unopened devices. Unopened devices, if removed, now send SDL_AUDIODEVICEREMOVED events with a `which` field set to zero. Apps can use this to decide if they need to refresh a list of devices being shown in an options menu, etc. It's safe to call SDL_CloseAudioDevice(0), so even if they try to clean up this bogus id, it should be safe. Fixes #5199.
Ryan C. Gordon 5d85c7d3 2022-07-26T00:19:16 kmsdrm: Added a hint to specify device index. Fixes #2811.
Ryan C. Gordon 20a76b0e 2022-07-25T23:06:58 video: removed unused devindex argument from bootstrap's create method.
Sam Lantinga cbb3f4ca 2022-07-25T19:52:46 Add SDL_guid.h to the global SDL header
pionere 12211df6 2022-02-05T10:44:26 hide SDL_GenerateAssertionReport in case SDL_ASSERT_LEVEL is 0 otherwise SDL_PromptAssertion (and SDL_GenerateAssertionReport) can not be eliminated
Sam Lantinga a423848e 2022-07-25T11:26:18 Allow floating point values for SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED This allows setting the brightness of the home LED on Nintendo Switch Pro controllers, in the range 0.0 - 1.0. This can be updated at runtime by setting the hint dynamically. Fixes https://github.com/libsdl-org/SDL/issues/3787
diddily 1e492b2f 2022-07-25T10:12:53 Improve behavior of SDL_events_need_periodic_poll() and SDL_events_need_polling() SDL_events_need_periodic_poll() and SDL_events_need_polling() are intended to allow the event loop to update joysticks and/or sensors if needed, however those systems only update when the SDL_update_joysticks and/or SDL_update_sensors variables are true. This change brings the behavior of these functions in line with if work will actually need to be performed. This change allows the hints for AUTO_UPDATE to influence the polling behavior of the event loop such that an app can choose to update joysticks/sensors itself and avoid the expense of constantly sleeping and waking the event loop. Additionally in makes these functions marginally faster in some situations by not searching the active events.
diddily d9bda89f 2022-07-25T10:03:36 Fix updating SDL_update_joysticks and SDL_update_sensors in response to hint changes Hint callbacks are called before the actual value in the hint is changed, so the functions SDL_AutoUpdateJoysticksChanged and SDL_AutoUpdateSensorsChanged were not actually properly updating their respective variables in repsonse to their auto update hint changing. Instead, we pull the new hint value out of the value passed into the callback and use that to update the variables. Assume true on a null value as that was the previous behavior and it matches with the default values of SDL_update_joysticks/SDL_update_sensors.
diddily 0ec5bb4e 2022-07-25T10:37:23 Add missing controller events to `SDL_GameControllerEventState()` Events to handle controller touchpads and sensors were added to the library but not added in `SDL_GameControllerEventState()`. This change adds the missing events.
Anonymous Maarten f86ec47f 2022-07-25T15:08:33 ci: don't use ANDROID_NDK_HOME environment variable in Android workflow
Sam Lantinga 4d665017 2022-07-24T18:04:26 Fixed building with 10.9 SDK Fixes https://github.com/libsdl-org/SDL/issues/5954
Cameron Gutman 3ab1e303 2022-07-24T15:29:42 joystick: Refactor and fix a few bugs in Shield HIDAPI driver - CMD_CHARGE_STATE was checking the seqnum instead of the payload - Off-by-one error in size validation for command payload - Unused payload space was left uninitialized in output report
Cameron Gutman b8a55407 2022-07-24T15:19:02 testgamecontroller: Add battery reporting
Sam Lantinga 4d8bb89c 2022-07-24T11:50:14 Fixed mouse clip rect bounds on Windows Fixes https://github.com/libsdl-org/SDL/issues/5946
Dean Herbert 6bcde52d 2022-07-24T20:19:16 Further adjust implementation of `Cocoa_GetWindowDisplayIndex` As discussed in PR review, there may be an off-chance that the index returned doesn't match up with SDL's display indexing. This change ensures that the indices match and adds a safety check for off-screen windows.
Dean Herbert ce8aae14 2022-07-13T15:01:55 Fix `Cocoa_GetWindowDisplayIndex` failing and causing a catastrophic crash With the introduction of this function, it is possible that for certain monitor and window configurations, creating an SDL window will cause a native crash. ``` Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000050 Exception Codes: 0x0000000000000001, 0x0000000000000050 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [56627] VM Region Info: 0x50 is not in any region. Bytes before following region: 140737486737328 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> VM_ALLOCATE 7fffffe75000-7fffffe76000 [ 4K] r-x/r-x SM=ALI Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libSDL2.dylib 0x10247f665 SDL_UpdateFullscreenMode + 357 1 libSDL2.dylib 0x10247ec70 SDL_CreateWindow_REAL + 1504 2 ??? 0x111262de8 ??? 3 ??? 0x110c39fff ??? 4 libcoreclr.dylib 0x101fdf2a9 CallDescrWorkerInternal + 124 ``` Tracking thread from our end: https://github.com/ppy/osu-framework/issues/5190 Regressed with: https://github.com/libsdl-org/SDL/pull/5573 In testing, the window would not find a valid screen if created "hanging" off a primary display with a secondary display below it. In checking why this was the case, the `display_centre` was being calculated with a negative y origin, causing a final negative value falling outside all display bounds: ``` SDL error log [debug]: display_centre.y = -1296 + 1296 / 2 SDL error log [debug]: Display rect 0: 0 0 2560 1440 SDL error log [debug]: Display rect 1: 2560 -625 1080 2560 SDL error log [debug]: Display rect 2: 0 1440 1728 1296 ``` The method that was being used to find the current window using the frame origin/size seems unreliable, so I have opted to replace it with with a tried method (https://stackoverflow.com/a/40891902). Initial testing shows that this works with non-standard DPI screens, but further testing would be appreciated (cc @sezero / @misl6 from the original PR thread).
Sebastian Krzyszkowiak 041666e6 2022-07-24T05:45:59 video: wayland: Don't switch to libdecor path for borderless windows We actually request CSD mode with xdg-decoration for borderless windows, so we get what we wanted there and there's no point in going into fallback paths.
Sebastian Krzyszkowiak 405d1f65 2022-07-24T10:16:20 video: wayland: Roundtrip after falling back to libdecor in xdg-decoration handler Otherwise libdecor doesn't have a chance to acquire xdg-toplevel after libdecor_new before we attempt to use it in Wayland_ShowWindow. Fixes #5952
Anonymous Maarten fc2497b1 2022-07-23T18:05:35 Revert "cmake: don't add -mwindows to link flags in sdl2.pc" This reverts commit d211aaddc1edaad0e7d461d6837f3f1d2f9f4b41.
Anonymous Maarten 2fdedd17 2022-07-23T17:29:08 Revert 6fa7d62 and 856c99e5
Anonymous Maarten 856c99e5 2022-07-23T15:51:21 android: target android-19 by default when building with build-scripts/androidbuildlibs.sh
Anonymous Maarten 832754b9 2022-07-23T15:43:06 ci: install SDL when built as a subproject
Anonymous Maarten 6fa7d624 2022-07-23T15:31:35 ci: use android-ndk r25 (LTS) on CI
Anonymous Maarten d211aadd 2022-07-23T15:29:39 cmake: don't add -mwindows to link flags in sdl2.pc
Anonymous Maarten d63a699e 2022-07-23T15:29:13 cmake: by default, disable install target when building SDL as a subproject
Ozkan Sezer 8c51cae7 2022-07-23T14:56:04 audio/aaudio, audio/openslES: fix -Wdeclaration-after-statement errors Fixes https://github.com/libsdl-org/SDL/issues/5950
slime 65647b34 2022-07-22T22:07:52 SDL_Render: use high precision texcoords in ES2 shaders, when possible Fixes #5884
Sam Lantinga f9beef76 2022-07-22T18:58:29 Added support for the Nintendo Switch Joy-Con Controllers on iOS and tvOS 16
Sam Lantinga aad7ef6e 2022-07-22T10:58:34 Added support for the Nintendo Switch Pro Controller on iOS and tvOS 16
Sam Lantinga 59963473 2022-07-22T10:58:32 Enable bitcode by default for iOS and tvOS builds
Sam Lantinga 20f51b1f 2022-07-22T10:58:29 Fixed crash if debug text wasn't drawn during a session
Ozkan Sezer 8cd515c3 2022-07-22T20:37:28 better wording.
Frank Praznik 41b89aec 2022-07-22T12:23:44 video: Improve the SDL_WINDOW_ALLOW_HIGHDPI flag documentation Extend the SDL_WINDOW_ALLOW_HIGHDPI flag documentation to stress the importance of querying the window drawable size after every window event to avoid rendering issues in a mixed-DPI environment.
Ivan Epifanov 0a164163 2022-07-21T20:30:33 VIta: enable arm neon/simd optimisations
Anonymous Maarten e5698d13 2022-07-21T18:38:12 cmake: allow cmake re-configuration after installation of x11 library check_include_path is not meant to be used to check for presence of a library. This is because a BOOL is cached. Avoid this caching by using find_file. `find_file` caches a patch instead of a bool and will always run when the result failed.
Ozkan Sezer 192ae1e3 2022-07-21T17:11:30 WhatsNew.txt: added line for the calling convention fixes.
Anonymous Maarten 9ad3711a 2022-07-21T15:19:19 cmake: only enable x11_xss/x11_xrandr/x11_xfixes when its lib is available
Anonymous Maarten ac9e8691 2022-07-21T14:49:35 cmake: only build testnative when X11 is available
Anonymous Maarten aa7a6c0e 2022-07-21T14:38:57 cmake: only enable x11_xcursor and x11_xinput when its library is available
Anonymous Maarten 8f33de84 2022-07-21T14:08:19 cmake: set CMP0054 policy to NEW
Ethan Lee a33b5449 2022-07-20T19:11:42 WhatsNew.txt: Added audio channel support changes
Ethan Lee f3008e4a 2022-07-20T19:08:31 audio: 3- and 5-channel formats are now supported
Ryan C. Gordon bec721f0 2022-07-20T17:22:41 audio: Fixed dst pointer on channel conversions that grow in-place.
Ryan C. Gordon 9f56c7cf 2022-07-20T16:39:19 audio: Remove 5.1->X SIMD converters, add SSE mono->stereo. The 5.1 versions didn't use the new algorithm, and making that new algorithm work took so many permutes that it was significantly slower than just using the scalar versions. However, mono-to-stereo is an extremely common conversion, and it's trivial to accelerate it with plain SSE, so that was added!
Ryan C. Gordon b83ae9f2 2022-07-19T22:40:51 audio: Replaced some debug-printfs with debug-SDL_Logs. :)
Ryan C. Gordon f73d07da 2022-07-19T22:13:31 audio: Headers said 5 channel is quad+center, but it's 4.1.
Ryan C. Gordon 49ec8db5 2022-07-19T22:04:49 audio: Generate the channel converter code from a program.
Ryan C. Gordon f06cc3e9 2022-07-19T22:03:56 audio: "SL" means "surround left" not "side left", etc.
Ryan C. Gordon 5a0c8198 2022-07-19T22:03:02 audio: Add channel convert filter _after_ choosing an SIMD version.
Ryan C. Gordon fe160840 2022-07-19T16:04:48 audio: LOG_DEBUG_CONVERT should use SDL_Log, not fprintf(stderr).
Ryan C. Gordon 25727790 2022-07-19T02:16:08 audio: first attempt at rewriting the channel converters. This is not ready for production use!
Ryan C. Gordon 45c3b59d 2022-07-20T17:23:42 audio: Turn off DEBUG_CONFIG logging again.
Sam Lantinga be3a945a 2022-07-20T11:05:55 Added support for the 8BitDo Ultimate Wired Controller for Xbox
Ozkan Sezer b700a326 2022-07-20T07:01:10 audio, pipewire: fix signatures of pw_get_library_version and pw_init. Reference issue: https://github.com/libsdl-org/SDL/issues/5938
Ozkan Sezer 6e210d37 2022-07-20T07:01:10 audio, pipewire: pipewire_version_xx globals out of dynamic loading Fixes build with --disable-pipewire-shared Reference issue: https://github.com/libsdl-org/SDL/issues/5938
David Gow 78bad667 2022-07-16T22:12:08 video: wayland: Resize the window before sending the SDL_RESIZE event Currently, the SDL_WINDOWEVENT_RESIZED event is sent before the actual window is resized (and various internal state, such as the desired GL/Vulkan backbuffer size, are updated). This makes sense, as SDL will discard a no-op resize, which would be the case if we had resized before sending the event (indeed, there are existing hacks to prevent this). However, this means that SDL_{GL,Vulkan}_GetDrawableSize() will still use the old size in the SDL_WINDOWEVENT_RESIZED handler. In the case of SDL_Renderer, this means the drawable size it uses will be wrong, and the viewport will get "updated" to the old value. This then results in bug #5899.
Sam Lantinga 53e68516 2022-07-18T07:31:23 Fixed declaration-after-statement warning
Sam Lantinga 6ad7fdec 2022-07-18T07:26:29 Fixed infinite loop for values bigger than 0x40000000 Fixes https://github.com/libsdl-org/SDL/issues/5930
Sam Lantinga 98681814 2022-07-18T07:20:58 Fixed missing imports in SDLActivity (thanks @guusw!)
Sam Lantinga 2be93014 2022-07-18T07:18:56 Fixed comment (thanks @pionere!)
Sam Lantinga cef1514b 2022-07-17T09:07:04 Fixed some Xcode warnings
Sam Lantinga e3916993 2022-07-17T08:47:06 Added SDL_utils.c to the Xcode project
Sam Lantinga b299cb3d 2022-07-17T08:31:16 Added a utility function to calculate the next power of 2 for a value
Ethan Lee 90b86b13 2022-07-17T10:35:09 audio: Handle non-power-of-two spec.samples when unsupported Fixes #3685
Cameron Gutman d21a18c6 2022-07-17T01:06:16 WhatsNew.txt: Add line for Shield HIDAPI driver
Ethan Lee cdf9010a 2022-07-16T12:39:30 Added new audio features to WhatsNew.txt
Ethan Lee a09d62e4 2022-07-15T23:45:56 directsound: Remove redundant SubFormat copy
Ethan Lee c5e408ae 2022-07-15T11:31:59 directsound: For channel counts > 2, generate a dwChannelMask for CreateSoundBuffer
Ethan Lee fff34f63 2022-07-15T09:46:53 windows: SDL_IMMDevice needed more deinit code from the Win32 path. Fixes #5919
Frank Praznik 37aecda2 2022-07-14T11:38:51 pipewire: Use PW_KEY_TARGET_OBJECT to specify stream connection nodes Pipewire 0.3.44 introduced PW_KEY_TARGET_OBJECT, which is to be used to specify target connection nodes for streams. This parameter takes either a node path (PW_KEY_NODE_NAME) or serial number (PW_KEY_OBJECT_SERIAL) to specify a target node. The former is used in this case since the path is already being retrieved and stored for other purposes. The target_id parameter in pw_stream_connect() is now deprecated and should always be PW_ID_ANY when PW_KEY_TARGET_OBJECT is used.
Ozkan Sezer 2201d802 2022-07-14T02:40:00 avoid -Werror=declaration-after-statement after last commit.
freebsd 24b3efd0 2022-07-12T04:33:56 (OpenBSD) Exe Path: Use PWD instead of CWD and use CWD as fallback
Sam Lantinga 883409ea 2022-07-13T11:26:42 Added support for the misc1 button on the Nintendo Switch Pro Controller when using hid_nintendo kernel driver
SuperSamus 9a4f200d 2022-06-04T14:57:49 gamecontrollerdb: Linux, add mappings for hid-nintendo driver and more Taken from https://github.com/gabomdq/SDL_GameControllerDB/blob/master/gamecontrollerdb.txt
Sam Lantinga 7e2a9969 2022-07-13T08:57:40 Added a virtual joystick automated test Useful to verify https://github.com/libsdl-org/SDL/commit/4fa2653394150140c4d69cf66a78cd83e1175f99 on a big-endian system
Sam Lantinga 06c7d226 2022-07-12T18:53:53 Added mappings for the HORI Fighting Stick mini 4 on Linux and macOS
Sam Lantinga 27d8cbf0 2022-07-12T18:17:32 Added PowerA and Qanba vendors for Android USB device support
Sam Lantinga e24b971a 2022-07-12T17:53:03 Added support for the NVIDIA Shield controller guide button
Sam Lantinga c92ddddd 2022-07-12T13:00:43 Sort libraries by version and pick the shortest symlink (thanks @jpalus!) Fixes https://github.com/libsdl-org/SDL_image/issues/289
Cameron Gutman b321eae5 2022-07-11T19:43:25 joystick: Fix spurious battery empty events when opening a Shield controller