Ethan Lee
a3eb297ec2
wayland: Rework enter/leave and update_scale_factor to avoid bogus wl_output data.
...
Also remove get_window_scale_factor() which was just pointless indirection.
2021-07-27 14:21:32 -07:00
Simon Zeni
6aae5b44f8
Remove wl-shell and xdg-shell-unstable-v6 support ( #4323 )
...
* wayland-protocol: update wayland.xml to 1.19.0
* wayland: remove shell_surface field from SDL_SysWMinfo
* wayland: remove wl_shell support
* waypand-protocols: update xdg-shell.xml to 1.20
* wayland: remove xdg-shell-unstable-v6 support
* wayland: deprecate wl shell surface syswm info, add xdg surface
2021-07-27 14:12:26 -07:00
Sam Lantinga
88e4755c26
Make sure we don't try to turn on relative mouse mode while clicking on the window title bar.
...
This fixes bug https://github.com/libsdl-org/SDL/issues/4469
2021-07-27 12:43:45 -07:00
Splamy
c72aef2664
Fixed microphone randomly stop working
...
WASAPI_WaitDevice is used for audio playback and capture, but needs to
behave slighty different.
For playback `GetCurrentPadding` returns the padding which is already
queued, so WaitDevice should return when buffer length falls below the
buffer threshold (`maxpadding`).
For capture `GetCurrentPadding` returns the available data which can be
read, so WaitDevice can return as soon as any data is available.
In the old implementation WaitDevice could suddenly hang. This is
because on many capture devices the buffer (`padding`) wasn't filled
fast enough to surpass `maxpadding`. But if at one point (due to unlucky
timing) more than maxpadding frames were available, WaitDevice would not
return anymore.
Issue #3234 is probably related to this.
2021-07-27 14:19:11 -04:00
Ryan C. Gordon
4ef8674df1
Revert "wasapi: Open capture devices the way we used to."
...
This reverts commit 0d0fee7569
.
2021-07-27 14:18:44 -04:00
Ryan C. Gordon
0d0fee7569
wasapi: Open capture devices the way we used to.
...
This should work around the regression in #3234 , since it basically reverts
the problem change, but only for capture devices.
Fixes #3234 .
2021-07-27 14:13:31 -04:00
Ryan C. Gordon
f4eb7f329e
spinlock: Favor gcc-style atomics over MSVC interfaces.
...
This resolves a problem when using Clang on Windows.
Fixes #4346 .
2021-07-27 13:45:33 -04:00
Ryan C. Gordon
736a424ff4
pulseaudio: Optionally add "monitor" sources to device list.
...
There's a new hint to enable this.
Fixes #2917 .
2021-07-27 13:12:57 -04:00
Ryan C. Gordon
8d790b10f8
audiocvt: stereo-to-mono SSE3 now uses unaligned accesses.
...
On modern CPUs, there's no penalty for using the unaligned instruction on
aligned memory, but now it can vectorize unaligned data too, which even if
it's not optimal, is still going to be faster than the scalar fallback.
Fixes #4532 .
2021-07-27 12:23:46 -04:00
Sam Lantinga
2a53f8315a
Fixed controllers showing up under both MFI and HIDAPI drivers
...
The Game Controller Kit doesn't show the controllers at startup, so the HIDAPI driver sees them first and therefore gets preference when a controller is supported by both drivers.
This fixes bug https://github.com/libsdl-org/SDL/issues/4209
2021-07-26 23:29:20 -07:00
Sam Lantinga
46869db01c
Fixed controller rumble on macOS
...
Needed to add a strong reference to the haptics engine
2021-07-26 23:27:13 -07:00
Sam Lantinga
a850fec733
Added missing mapping for the Xbox Elite Controller on Linux
...
This fixes https://github.com/ValveSoftware/steam-for-linux/issues/7826
2021-07-26 15:05:02 -07:00
Ozkan Sezer
d80ef3e5f5
SDL_VideoInit: silence 'may be used uninitialized' warning
...
src/video/SDL_video.c:475: warning: 'i' may be used uninitialized in this function
2021-07-26 22:51:24 +03:00
Luis Cáceres
45de0a1d13
Support comma-separated lists in SDL_AUDIODRIVER
2021-07-26 15:14:54 -04:00
Luis Cáceres
5ec69285fa
Support comma-separated lists in SDL_VIDEODRIVER
2021-07-26 15:14:54 -04:00
Sam Lantinga
ba8bc143c1
Sort joystick entries in /dev/input
...
This fixes https://github.com/libsdl-org/SDL/issues/4430
2021-07-26 12:09:33 -07:00
Sam Lantinga
8d527def81
Revert "hidapi_switch: Implement HD rumble effect ( #4538 )"
...
This reverts commit 19082b115b
, which broke rumble on the Nintendo Switch Pro controller
2021-07-26 10:18:18 -07:00
Narr the Reg
19082b115b
hidapi_switch: Implement HD rumble effect ( #4538 )
2021-07-26 10:00:53 -07:00
Christian Rauch
ac904b8e95
wayland: ignore resize in fullscreen or maximised mode
2021-07-25 14:54:12 -07:00
Christian Rauch
ee062c644a
wayland: implement toggling decorations
2021-07-25 14:54:12 -07:00
Christian Rauch
2b3cf36fd9
wayland: forward window events
2021-07-25 14:54:12 -07:00
Christian Rauch
48066984b7
wayland: enable/disable ACTION_RESIZE for fullscreen
2021-07-25 14:54:12 -07:00
Christian Rauch
9e6fcbe72c
wayland: client-side decoration
2021-07-25 14:54:12 -07:00
Christian Rauch
e5f9fae034
wayland: don't flush after setting fullscreen
2021-07-25 14:54:12 -07:00
Mathieu Eyraud
8e604a5f12
Fix error handling in X11_SetWindowTitle
...
X11_XChangeProperty return 1 on success.
2021-07-25 14:51:33 -07:00
Jaylon Gowie
bc3b98f3ed
Replace with SDL_SendKeyboardKeyAutoRelease
2021-07-25 07:41:30 -07:00
Jaylon Gowie
5cd37c0a7b
Add Enter Key support to PSVita IME keyboard
2021-07-25 07:41:30 -07:00
Sam Lantinga
10ec4c8671
Added support for the PowerA Nintendo Switch Spectra Controller
2021-07-24 22:11:22 -07:00
Sam Lantinga
3c9559f765
Don't try to rumble third-party Nintendo Switch Pro controllers
...
Sending rumble to the PowerA Spectra Nintendo Switch controller hangs input reports for a couple of seconds.
2021-07-24 19:43:56 -07:00
Sam Lantinga
cc19b13bc3
Fixed missing return statement
2021-07-24 19:21:29 -07:00
Sam Lantinga
d4ac6b5ed9
Detect buffer overflow when getting DirectInput device state
...
This fixes bug https://github.com/libsdl-org/SDL/issues/4528
2021-07-24 15:58:33 -07:00
Sam Lantinga
3b85e3fdfc
Fixed internal Windows key state when using Windows+Space or Windows+G shortcuts
...
This fixes bugs:
https://github.com/libsdl-org/SDL/issues/4369
https://github.com/libsdl-org/SDL/issues/4500
2021-07-24 15:47:11 -07:00
Sam Lantinga
03c19efbd1
Added support for multiple seats with touch input on Wayland
...
This fixes bug https://github.com/libsdl-org/SDL/issues/4517
2021-07-24 15:25:50 -07:00
Sam Lantinga
ff1b5e1bf7
Implemented the window flash operations for X11
2021-07-24 15:11:36 -07:00
Ryan C. Gordon
5ae0dd4b52
joystick: Split out Linux opening code for reuse by querying code.
...
This prevents an assertion whem LINUX_JoystickGetGamepadMapping tried to
open the stick temporarily and messed with global state by doing so. Now
the global state is only set in LINUX_JoystickOpen, but the common code
is shared by both interfaces.
Fixes #4198 .
2021-07-24 17:48:26 -04:00
Sam Lantinga
f1633127d1
Added a window flash operation to be explicit about window flash behavior
2021-07-24 13:42:19 -07:00
Joel Linn
b2c8d3e9e4
audiocvt: 5.1 to Stereo conversion utilizing AVX
2021-07-24 15:39:17 -04:00
Joel Linn
638befc1a9
audiocvt: 5.1 to Stereo conversion utilizing SSE
2021-07-24 15:39:17 -04:00
Joel Linn
db56526f14
audiocvt: Replace divisions
...
Division is expensive and the compiler can not replace it themselves.
Though we now we will be ok in terms of floating point edge behaviour.
2021-07-24 15:39:17 -04:00
Sam Lantinga
e1c3a25034
Changed SDL_FlashWindow() so it doesn't take a flash count, and added the hint SDL_HINT_WINDOW_FLASH_COUNT to control behavior on Windows
2021-07-24 12:11:27 -07:00
Sam Lantinga
09d1cea733
Use the new controller type for the Luna and Stadia controllers
2021-07-24 11:15:09 -07:00
Sam Lantinga
808c3ae612
Allow mapping Android controllers that just have a D-PAD and face buttons
...
This fixes bug https://github.com/libsdl-org/SDL/issues/4327
2021-07-24 10:37:42 -07:00
Sam Lantinga
94b7a87645
Added SDL_GameControllerType enumerations for the Amazon Luna and Google Stadia controllers
...
Fixes bug https://github.com/libsdl-org/SDL/issues/4019
2021-07-24 09:10:18 -07:00
german77
e6e8fe6d4e
hidapi_switch: Implement analog rumble
2021-07-24 01:06:05 -07:00
Sam Lantinga
669714cafe
Added the ThrustMaster T.16000M as a flightstick
2021-07-23 23:51:35 -07:00
Sam Lantinga
384d86b584
Fixed compile warnings with Visual Studio
2021-07-23 23:48:23 -07:00
Sam Lantinga
adb75d642c
Fixed hotplug detection not working on UWP or when SDL isn't pumping Windows events
...
This fixes bugs:
https://github.com/libsdl-org/SDL/issues/4321
https://github.com/libsdl-org/SDL/issues/4147
Thanks to DJm00n for the suggestion!
2021-07-23 23:45:18 -07:00
Sebastian Krzyszkowiak
7b0092db6a
vita: touch: Mark the back panel as an indirect absolute touch device
...
It's not a touchscreen, but an additional touch panel on the back of
the device.
2021-07-23 16:40:34 -07:00
Sam Lantinga
422b053b96
Added support for the full line of current PowerA Xbox Series X controllers
2021-07-23 16:32:35 -07:00
Jaylon Gowie
48bbe31bc6
Add PreSwapCallback for updating SceCommonDialog
2021-07-21 09:41:10 -07:00