Commit Graph

8000 Commits (0dc57b0f08782b1eae8f74a20f47b61d2ce760b5)

Author SHA1 Message Date
Ethan Lee 03185e748b wayland: Tag/Check wl_output objects as well, fixes crashes when libdecor is in use 2021-07-27 16:05:53 -07:00
Ryan C. Gordon 871c11191b wayland: handle pending resizes immediately, not on SwapWindow.
This was originally a workaround for an old Mesa bug, since fixed, apparently,
and causes other problems.

Fixes #4326.
2021-07-27 18:24:09 -04:00
Sam Lantinga 51c61d7cdf Run the entire Cocoa messagebox function on the main thread.
This fixes bug https://github.com/libsdl-org/SDL/issues/4420
2021-07-27 14:57:18 -07:00
Sam Lantinga dfd3f30e88 Make Cocoa_HandleTitleButtonEvent() static since it's not used anywhere else 2021-07-27 14:27:37 -07:00
Sam Lantinga 14d58dc890 Fixed the parameter documentation 2021-07-27 14:23:40 -07:00
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 65dc4edb52 Reverted accidental Visual Studio version bump in SDL.sln 2021-07-27 12:51:44 -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
Sam Lantinga 7df6a9ea59 Add a test case for 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
Sam Lantinga b2d77e638c Added testwm2 to the Visual Studio test programs 2021-07-27 10:57:40 -07: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
Ozkan Sezer 9bcb5e7b94 configure: move CheckLibDecor into CheckWayland 2021-07-27 20:20:28 +03: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 a894ce4c14 Include README.md in the distribution archive 2021-07-27 08:34:46 -07:00
Ozkan Sezer e16fb60323 tweak HAVE_IMMINTRIN_H in SDL_config_windows.h, add to SDL_config_macosx.h 2021-07-27 17:10:24 +03: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
SDL Wiki Bot e94d4b8c9b Sync wiki -> header 2021-07-27 00:08:05 +00: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
Ozkan Sezer 3b7649c578 regenerated configure 2021-07-26 01:29:10 +03: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 f4f9c6bc55 CI: add 'libdecor' dependency from upstream 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
kenmays c0601d0123 SDL: Updated patches for HAIKU 2021-07-25 14:52:23 -07:00
kenmays 761d38379b SDL: Updated patches for HAIKU 2021-07-25 14:52:23 -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
Cameron Cawley 89bdc6ba1d Fix MSVC builds in paths with spaces 2021-07-24 16:06:54 -07:00
Cameron Cawley b0daa9f1db Automatically select the default platform toolset for MSVC builds 2021-07-24 16:06:54 -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