Commit Graph

14056 Commits (6dd68273438e979590e8211d8a85cd785c9d4bd3)

Author SHA1 Message Date
Dimitriy Ryazantcev 0413f6fc49
Use SDL_iscntrl() call instead of manual code that is doing the same (#8593) 2023-11-21 08:36:32 -08:00
Zack Middleton fd91178d7f Make size cursors be double arrows on Wayland
I added fallbacks as they are listed under "to be discussed" in the spec
but I don't know if they're necessary.

https://www.freedesktop.org/wiki/Specifications/cursor-spec/
2023-11-21 08:34:30 -08:00
Zack Middleton 5e9b0820f3 Add cursors for X11/Wayland window resizing 2023-11-21 08:34:13 -08:00
Dimitriy Ryazantcev 91e122316c Use SDL_small_alloc() instead of SDL_stack_alloc() in CreateMaskBitmap() 2023-11-21 07:42:01 -08:00
Ionuț Leonte b76f8de298
Hit testing tweaks for X11 and Wayland (#8582)
Hit testing on X11 and Wayland should now behave more like it
does on Windows - the current active zone is tracked on mouse
motion events and the cursor is changed accordingly when hovering
a "special" zone (such as the resize handles).
2023-11-20 13:33:11 -08:00
Ryan C. Gordon 5b1c68c2f3
testshader: Don't make local variables with the same name as GL entry points.
Reference Issue #2706.

(cherry picked from commit cb5b8c97472ed1c759bb6934372e3c3ff4aad8f3)
2023-11-20 15:12:37 -05:00
Sam Lantinga 30a2291d59 Fixed compatibility with sdl2-compat (thanks @sezero!) 2023-11-20 08:46:12 -08:00
Dimitriy Ryazantcev 49d58bc73a Cleanup WIN_CreateCursor() code a bit
Generate bimap mask from the alpha channel.
2023-11-19 12:41:12 -08:00
Frank Praznik 4722269fb6 tests: Print window occluded log events 2023-11-18 10:50:39 -05:00
Cameron Cawley 5db781cc3d Use the correct pixel formats for OpenGL ES on big endian 2023-11-17 15:02:44 -08:00
Cameron Cawley 05e7dcf8f8 Support returning <8bpp surfaces in SDL_LoadBMP_RW 2023-11-17 08:45:32 -08:00
Cameron Cawley 773ec1cfcb Extend blitting support for all <8bpp formats 2023-11-17 08:45:32 -08:00
Cameron Cawley 753bbd199e Add SDL_PIXELFORMAT_INDEX2LSB and SDL_PIXELFORMAT_INDEX2MSB 2023-11-17 08:45:32 -08:00
Cameron Cawley fda69e5e79 Test both MSB and LSB indexed surfaces in testautomation 2023-11-17 08:45:32 -08:00
Ozkan Sezer 39870031d1 use format string attributes for functions accepting va_list params, too 2023-11-17 15:56:10 +03:00
Sam Lantinga 666301f9f9 Fixed build with older macOS SDK 2023-11-16 21:01:28 -08:00
Sam Lantinga 238987df3b Always use physicalInputProfile on OS versions that support it
Also cleaned up @available warnings in the GCController support
2023-11-16 16:08:53 -08:00
Sam Lantinga e424dcca4b More fixing the build with older macOS SDKs 2023-11-16 12:04:45 -08:00
Sam Lantinga 4ebb0c6dac Revert "Fixed build"
This reverts commit 7abacc9f9f.
2023-11-16 12:03:39 -08:00
Sam Lantinga 7abacc9f9f Fixed build 2023-11-16 11:44:59 -08:00
Sam Lantinga ac1f896f89 Fixed building with older macOS SDK 2023-11-16 10:49:13 -08:00
Sam Lantinga 8043dad369 Fixed build warning 2023-11-16 10:28:54 -08:00
Sam Lantinga 5c8c3931f2 Removed outdated information about SDL_GetWindowWMInfo() 2023-11-16 09:56:16 -08:00
Sam Lantinga e0d0d140b2 Fixed SDL_GetWindowWMInfo() code example 2023-11-16 09:55:06 -08:00
Sam Lantinga f61c0f3dc1 SDL_HINT_TV_REMOTE_AS_JOYSTICK should only affect Siri Remotes on Apple TV
Other gamepads like the iBuffalo Classic USB Gamepad will not have a standard profile, but shouldn't be ignored when this hint is enabled.
2023-11-16 09:19:27 -08:00
Sam Lantinga 51fc134cad Added support for the second generation Siri Remote on Apple TV 2023-11-16 09:07:29 -08:00
Sam Lantinga bfba9de43a Revert "Map Siri Remote touchpad to D-Pad for consistency with physicalInputProfile mapping"
This reverts commit 2999634f29.

The physicalInputProfile mapping maps the touchpad to left thumbstick now, as the 2nd generation Siri Remote has both touchpad and cardinal direction D-Pad functionality
2023-11-16 09:07:29 -08:00
Ryan C. Gordon f2c12fe5f3
Removed TODO.txt
This is obviously not how we track bugs at this point.  :)
2023-11-16 08:47:37 -05:00
Sam Lantinga d4448fe3d2 Update virtual joystick test now that we're just using abxy for mappings, for compatibility 2023-11-16 00:02:47 -08:00
Sam Lantinga f40f272107 Fixed build 2023-11-15 23:58:39 -08:00
Sam Lantinga 34bdd321bf Improved navigation while setting up controller mapping
* Moving forward and backward don't clear the current binding
* Use the tertiary face button to delete the current binding
* More small improvements to make navigation more intuitive
2023-11-15 23:46:31 -08:00
Sam Lantinga 57e5c7f6ee We'll just use the legacy names for face buttons in the mappings
This fixes being able to accidentally rebind the face buttons in testcontroller
2023-11-15 22:09:09 -08:00
Sam Lantinga 051ed397d1 Removed testautomation_syswm.c from the Xcode project 2023-11-15 21:51:22 -08:00
Sam Lantinga fb08c22abf Disable controller state debug messages 2023-11-15 21:46:45 -08:00
Sam Lantinga 2999634f29 Map Siri Remote touchpad to D-Pad for consistency with physicalInputProfile mapping 2023-11-15 21:04:25 -08:00
Sam Lantinga 2ff9255f29 Print the GUID for controllers that don't have a mapping 2023-11-15 21:04:25 -08:00
Sam Lantinga 64939d3586 Switch the menu button on the Apple TV remote to the B button to match UI guidelines 2023-11-15 21:04:25 -08:00
Sam Lantinga 0fe5713964 Improved GCController handling on Apple platforms
Automatically map controllers as gamepads when using the GCController framework and prefer the physicalInputProfile when possible.

Testing with macOS 13.4.1, macOS 14.1.1, iOS 15.7.4, tvOS 17.1:
* iBuffalo Classic USB Gamepad (macOS only)
* Logitech F310 (macOS only)
* Apple TV remote (tvOS only)
* Nimbus MFi controller
* PS4 DualShock controller
* PS5 DualSense controller
* Xbox Series X controller
* Xbox Elite Series 2 controller
* Nintendo Switch Pro controller
* Nintendo Switch Joy-Con controllers
2023-11-15 21:04:25 -08:00
Sam Lantinga aaf54b09a1 Revert "Cleanup WIN_CreateCursor() code a bit"
This reverts commit 876c97454a.

This caused the blank cursor to be entirely black
2023-11-15 11:32:06 -08:00
Ryan C. Gordon e923a458ea
audio: Protect against race conditions when closing a physical device.
This specifically deals with two threads closing the same device at the same
time, and a thread trying to reopen the device as it's still in process of
being closed. This can happen in normal usage if a device is disconnected:
the OS might send a disconnect event, while the device thread also attempts
to manage a disconnect as system calls start to report failure.

This effort is necessary because we have to release the device lock during
close to allow the device thread to unblock and cleanly shutdown. But the
good news is that all the places that call ClosePhysicalAudioDevice can now
safely hold the device lock on entry, and that one function will manage the
lock tapdancing.
2023-11-15 14:17:14 -05:00
Ryan C. Gordon 8fa0746d4a
audio: Fix postmix state when migrating to new default devices.
Otherwise buffers might not be allocated, etc.
2023-11-15 14:17:13 -05:00
Frank Praznik 078995bbe0 x11: Set the skip taskbar and skip pager atoms on utility windows
Some compositors apparently still need these set to keep the window out of the taskbar and pager, even with the utility window atom being set.
2023-11-15 04:43:37 -05:00
Ryan C. Gordon a58af6d0d1
wasapi: Reference devices when proxying to management thread.
Otherwise, a disconnect/default change on another thread may cause the
device pointer to become invalid by the time the management thread runs the
task.
2023-11-14 16:20:14 -05:00
Sam Lantinga 34392db9c3 Fixed IOS_SupportedHIDDevice() returning SDL_FALSE before initialization 2023-11-14 10:57:47 -08:00
Sam Lantinga 708f18d49e Added SDL_HINT_JOYSTICK_IOKIT and SDL_HINT_JOYSTICK_MFI to control whether the IOKit and GCController drivers should be used for joystick support.
This can be used to work around issues where the Apple GCController driver doesn't work for some controllers but there's no way to know which GCController maps to which IOKit device.
2023-11-14 10:28:19 -08:00
Louis M bd4966999b Replacing SDL_SCANCODE_AUDIOMUTE by SDL_SCANCODE_MUTE on Windows
(cherry picked from commit 925362a2fcf0a7065ade5e9e55572c377d716edd)
2023-11-14 09:27:43 -08:00
Sam Lantinga 15504da0b8 Fixed mouse wheel scrolling direction on iOS 2023-11-14 09:10:56 -08:00
Sam Lantinga f5600fd9f4 Fall back to using the physical profile for Apple controllers if they don't match a standard profile
We may want to flip this to be the default, but it needs more testing.
2023-11-14 06:29:09 -08:00
Sam Lantinga 924de4df48 Enable transparent windows when using the D3D11 renderer
Note that this will not work with D3D12, as DXGI_SWAP_EFFECT_DISCARD is not available there.
2023-11-14 06:06:51 -08:00
Sam Lantinga 1c64366b80 Added SDL_CreateRendererWithProperties() and SDL_CreateTextureWithProperties() 2023-11-14 06:06:51 -08:00