Sam Lantinga
2b57d58f7d
Added GCController mapping for the 8BitDo SN30 Pro on macOS
2025-05-08 09:57:10 -07:00
Sam Lantinga
d157600d3d
Added GCController mapping for the 8BitDo Pro 2 on macOS
...
Fixes https://github.com/libsdl-org/SDL/issues/12987
2025-05-08 09:49:10 -07:00
Sam Lantinga
5bee85408c
Cleanup 8BitDo HIDAPI support for SF30 Pro and SN30 Pro
...
This sets the correct number of buttons for older controllers, and adds parsing for older firmware USB reports
2025-05-07 12:11:27 -07:00
Sam Lantinga
ca47dc59a9
Fixed building with the OpenVR video driver
2025-05-06 16:14:22 -07:00
Sam Lantinga
195ad85ba4
Fixed typo
2025-05-06 16:08:03 -07:00
Sam Lantinga
d357aa29a3
Fixed initializing the OpenVR driver
2025-05-05 15:52:28 -07:00
Sam Lantinga
f8c77908ad
Use motor sequence ID 0 in the HIDAPI GIP driver
...
Using a 0 sequence number is always allowed and avoids having to synchronize sequence numbers with the controller (and potentially confusing other things talking to the controller)
Also fixes occasional long running rumble at controller connection.
2025-05-05 15:06:54 -07:00
Sam Lantinga
ab12b7cbba
Added support for the share button on the GameSir-K1 FLUX controller
2025-05-02 10:15:16 -07:00
Sam Lantinga
1e6a25324c
Added support for the PowerA Battle Dragon Advanced Wireless Controller
2025-05-02 10:01:13 -07:00
Sam Lantinga
caf269ce00
Added a link to the GIP documentation
2025-05-01 21:35:10 -07:00
Sam Lantinga
34c045aa39
Fixed paddles on the Xbox Elite controller using the GIP driver
2025-05-01 21:35:10 -07:00
Sam Lantinga
ae251a05be
Fixed warning: no previous prototype for function 'GIP_ParseMetadata'
2025-05-01 15:39:49 -07:00
Sam Lantinga
48dfc03a87
Added the gamepad hint SDL_GAMECONTROLLER_USE_GAMECUBE_LABELS
...
This is for internal use to signal that a mapping uses positional GameCube buttons. It's set so we know whether a mapping uses the older style labeled buttons or the newer style positional buttons. If a positional mapping is used with SDL2, then it will be ignored, since the hint is marked as defaulting true and the mapping conditional is that the hint is false.
2025-05-01 10:54:16 -07:00
Sam Lantinga
21a7bbbf14
Restore compatibility with older GameCube mappings
...
Restore the original button values for GameCube controllers, but swap labeled mappings to positional while loading mappings
Fixes https://github.com/libsdl-org/SDL/issues/12847
2025-05-01 10:54:16 -07:00
Sam Lantinga
e3df61b070
Fixed right mouse button emulation when using a pen
...
Pen button 1 is typically used as right click. Pen button 2 (Wacom eraser) doesn't have a specific mapping, but we'll use middle click for now.
2025-04-30 11:07:31 -07:00
Sam Lantinga
106ccc722e
Fixed missing simulated mouse events using a Wacom tablet
...
The low 16-bits of the message extra info is an event sequence number when using the Wacom tablet with Windows Ink disabled. The high bits of normal mouse motion when using touch input match the touch signature, 0xFF515700. The high bits of raw input mouse motion when using touch input do not match that signature, so we have to check for the touch bit in that case.
Fixes https://github.com/libsdl-org/SDL/issues/12927
2025-04-30 11:07:31 -07:00
Sam Lantinga
8ae962c904
Fixed build
2025-04-29 19:06:42 -07:00
Sam Lantinga
e04064350f
Fixed right click mouse emulation for the Wacom tablet
...
The problems are two-fold. When this happens a WM_POINTERDOWN event is sent with IS_POINTER_INCONTACT_WPARAM() evaluating as true. So when SDL_SendPenButton() is sent for the barrel button, there is no pen in contact yet, so the right mouse button is sent. Then SDL_SendPenTouch() is sent, which generates a left button press event.
Fixes https://github.com/libsdl-org/SDL/issues/12926
2025-04-29 19:03:42 -07:00
Sam Lantinga
8abcc27535
Removed timeout in SDL_RunOnMainThread()
...
Fixes https://github.com/libsdl-org/SDL/issues/12923
2025-04-29 08:56:56 -07:00
Sam Lantinga
ef54c3bf18
Always enable D3D12 GPU on Windows
...
This isn't dependent on the render subsystem
Fixes https://github.com/libsdl-org/SDL/issues/12922
2025-04-29 08:51:26 -07:00
Sam Lantinga
31650d566c
Added SDL_GAMEPAD_TYPE_GAMECUBE
...
The GameCube controller has a different face button layout than the Xbox or Nintendo Switch style controllers. It has the B button on the left and the X button on the right, so we should map those to SDL_GAMEPAD_BUTTON_WEST with SDL_GAMEPAD_BUTTON_LABEL_B and SDL_GAMEPAD_BUTTON_EAST with SDL_GAMEPAD_BUTTON_LABEL_X respectively.
Fixes https://github.com/libsdl-org/SDL/issues/12847
2025-04-27 11:01:50 -07:00
Sam Lantinga
c2ed58db7b
windows: Fix stale zoom/iconic state in WM_WINDOWPOSCHANGED handler
...
- IsIconic/IsZoomed must be checked after sending SDL_EVENT_WINDOW_SHOWN as that may trigger window operations if any are pending from when
the window was hidden. e.g. the window may be shown, which triggers SDL_MaximizeWindow and a new WM_WINDOWPOSCHANGED where
SDL_EVENT_WINDOW_MAXIMIZED is sent, then control returns to the original WM_WINDOWPOSCHANGED which would not think the window is zoomed
and send SDL_EVENT_WINDOW_RESTORED.
2025-04-25 16:21:44 -07:00
Sam Lantinga
7642c0468d
Log information about Wayland environment detection
2025-04-25 10:02:03 -07:00
Sam Lantinga
da3c864d4c
Reset the keyboard when entering a modal loop on Windows
...
Fixes https://github.com/libsdl-org/SDL/issues/12876
2025-04-24 13:58:17 -07:00
Sam Lantinga
fcdaff4110
Fixed compiler warning
2025-04-24 10:36:49 -07:00
Sam Lantinga
695cad459b
Corrected documentation for SDL_SetGPUSwapchainParameters()
2025-04-23 14:54:12 -07:00
Sam Lantinga
5a8be8e4c2
Fixed formatting
2025-04-22 14:33:47 -07:00
Sam Lantinga
89d7d406ab
Added tests to cover invalid surface blits
...
Reproduction case for https://github.com/libsdl-org/SDL/issues/12844
2025-04-22 13:05:38 -07:00
Sam Lantinga
18fbe6a92f
Renamed SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_UINT8 to SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER
...
Typically we will name the property with the function that is used to set it, and document the range of values.
2025-04-22 10:28:20 -07:00
Sam Lantinga
c076b0d17f
Removed incorrect documentation for SDL_RenderViewportSet()
...
Closes https://github.com/libsdl-org/SDL/pull/12854
2025-04-22 10:17:11 -07:00
Sam Lantinga
3aed80cd82
Updated documentation for SDL_HINT_GPU_DRIVER
2025-04-22 08:58:44 -07:00
Sam Lantinga
4093e4a193
Fixed process I/O redirection to NUL on Windows
2025-04-11 15:44:58 -07:00
Sam Lantinga
c025fdbb7c
Add the CREATE_NO_WINDOW flag for background processes
...
Fixes https://github.com/libsdl-org/SDL/issues/12097
2025-04-11 15:44:58 -07:00
Sam Lantinga
8a57c83ff9
Updated to GameInput v1.1
...
The biggest change is that the C API is no longer available.
Here are more details:
https://www.nuget.org/packages/Microsoft.GameInput
Fixes https://github.com/libsdl-org/SDL/issues/12802
2025-04-11 13:42:58 -07:00
Sam Lantinga
f35a2736b7
Don't reset the render target when invalidating GPU renderer cache state
...
Fixes https://github.com/libsdl-org/SDL/issues/12646
2025-04-11 09:23:02 -07:00
Sam Lantinga
98e76d283f
Fixed conflict when linking both SDL and hidapi statically
...
Fixes https://github.com/libsdl-org/SDL/issues/12790
2025-04-10 09:57:37 -07:00
Sam Lantinga
f303ccca64
Updated the report size for Ultimate 2 Wireless firmware v1.02
2025-04-09 09:17:53 -07:00
Sam Lantinga
93ac1e6894
Fixed non-XBox controllers being detected as Series X controllers
...
First make sure we have an XBox One controller before checking whether it's a Series X/S controller.
2025-04-08 12:20:27 -07:00
Sam Lantinga
d29bb902f3
Don't treat the Keychron K1 Pro System Control keyboard as a joystick
...
Fixes https://github.com/libsdl-org/SDL/issues/12758
2025-04-08 11:07:20 -07:00
Sam Lantinga
46c314cc3d
Revert "bool is 4 bytes in Apple MacOS X 32 bit PPC ABI"
...
This reverts commit 5a59b5f321 .
The strong ABI guarantee only applies if bool is a byte (we repurposed a Uint8 field as a bool in SDL_gpu.h), and 32-bit PPC isn't a platform we support, so I'm going to back this patch out.
2025-04-08 08:14:25 -07:00
Sam Lantinga
cccad933a0
Updated version documentation to match SDL 3.x practice
2025-04-07 10:22:42 -07:00
Sam Lantinga
85281be78d
Re-added text removed by the wiki bridge
2025-04-03 15:04:43 -07:00
Sam Lantinga
39a3b14dfe
Renamed SDL_GetGPUDeviceDebugProperties() to SDL_GetGPUDeviceProperties()
...
We may want to extend this with additional properties in the future.
Also removed SDL_PROP_GPU_DEVICE_DEBUG_VULKAN_CONFORMANCE_STRING. If we need feature level queries we can add them in the future.
2025-04-03 14:59:11 -07:00
Sam Lantinga
6430aed3dd
Removed SDL_XInputVersion, which isn't used
2025-04-03 13:39:09 -07:00
Sam Lantinga
40e08ee7af
Assume new XBox controllers have a share button
...
The list of old XBox controllers was taken from controller_list.h, removing controllers already known to have a share button.
2025-04-03 12:31:45 -07:00
Sam Lantinga
6bb16296b0
Added special handling for SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY
...
This hint needs to persist outside of the normal application flow, so use the environment to set the initial value, and then save the value set via SDL_SetHint() after that.
Fixes https://github.com/libsdl-org/SDL/issues/12677
2025-04-03 11:33:34 -07:00
Sam Lantinga
756b455d3a
Fixed building for Xbox One
...
Fixes https://github.com/libsdl-org/SDL/issues/12714
2025-04-03 09:08:56 -07:00
Sam Lantinga
df32827407
Note that you might get a different size window than you expect
2025-04-03 08:47:23 -07:00
Sam Lantinga
ab34ea5a26
Fixed documentation for SDL_GL_*_SIZE
2025-04-02 22:32:11 -07:00
Sam Lantinga
b521400861
Note that the Emscripten window properties are strings
2025-04-02 08:33:16 -07:00
Sam Lantinga
82b245d13a
Added support for the HORI Taiko No Tatsujin Drum Controller
2025-04-02 08:30:26 -07:00
Sam Lantinga
735b685816
Fixed wiki reformatting
2025-04-02 07:35:09 -07:00
Sam Lantinga
4aefde015e
Only send sensor data if sensors are enabled for 8BitDo controllers
2025-04-01 19:58:28 -07:00
Sam Lantinga
c3ce216c4d
Fixed crash at shutdown on Windows
...
The taskbar list is invalid after OleUninitialize(), so make sure we clean it up first.
Also don't bother creating the taskbar list if we don't have any progress state
2025-04-01 14:56:08 -07:00
Sam Lantinga
366a5281b9
Fixed comment
2025-04-01 09:07:20 -07:00
Sam Lantinga
79a41ca7fc
Implemented DEBUG_8BITDO_PROTOCOL
2025-04-01 09:06:30 -07:00
Sam Lantinga
5922e2cb78
Corrected comment with 8BitDo controller report sizes
2025-04-01 09:01:32 -07:00
Sam Lantinga
0d9ff082fe
8BitDo HIDAPI driver cleanup
2025-04-01 09:00:39 -07:00
Sam Lantinga
4de396734d
More clarification for high DPI support
2025-03-31 18:53:40 -07:00
Sam Lantinga
36fc1c2c9c
Fixed texture colorspace when creating a texture from a surface
...
Fixes https://github.com/libsdl-org/SDL/issues/12691
2025-03-31 18:49:58 -07:00
Sam Lantinga
2e494fda30
Clarify high DPI support and best practices
2025-03-31 16:49:18 -07:00
Sam Lantinga
44faac2921
Fixed A/B/X/Y buttons on Nintendo 3DS
...
Fixes https://github.com/libsdl-org/SDL/issues/12690
2025-03-31 15:36:03 -07:00
Sam Lantinga
38c2081ae3
Temporarily default SDL_HINT_JOYSTICK_HIDAPI_8BITDO off
...
We'll default this off for now, since we don't detect whether the controller is running firmware v1.03 and don't have a fallback for controllers running firmware v1.02 (the out-of-box firmware)
2025-03-31 10:00:11 -07:00
Sam Lantinga
0d04e9ea6a
Fixed build
2025-03-30 21:35:14 -07:00
Sam Lantinga
7bb95bde49
Set the alpha opaque when blending to an RGB format
...
Fixes the render_testRGBSurfaceNoAlpha automated test in sdl2-compat
2025-03-30 21:24:53 -07:00
Sam Lantinga
daa7a5ad7e
Updated Visual Studio example projects
2025-03-29 09:01:33 -07:00
Sam Lantinga
a23f97483f
Temporarily disable DwmFlush()
...
For some reason this locks up the Windows compositor when called by Steam. I'm disabling it for now until we understand why and whether this can cause issues for other applications as well.
2025-03-28 20:31:07 -07:00
Sam Lantinga
633b9f6fb1
Added SDL_SetRenderTextureAddressMode() and SDL_GetRenderTextureAddressMode()
...
Fixes https://github.com/libsdl-org/SDL/issues/4820
Fixes https://github.com/libsdl-org/SDL/issues/12610
2025-03-28 13:51:19 -07:00
Sam Lantinga
eed94cb034
Updated link to PSP Hello World
2025-03-27 12:30:44 -07:00
Sam Lantinga
0f27c3aabd
Added SDL_PROP_PROCESS_CREATE_WORKING_DIRECTORY_STRING
...
Fixes https://github.com/libsdl-org/SDL/issues/12654
2025-03-27 11:30:00 -07:00
Sam Lantinga
2e61b41652
Don't send relative motion while in a modal loop
...
This fixes queuing up a bunch of relative motion events while moving or resizing a window.
2025-03-27 08:10:50 -07:00
Sam Lantinga
e28974124a
Added mappings for the NSO N64/SEGA/SNES controllers
...
These are used on Linux when the HIDAPI driver isn't available.
2025-03-25 14:46:03 -07:00
Sam Lantinga
b88200b797
Fixed face buttons for the NSO SNES controller under the HIDAPI driver
2025-03-25 14:46:03 -07:00
Sam Lantinga
f355c7f217
Allow the progress API to be used on all platforms
...
It's visually only hooked up on Windows for now, but the API will be internally consistent on all platforms.
2025-03-25 11:24:22 -07:00
Sam Lantinga
d6f137b2be
Added a note to tag the wiki when doing feature releases
...
Fixes https://github.com/libsdl-org/SDL/issues/12618
2025-03-24 11:45:20 -07:00
Sam Lantinga
b6ca03611f
Fixed mixed trigger and body rumble for Xbox controllers on Windows
...
Fixes https://github.com/libsdl-org/SDL/issues/12095
2025-03-24 11:06:37 -07:00
Sam Lantinga
69ad66b017
Fixed error messages in GetTaskbarList()
2025-03-23 07:58:03 -07:00
Sam Lantinga
6b13d69105
Improve move/resize visual smoothness on Windows
...
Fixes https://github.com/libsdl-org/SDL/issues/12528
2025-03-21 16:46:25 -07:00
Sam Lantinga
2fbb583290
SDL_ClaimWindowForGPUDevice() should fail for transparent windows
...
The GPU API doesn't currently support transparent windows (transparent swapchain effects doesn't seem possible on D3D12) so we should explicitly fail so users don't expect transparency and then not get it.
Fixes https://github.com/libsdl-org/SDL/issues/12410
2025-03-21 12:14:20 -07:00
Sam Lantinga
fbdb637978
Fixed build when virtual joysticks are disabled
2025-03-21 07:34:57 -07:00
Sam Lantinga
758eb256b9
Fixed DebugLogRenderCommands() output
2025-03-20 21:24:39 -07:00
Sam Lantinga
4ceb02434b
We need to rebind D3D12 resources after updating them
...
Fixes https://github.com/libsdl-org/SDL/issues/12544
2025-03-20 20:22:00 -07:00
Sam Lantinga
3538abfb82
Revert "Don't update a texture twice in the same batch on D3D12"
...
This reverts commit 0681d08817 .
There's a simpler fix for this.
2025-03-20 19:56:59 -07:00
Sam Lantinga
0681d08817
Don't update a texture twice in the same batch on D3D12
...
Fixes https://github.com/libsdl-org/SDL/issues/12544
2025-03-20 19:51:56 -07:00
Sam Lantinga
3fd61b0535
Updated for SDL style
2025-03-20 16:42:40 -07:00
Sam Lantinga
03a53ce0d1
Always show the on-screen keyboard on Steam Deck
...
Steam will eventually have smarts about whether a keyboard is active and will igore the request appropriately.
Fixes https://github.com/libsdl-org/SDL/issues/12595
2025-03-20 16:19:50 -07:00
Sam Lantinga
8caeaaacdd
A Steam Controller might be generating keyboard input
...
We can't use keyboard input as a signal about whether a keyboard is attached. There might be keyboard input from any number of generated inputs or non-keyboard devices.
2025-03-20 16:19:50 -07:00
Sam Lantinga
cbb83be895
Show the on-screen keyboard if we don't have active keyboard input
...
Active keyboard input is based on the input the user has most recently sent.
Fixes https://github.com/libsdl-org/SDL/issues/12595
2025-03-20 16:19:50 -07:00
Sam Lantinga
3ed61f203e
Fixed applications that integrate Qt with SDL joystick support
2025-03-20 12:16:44 -07:00
Sam Lantinga
fe024b8fe3
Fixed typo in build.gradle
2025-03-20 11:22:03 -07:00
Sam Lantinga
10fae8c34b
Fixed Android build warnings
2025-03-20 11:02:33 -07:00
Sam Lantinga
bf7b9b020e
Fixed gradle deprecation warnings
...
"Space-assignment syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10.0"
2025-03-20 11:02:04 -07:00
Sam Lantinga
ac28702504
Use the android-21 SDK as documented in README-android.md
2025-03-20 10:47:43 -07:00
Sam Lantinga
476e7e54cb
Don't create surfaces with invalid pixel formats
...
Fixes https://github.com/libsdl-org/SDL/issues/12556
2025-03-20 09:42:52 -07:00
Sam Lantinga
f2ed5c7a1b
Fix illegal calls to DwmGetWindowAttribute()
...
DWMWA_WINDOW_CORNER_PREFERENCE and DWMWA_BORDER_COLOR are only supported for DwmSetWindowAttribute(), they can't be queried.
Fixes https://github.com/libsdl-org/SDL/issues/12206
Closes https://github.com/libsdl-org/SDL/pull/12209
2025-03-19 22:00:42 -07:00
Sam Lantinga
96bf12444c
Windows allows windows to be resized to zero height.
...
Changed the window client rect validation to take this into account.
Fixes https://github.com/libsdl-org/SDL/issues/9796
2025-03-19 21:16:35 -07:00
Sam Lantinga
47b0c75470
Make sure we're getting called for the correct window
...
Fixes https://github.com/libsdl-org/SDL/issues/12525
2025-03-19 20:20:36 -07:00
Sam Lantinga
3415bc920a
Fixed crash if a window couldn't be created on Windows
...
Fixes https://github.com/libsdl-org/SDL/issues/11482
2025-03-19 20:10:24 -07:00
Sam Lantinga
8b924df48b
Use an autoreleasepool in Cocoa_GetDisplayUsableBounds()
...
Fixes https://github.com/libsdl-org/SDL/issues/12571
2025-03-18 14:36:48 -07:00
Sam Lantinga
82335fd0e9
Fixed building with SDL_LEAN_AND_MEAN
...
Fixes https://github.com/libsdl-org/SDL/issues/12578
2025-03-18 09:55:23 -07:00