Sam Lantinga
b9d1c483b9
Fixed building with the 16.1.4479499 Android toolchain
2023-06-03 23:55:56 -07:00
Sam Lantinga
dc94cca8dd
Fixed typo in cherry-pick (thanks @HadesD!)
2023-06-03 11:57:08 -07:00
Sam Lantinga
97fe777ab4
Steam uses a different VID/PID for the Steam Virtual Gamepad on Windows
...
(cherry picked from commit 6815e75cafee8e7caaacf1f428b6539c8bbc7f7d)
2023-06-03 11:40:58 -07:00
Sam Lantinga
f1bad83a21
Revert "Fixed detection of the Steam Virtual Gamepad on macOS"
...
This reverts commit 7aa28ce279
.
Steam has been updated to send a version of 1 to avoid conflicts with controllers that report a version of 0.
2023-06-03 11:36:38 -07:00
Sam Lantinga
7aa28ce279
Fixed detection of the Steam Virtual Gamepad on macOS
...
(cherry picked from commit 5fcd70578bdde3eaaa51aa4ab6c24ed08bd49db3)
2023-06-02 18:39:22 -07:00
Sam Lantinga
c89a460672
Fixed build if SDL_JOYSTICK_RAWINPUT_MATCHING isn't enabled
...
(cherry picked from commit 7c55845c804e2272df8bc111dea5d3e9d11670a0)
2023-06-02 11:20:55 -07:00
Sam Lantinga
e3bfacde3e
Don't use raw input while Remote Desktop is active
...
Raw input will not send game controller events while Remote Desktop is active, so dynamically switch between XInput and raw input when Remote Desktop state changes.
Fixes https://github.com/libsdl-org/SDL/issues/7759
(cherry picked from commit 767507fcf6f4607edb413acb53a6c029863701ed)
2023-06-02 11:19:44 -07:00
Sam Lantinga
9c05098ed9
Fixed WGI immediately being correlated with raw input devices with no input
...
The at rest match state is 0x0000008800000000, not 0
(cherry picked from commit e8b5b4881c8eb31bb7de5adef3479305a73fb0bf)
2023-06-02 09:39:57 -07:00
Alibek Omarov
c395240425
hints: clarify support for comma-separated values for QtWayland orientation that's available since 2.0.22
...
Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.com>
2023-06-02 07:41:08 -07:00
Alibek Omarov
68e3e99087
wayland: reset orientation bitmask before reading values from hint on QtWayland
...
Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.com>
2023-06-02 07:41:08 -07:00
Ozkan Sezer
7f7ea909bc
testautomation_guid.c: fix integer warning in 32 bit builds.
2023-05-31 04:50:02 +03:00
Ryan C. Gordon
379a6f4dab
x11: Attempt to wait for SDL_MaximizeWindow to complete before returning.
...
Fixes #7070 .
2023-05-30 17:04:31 -04:00
Ryan C. Gordon
d275851dfb
windows: Don't allow non-resizable windows to be maximized.
...
Fixes #6346 .
2023-05-29 14:47:53 -04:00
Ryan C. Gordon
a9ded76dff
VisualC: turn on multi-processor compilation.
...
This makes SDL2 build in 12 seconds, instead of 50, on my Windows
workstation, with Visual Studio.
2023-05-29 14:47:52 -04:00
Sam Lantinga
5007b96363
Fixed build warning
2023-05-28 19:23:56 -07:00
Sam Lantinga
b2e88ecfeb
Disable SDL_JOYSTICK_RAWINPUT_XINPUT
...
Apparently when using the Xbox One Wireless Adapter, using XInput at the same time as raw input will cause the controller to turn off immediately after connecting. This appears to be a bug in the Windows 11 driver stack, but since WGI provides all the extended functionality we need, this can be turned off for now.
Fixes https://github.com/libsdl-org/SDL/issues/3468
2023-05-28 18:41:21 -07:00
Anonymous Maarten
d6cd450624
windows: SDL_Delay expects a 32-bit integer
2023-05-27 02:34:41 +02:00
Anonymous Maarten
e875775940
windows: SDL_immdevice needs SDL_timer.h include
2023-05-27 02:10:18 +02:00
Anonymous Maarten
72606d97e6
cmake: allow #include "SDL2/SDL.h.h" when using SDL2 as subproject
2023-05-27 01:48:30 +02:00
Ryan C. Gordon
48e71ae87b
wasapi: Deal with HDMI or DisplayPort-based audio devices.
...
They can vanish for UP TO EIGHT SECONDS...!
This is for devices that connect to HDMI/DisplayPort/etc, where it
presumably has to wait for a display to get up and running before it
can play audio through it, so one can see the audio device fail when
changing display modes, or the system returning from sleep. Since this
can be triggered by a game changing video resolutions at startup (either
before or after opening the audio device!), it's important to deal with.
In normal conditions, it shouldn't take this long to open or recover an
audio device, but this is better than unexpectedly losing the device
in this situation.
Fixes #7044 .
Fixes #5571 .
2023-05-26 19:15:28 -04:00
Sam Lantinga
7308325559
Added support for printing wide strings using "%ls" syntax
...
(cherry picked from commit 128ca7016018178c0c3231db7db2005dbf234068)
2023-05-26 14:59:30 -07:00
Ozkan Sezer
9dea06f5b5
fix mingw build failures in CI with clang-tidy.
...
(cherry-picked from commit a8a72de6fbcf9afe8a6e8760f31a79a0ed6fed1a)
2023-05-26 23:55:04 +03:00
Anonymous Maarten
c68976360d
Fix -Wunused-function warning when configuring with -DSDL_X11_XINPUT2=OFF
2023-05-26 15:28:58 -04:00
Ryan C. Gordon
a535cc62a0
video: Only specify some GL context attributes if not the explicit default.
...
Just in case it upsets some OpenGL drivers unnecessarily.
Fixes #7730 .
(cherry picked from commit d4bc393efebdd45a95430397df106b69b1c26df3)
2023-05-25 10:10:03 -04:00
Sam Lantinga
63b8af3558
Disable unused local typedefs warning
...
This triggers on gcc 4.8.4 for compile time asserts inside of functions
Fixes https://github.com/libsdl-org/SDL/issues/7732
Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
2023-05-24 04:45:40 +03:00
Sam Lantinga
3f1fd5abff
Updated source to match SDL function prototype style
2023-05-23 10:59:03 -07:00
Sam Lantinga
92f72682e7
Document the Android SDK versions checked in Java code
...
(cherry picked from commit b48b1ce50042168c5b9b310fa495cb355903c241)
2023-05-23 08:45:43 -07:00
Frank Praznik
891c89eeb8
Fix unused variable warnings
2023-05-23 11:15:48 -04:00
Frank Praznik
e2b8d96529
wayland: Validate surfaces and window data before sending touch events
...
Ensure that incoming touch events originate from valid surfaces owned by SDL and have proper window data before forwarding them to the touch subsystem, or the window focus pointer that is sent with the event may not be a pointer to an SDL window.
2023-05-23 10:31:28 -04:00
Sam Lantinga
78a92b4f9d
Fixed duplicate Joy-Con controllers on macOS
...
If both Apple and HIDAPI drivers see the controller, HIDAPI will be preferred.
Fixes https://github.com/libsdl-org/SDL/issues/7479
(cherry picked from commit 61ef4efdfae7e384b0d24b1b171a9ee6203a3f0d)
2023-05-22 14:52:05 -07:00
Sam Lantinga
7b2b99a996
Fixed handling the Saitek P3600, which doesn't use the Xbox 360 controller protocol
...
(cherry picked from commit cf0abf99118f1ea5ba423ce62950e5840db2c649)
2023-05-22 12:42:05 -07:00
Sam Lantinga
b6d051e226
Fixed reporting backspace key if there is no text in the edit buffer (thanks @312937!)
...
This workaround isn't necessary at API 30 and above.
Fixes https://github.com/libsdl-org/SDL/issues/7039
(cherry picked from commit c971795954bc85086cd20cfc71b45a311b7ba0d1)
2023-05-22 12:01:52 -07:00
Sam Lantinga
0ad0347acb
Use numeric codes for Android versions, to avoid SDK dependencies
...
(cherry picked from commit 3f6b2d1a61d0c0dcd6af7cc951c1d8c267ed1526)
2023-05-22 12:01:52 -07:00
Sam Lantinga
a2f4783e75
Don't map the top keyboard row to numbers when using the one-handed DVORAK layouts (thanks @tormol!)
...
Fixes https://github.com/libsdl-org/SDL/pull/5127
2023-05-22 11:30:42 -07:00
Caleb Cornett
2001a891c4
Fix Xbox link error from IsRectEmpty
...
(cherry picked from commit 376a3cd100a3d59e887496c75a1ac49ab4a2d8ec)
2023-05-21 19:11:25 -07:00
M. P. Halpin
1ee9a437f9
Stop beep when running iOS apps on ARM-based Macs
...
(cherry picked from commit bbf38bbbc334bc0ee90d3eec228a968d8fc1689e)
2023-05-20 11:21:13 -07:00
Sam Lantinga
69644346ac
Added the hint SDL_HINT_ENABLE_SCREEN_KEYBOARD to control whether the on-screen keyboard should be shown when text input is active
...
Fixes https://github.com/libsdl-org/SDL/issues/7160
2023-05-20 11:09:36 -07:00
Sam Lantinga
00b87f1ded
Make sure the sentinel is at the end of the current event pump cycle
...
If we're waiting, it's possible to not get any events, then add the sentinel, then pump again and then add another sentinel. We want to make sure we only have one sentinel and that it's at the end of the currently pumped events.
Testing:
* Verified test case in https://github.com/libsdl-org/SDL/issues/6539
* Verified test case in https://github.com/libsdl-org/SDL/issues/5350
Fixes https://github.com/libsdl-org/SDL/issues/6539
2023-05-20 10:27:48 -07:00
Sam Lantinga
beca41480d
Undo name change for the controller list
...
(cherry picked from commit f60622c5103e37f221aa8252acfa9073cfbafbc7)
2023-05-19 14:27:06 -07:00
Sam Lantinga
43b12fd9bc
Moved the controller list out so it can be included elsewhere
...
(cherry picked from commit 24007b00b2a5e9d09d953db79a24dd51b78e598b)
2023-05-19 14:23:57 -07:00
Sam Lantinga
e8ec8ba1d4
Added support for the Astro C40 in Xbox 360 mode
...
(cherry picked from commit a4b4dff4a2998699757f12d29fdd4c632db884fe)
2023-05-19 14:23:57 -07:00
Ozkan Sezer
feeec90873
test/testgles2_sdf.c: type fixes from commit e26e893daf, style clean-up.
2023-05-19 17:00:24 +03:00
Anonymous Maarten
d361acdd4e
testgles2_sdf: build with CMake + fix build errors/warnings
2023-05-19 15:24:52 +02:00
Ozkan Sezer
92a487f2e4
style fixes for SDL_PROC macros.
2023-05-19 14:10:02 +03:00
Ryan C. Gordon
df9d0fb332
power: On Linux, compare status strings as case-insensitive.
...
In case something reports "Device" when we expected "device", etc.
Reference Issue #6835 .
2023-05-18 13:26:55 -04:00
Ryan C. Gordon
4a0b9522b6
audio: Load .WAV files with format->blockalign==0.
...
In theory this is illegal, but legit wavefiles in the field do it, and
it's easy to bump it to 1 for general purposes.
Formats with more specific alignment requirements already check for them
separately.
Fixes #7714 .
(cherry picked from commit 2e646c7141b3009628abda2a964ba5f9d1702e1a)
2023-05-17 20:09:28 -04:00
Ryan C. Gordon
32999798e0
dynapi: Accept a comma-separated list of libraries to attempt to load.
...
First one to load and have the necessary symbol is the one we accept,
if any. Once we accept one, we won't try loading others.
Fixes #7613 .
2023-05-17 20:03:17 -04:00
valid-ptr
424bc4bcf7
SDL emscripten port: preventDefault should not be called on mousedown. Otherwise mouseup will not be fired outside iframe in Chrome-based browsers
2023-05-17 12:30:32 -07:00
Ryan C. Gordon
0eea92c8fc
blit: Add a case for 8-bit blits that sdl12-compat exposed.
...
sdl12-compat can get into a state where a color-keyed surface is
marked for blending, but wants to blend with full alpha (which
is the same as _not_ blending), so rather than fail to find a
blitter in that case, it just selects the colorkey blitter.
Reference https://github.com/libsdl-org/sdl12-compat/issues/233
2023-05-16 14:38:44 -04:00
Sam Lantinga
d42c303b24
Check to make sure the Windows joystick device has buttons and axes
...
This fixes incorrectly detecting the ROG CHAKRAM X mouse as a game controller on Windows 10
(cherry picked from commit 642504bc5993a6acd4d9c1d4c1314c6b1cf6e4e1)
2023-05-15 21:44:20 -07:00