Commit Graph

11715 Commits

Author SHA1 Message Date
Susko3
cfecc569b5 Differentiate between Windows Ink (pen) and regular touch input
SDL2 backport of https://github.com/libsdl-org/SDL/pull/5926
2023-12-16 21:41:22 -08:00
Frank Praznik
867d8643d7 wayland: Handle mouse focus when receiving touch events
Compositors may switch from mouse to touch mode when a touch event is received, causing a pointer leave event and subsequent loss of mouse focus.

Don't relinquish mouse focus on surfaces with active touch events. If there are active touch events when pointer focus is lost, the keyboard focus is used as a fallback for relinquishing mouse focus: if, in this case, the keyboard focus is then lost and there are no active touches, mouse focus is lost, and if all touches are raised and there is no keyboard or pointer focus, then the window loses mouse focus.

(cherry picked from commit 21879faf4815a6acdb29e290d51a15bbe4dae03e)
2023-12-14 14:33:18 -05:00
Sam Lantinga
239b5278bf Revert "Back out Steam virtual gamepad changes"
This reverts commit f0e7f3e7e5.
2023-12-13 09:46:10 -08:00
Frank Praznik
cc6d8eb72b tests: Fix whitespace 2023-12-12 17:17:00 -05:00
Frank Praznik
a78cdbd7e3 tests: Backport automated video test changes
Changes to the SDL3 video system required some changes to the test suite since the video system always reports the true window size and position.

While SDL2 doesn't directly require these changes, they are needed for SDL2-Compat and committed here to keep the two test suites in sync.
2023-12-12 16:10:44 -05:00
Max Maisel
33588662ef Refactor away some additional integer types. 2023-12-12 12:52:04 -08:00
Max Maisel
b620788b4c Add new file to OpenWatcom makefiles. 2023-12-12 12:52:04 -08:00
Max Maisel
20cc644833 Add new file to vcxproj files. 2023-12-12 12:52:04 -08:00
Max Maisel
bed789794d Add new steam deck HIDAPI controller to controller database. 2023-12-12 12:52:04 -08:00
Max Maisel
0dbe9022fc Disable lizard mode while steam deck HID device is opened. 2023-12-12 12:52:04 -08:00
Max Maisel
a6b9d987e9 Translate steam deck HID reports to SDL events. 2023-12-12 12:52:04 -08:00
Max Maisel
5718ba253f Implement steam deck HIDAPI initialization. 2023-12-12 12:52:04 -08:00
Max Maisel
e7f03de468 Add steam deck detection and HIDAPI driver scaffold. 2023-12-12 12:52:04 -08:00
Dimitriy Ryazantcev
33843b0933 Use existing XUSB driver software PID 0x02a1 instead of PID 0x02fe
0x02fe is actually PID of Xbox Wireless Adapter for Windows 10 (Model 1790) and creates confusion.

Here is USB descriptor dump: https://github.com/DJm00n/ControllersInfo/blob/master/xboxone/DescriptorDump_Adapter%20(Xbox%20Wireless%20Adapter%20for%20Windows).txt

(cherry picked from commit c790572674b225de34fe53c0a0188dca8a05c722)
2023-12-11 11:49:28 -08:00
Sam Lantinga
7d94121606 You should call present when using a software renderer as well.
Fixes https://github.com/libsdl-org/SDL/issues/8676

(cherry picked from commit 581d1cab257a14cd235df2192f012abb0d4e36e0)
2023-12-11 08:44:11 -08:00
Sam Lantinga
79a8e8cf04 Make built-in joystick device lists extendable by using hints
Fixes https://github.com/libsdl-org/SDL/issues/8595

(cherry picked from commit 5173b0c2cce5a68f1f72d77b4788f5e1da332719)
2023-12-10 22:52:12 -08:00
Sam Lantinga
6526c4d0fc Refactor VIDPID list loading code
(cherry picked from commit d91e96e7f50b9c3cb0e1dacda39274b4af037a96)
2023-12-10 09:02:56 -08:00
Sam Lantinga
f0e7f3e7e5 Back out Steam virtual gamepad changes
We are planning a different approach to handle these
2023-12-10 08:38:20 -08:00
Anonymous Maarten
10c292b055 cmake+xcode: use IMPORTED SHARED framework target 2023-12-10 11:50:11 +01:00
Sam Lantinga
ddac844034 Fixed build 2023-12-09 21:44:12 -08:00
Sam Lantinga
dd28637947 Use the Steam virtual gamepad slot as the gamepad player index
(cherry picked from commit 7529d25b2b99e2f790c418e479e7ce85c1c818e6)
2023-12-09 21:01:08 -08:00
Sam Lantinga
5b26d4e0ca Sort Steam virtual gamepads by Steam controller slot
This makes sure that games launched by Steam see the first controller first, and the controllers in the game match up with the controllers in the Steam UI.

Fixes https://github.com/libsdl-org/SDL/issues/8672

(cherry picked from commit 17723381da9bc3eadb129beaeaed2164c64b5155)
2023-12-09 20:35:33 -08:00
Ethan Lee
757c984ddb gamecontroller: Backport 3.0 'type:' field to 2.0 2023-11-30 14:42:56 -08:00
Ryan C. Gordon
61cd57d378 cocoa: Resync modifier keypressed on NSEventTypeFlagsChanged event.
Fixes #7507.

(cherry picked from commit 70b65d4170bbff6a8c2ffc9b5834ec85384f6fc0)
2023-11-29 21:40:30 -05:00
Anonymous Maarten
0134672345 cmake: copy sources to binary directory in separate target
Don't do it in POST_BUILD to avoid multiple parallel builds
stepping on each others toes.
Also don't use copy_if_different, but unconditionally copy it.
The build system should take care of dependencies.

SDL2 backport of fea6e7afb1c13326f463aef47ecd26396d1e3a2f
2023-11-28 23:03:30 +01:00
Sam Lantinga
8f14dc6998 Corrected comment
(cherry picked from commit 45938bbfa532e4c1cdef202a72d899a37a7baf05)
2023-11-28 12:30:10 -08:00
zoeyjodon
3381828cc6 Fix 3DS Analog Values (#8581)
(cherry picked from commit 059e550e981e7b2a654b54f548c64a73f5a5fe13)
2023-11-28 12:29:55 -08:00
shenleban tongying
be0e303ec8 document the purpose of SDL_SetTextInputRect
(cherry picked from commit 3e6513c77390969cd870726690bf89e39fe91e60)
2023-11-28 12:11:31 -08:00
Sam Lantinga
546bab0a8c Fixed the GameCube HIDAPI controller mapping
Fixes https://github.com/libsdl-org/SDL/issues/8617
Closes https://github.com/libsdl-org/SDL/pull/8623
Closes https://github.com/libsdl-org/SDL/pull/7930
2023-11-28 10:26:58 -08:00
Sam Lantinga
98ee4a5292 Removed HIDAPI controller mappings
These are already provided internally by SDL

(cherry picked from commit dd984dcd9f89c88e2dd96769d2d837af90be7e70)
2023-11-28 10:11:56 -08:00
Ryan C. Gordon
d42fa25a9e test: SDLTest_PrintEvent now reports key event mod state. 2023-11-28 13:07:56 -05:00
Ryan C. Gordon
7d25a443c4 cocoa: Use -[NSApplicationDelegate applicationSupportsSecureRestorableState].
This prevents warnings at startup on macOS Sonoma (14.0).
2023-11-28 12:24:33 -05:00
Ryan C. Gordon
3fbaf737ef test: Removed unnecessary line added by copy/paste error. 2023-11-28 12:11:13 -05:00
Ryan C. Gordon
258849c9bc test: testwm2 now displays keyboard mod state. 2023-11-28 12:05:02 -05:00
Jake S. Del Mastro
594a79c2f9
Set framebuffer_srgb_capable to the actual value obtained (#8634) 2023-11-28 05:48:19 -08:00
Sam Lantinga
8d47e3bb82 Added support for the NACON Revolution 5 Pro controller
(cherry picked from commit f0e47f8ee07410e29dcba8a13c91f3e2ef3c92b1)
2023-11-27 12:12:25 -08:00
Ozkan Sezer
bbcf40e811 cmake: fixed iconv detection test program
Fixes https://github.com/libsdl-org/SDL/issues/8614
2023-11-26 01:55:24 +03:00
CasualPokePlayer
0fb36f29a8
cmake: check if CMP0087 exists before setting it (#8613)
Fixes builds using < CMake 3.14
2023-11-25 21:42:55 +00:00
Ryan C. Gordon
4339647d90
render: Clip lines before Bresenham algorithm generates points.
Otherwise, a massive line might generate gigabytes worth of points to render,
which the backend would simply throw away anyhow.

Fixes #8113.
2023-11-24 19:33:04 -05:00
Ryan C. Gordon
a391dd5fef
rect: Avoid numeric overflow on massive lines in SDL_IntersectRectAndLine.
Reference Issue #8301.
Reference Issue #8113.
2023-11-24 19:33:04 -05:00
Ozkan Sezer
657f5f791c autotools: fix actually wrong use of AC_MSG_RESULT 2023-11-24 14:37:40 +03:00
Ryan C. Gordon
e9b4869372
opengl: Creating a texture trashes the cached texturing state, fix it.
Reference Issue #7194.
2023-11-23 20:00:01 -05:00
Ryan C. Gordon
0a6b5abf45
render: GL-based renderers should treat adaptive vsync as vsync being enabled.
Fixes #8004.
2023-11-23 18:29:19 -05:00
Ryan C. Gordon
d8102bf660
x11: Deal with difference in GLX_EXT_swap_control_tear behavior.
Mesa and Nvidia handle it differently, and one or the other may fix their
implementation in the future, so test which way it works at runtime.

Reference Issue #8004.

(cherry picked from commit 74a25425646d64edeff508ec8e99622a41576905)
2023-11-23 18:17:25 -05:00
Ozkan Sezer
489e9b69df autotools: bump minimum needed autoconf version to 2.65.
older versions seem to output a broken configure script.
2023-11-24 01:01:20 +03:00
Anonymous Maarten
baaac5cca3 cmake: Android expects SDL programs to be built as shared libraries 2023-11-23 03:39:36 +01:00
Anonymous Maarten
5abcfdb93e SDL_stdinc.h: fix compile warning when using SDL_PR[iux]64 on Android 2023-11-23 03:38:59 +01:00
Ozkan Sezer
8cf7e9e7da autotools, cmake: set SDL_SYSTEM_ICONV to OFF for windows (like SDL3.) 2023-11-23 03:32:04 +03:00
Ryan C. Gordon
0e9d050296
psp: Hook up event subsystem init/quit.
Fixes #8554.
2023-11-22 17:59:36 -05:00
Ryan C. Gordon
87875a49b4
Removed some function declarations that don't actually exist.
Reference Issue #8554.
2023-11-22 17:54:57 -05:00