Sam Lantinga
f72d6a7fd9
Use more verbose names for properties, to match upcoming public property names
2023-12-21 06:58:22 -08:00
Sam Lantinga
1f1ee6f77c
Use the original manufacturer and product strings for the joystick CRC
...
This allows the most information possible for the CRC string, which is used to differentiate controllers with the same VID/PID.
Fixes https://github.com/libsdl-org/SDL/issues/8724
2023-12-20 19:22:37 -08:00
Sam Lantinga
4bb5e1f0f9
Added migration notes for migrating Steam Input support from SDL2 to SDL3
2023-12-20 14:15:09 -08:00
Sylvain
56f111dffc
Fix compilation / same as sdl2-compat
...
testautomation_platform.c:351:28: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
351 | result = SDL_SetError("%s", testError);
| ^~
/home/slvn/release/Release_SDL/sdl2-compat/test/testautomation_platform.c:364:64: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
364 | "SDL_GetError(): expected message '%s', was message: '%s'",
2023-12-20 22:28:50 +03:00
Sam Lantinga
72c366bf3d
Fixed whitespace
2023-12-20 11:06:34 -08:00
Dimitriy Ryazantcev
3152b98e87
win32: minor fixup in WIN_UpdateKeymap()
...
Remove unused defines in SDL_windowsevents.c
2023-12-20 11:01:45 -08:00
SDL Wiki Bot
2c4360ce8f
Sync SDL3 wiki -> header
2023-12-20 18:41:23 +00:00
Sam Lantinga
c981a597dc
Added Steam Input API support for game controllers
...
Added support for getting the real controller info, as well as the function SDL_GetGamepadSteamHandle() to get the Steam Input API handle, from the virtual gamepads provided by Steam.
Also added an event SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED which is triggered when a controller's API handle changes, e.g. the controllers were reassigned slots in the Steam UI.
2023-12-20 10:40:28 -08:00
Vicki Pfau
a8f4f40d08
Sync more Steam Controller header definitions for the Steam Deck
2023-12-19 20:18:37 -08:00
Sam Lantinga
e6e54b22c8
Ignore all surface comparison output files in the testautomation directory
2023-12-19 08:48:44 -08:00
Sam Lantinga
9d13be743b
Make sure we're rendering whenever the activity might be visible, even if we don't have focus.
...
This fixes rendering when a system dialog is over the application
2023-12-18 19:21:00 -08:00
Frank Praznik
69ec0322d3
win32: Make leaving fullscreen when the window already isn't fullscreen a no-op
...
Otherwise, the styling on external windows may end up being overridden.
2023-12-18 11:47:59 -05:00
Frank Praznik
8f79e0b7f8
win32: Fix high-DPI debug logging
2023-12-18 11:31:37 -05:00
Sylvain
a4496f7dcf
Update doc: SDL_SoftStretch() and SDL_SoftStretchLinear() #8667
2023-12-18 06:35:52 -08:00
Dimitriy Ryazantcev
43309d38ed
joystick: Extract 0x02a9 and 0x0291 PIDs into separate defines.
...
Cleanup controller list comments block.
2023-12-18 05:43:38 -08:00
Sylvain
84a0d5f623
Added SDL_SetSurfaceScaleMode() and SDL_GetSurfaceScaleMode() to control scale mode using SDL_BlitSurfaceScaled()
2023-12-17 15:39:53 -08:00
Sam Lantinga
4d5949dcf6
Added a controller name for the Steam virtual gamepad
2023-12-17 10:07:46 -08:00
Sam Lantinga
695846f2ed
Pass through the name of the controller for the XInput mapping
2023-12-17 09:33:53 -08:00
Frank Praznik
1745289b1b
x11: Don't move the window when restoring and ensure that resize and position events are sent when entering or leaving fullscreen
...
Account for the border sizes when restoring the window and only turn off resize events when entering or leaving fullscreen until the frame extents are changed, and only if they are, or previously were, non-zero.
This necessitated further refinement to the sync algorithm as well, but as a result, the sync function no longer occasionally times out if creating a window and immediately recreating it when initializing a renderer, and some rare, spurious size and position failures in the centered window and state automated tests seem to be fixed.
2023-12-17 11:39:49 -05:00
Dimitriy Ryazantcev
08a7ca4d53
XInput: Use XInputGetCapabilitiesEx instead of fragile GuessXInputDevice
...
XInputGetCapabilitiesEx (ordinal 108) is available in XInput 1.4 that is shipped with Windows 8 and newer.
2023-12-17 08:32:10 -08:00
Sam Lantinga
7f75178908
Verify that the %p format specifier works for 64-bit pointers
2023-12-17 08:14:20 -08:00
Sam Lantinga
72b7acfe8a
Don't create a TLS error buffer if we're just clearing the error
...
Fixes https://github.com/libsdl-org/SDL/issues/7600
2023-12-16 21:28:43 -08:00
Matt Guerrette
240e7747c8
Fix #8702 : Add SDL_hidapi_steamdeck.c to Xcode target
...
This commit fixes a linker issue when building SDL 3.0 using Xcode
2023-12-16 20:25:33 -08:00
Frank Praznik
b937c54b66
win32: Set all size and position variables for external windows
2023-12-15 16:41:20 -05:00
Sam Lantinga
8c285828e5
Fixed return value for SDL_UDEV_AddCallback()
...
Fixes https://github.com/libsdl-org/SDL/issues/8694
2023-12-15 10:06:01 -08:00
Sam Lantinga
cbf9012c74
Fixed build
2023-12-15 10:03:11 -08:00
Sam Lantinga
5547007915
Added test for inverted cursor
2023-12-15 09:59:50 -08:00
Dimitriy Ryazantcev
0ab13f2498
joystick: fixup for Wireless Xbox 360 Controller VID/PID detection in WGI backend.
...
It turns out that returned PID is zero in this case and it breaks SDL_IsXInputDevice/HIDAPI_IsDevicePresent checks
2023-12-15 08:57:09 -08:00
Dimitriy Ryazantcev
627d134b9e
Add support for monochrome cursors with inverted pixels under Windows.
...
Fixes #8157
2023-12-15 08:56:17 -08:00
Frank Praznik
21879faf48
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.
2023-12-14 14:17:33 -05:00
Sam Lantinga
58a5f5cbe8
Allow sendCommand() to be overridden by derived classes
...
In this case it's used to prevent switching to windowed mode when destroying and recreating the main window
2023-12-13 10:13:17 -08:00
Sam Lantinga
e6d8ef1a5b
Revert "Back out Steam virtual gamepad changes"
...
This reverts commit 34eb24ebc4
.
2023-12-13 09:45:39 -08:00
Sam Lantinga
b0e7b7db6f
Don't unload graphics libraries until after the window has been destroyed.
...
This fixes creating a window after the first window has been destroyed on Android. The graphics library had been unloaded, so eglDestroySurface() wasn't called, leaving a surface attached to the window, which would prevent attaching new EGL surfaces to the window (eglCreateWindowSurface() would fail with BAD_ALLOC)
2023-12-12 23:17:41 -08:00
Max Maisel
69288038ed
Refactor away some additional integer types.
2023-12-12 12:51:37 -08:00
Max Maisel
f3048e3cd2
Add new file to vcxproj files.
2023-12-12 12:51:37 -08:00
Max Maisel
5a21febecb
Add new steam deck HIDAPI controller to controller database.
2023-12-12 12:51:37 -08:00
Max Maisel
67d44c1017
Disable lizard mode while steam deck HID device is opened.
2023-12-12 12:51:37 -08:00
Max Maisel
6dd6827343
Translate steam deck HID reports to SDL events.
2023-12-12 12:51:37 -08:00
Max Maisel
94f621e030
Implement steam deck HIDAPI initialization.
2023-12-12 12:51:37 -08:00
Max Maisel
c1a7d0f96e
Add steam deck detection and HIDAPI driver scaffold.
2023-12-12 12:51:37 -08:00
Sam Lantinga
0baee3e676
Reversed test to be easier to read, more efficient, and match other code
2023-12-12 12:25:51 -08:00
Frank Praznik
bddbd1e317
cocoa: Check the resizable flag along with zoomed status when resizing
...
isZoomed always returns true if the window is not resizable, so the resizable flag needs to be checked as well.
2023-12-12 14:35:49 -05:00
Frank Praznik
835c733f4d
video: Only sync when programmatically entering/exiting fullscreen
...
Otherwise, the sync function can be recursively entered when the fullscreen state is updated by a window manager event.
2023-12-12 12:58:05 -05:00
Dimitriy Ryazantcev
c790572674
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
2023-12-11 11:45:05 -08:00
Sam Lantinga
581d1cab25
You should call present when using a software renderer as well.
...
Fixes https://github.com/libsdl-org/SDL/issues/8676
2023-12-11 08:43:31 -08:00
Sam Lantinga
5173b0c2cc
Make built-in joystick device lists extendable by using hints
...
Fixes https://github.com/libsdl-org/SDL/issues/8595
2023-12-10 12:53:03 -08:00
Sam Lantinga
34eb24ebc4
Back out Steam virtual gamepad changes
...
We are planning a different approach to handle these
2023-12-10 08:35:35 -08:00
Sam Lantinga
7529d25b2b
Use the Steam virtual gamepad slot as the gamepad player index
2023-12-09 21:00:32 -08:00
Sam Lantinga
445f08a0fb
Print the gamepad player index when opening a gamepad
2023-12-09 21:00:11 -08:00
Sam Lantinga
17723381da
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
2023-12-09 20:33:05 -08:00