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
Sam Lantinga
5985f0a327
Fixed infinite recursion in SDL_IsGamepad()
...
SDL_IsGamepad() calls SDL_GetJoystickTypeForID(), which will call SDL_IsGamepad() if it's not a known controller type. The new code which is breaking was added to prevent Logitech FFB wheels from showing up as gamepads, which we check for separately.
2025-03-17 19:10:26 -07:00
Sam Lantinga
4fc9509ab7
Fixed raw input device GUIDs changing randomly between runs
...
On Windows 11, apparently HidD_GetManufacturerString() and HidD_GetProductString() can return TRUE without actually filling in any string data.
Fixes https://github.com/libsdl-org/SDL/issues/12566
2025-03-17 13:54:56 -07:00
Sam Lantinga
715301cef5
Fixed crash if info->path is NULL
2025-03-17 09:46:41 -07:00
Sam Lantinga
501e71f25f
Added unaligned version of SDL_ConvertPixels_SwapNV_std()
...
Fixes https://github.com/libsdl-org/SDL/issues/12546
2025-03-15 09:24:25 -07:00
Sam Lantinga
ad9f9af4ed
Removed accidentally enabled debug code
2025-03-15 09:17:55 -07:00
Sam Lantinga
efe122be4d
Removed width/height parameters from LoadTexture()
...
You can directly access the texture width and height now.
2025-03-14 11:38:13 -07:00
Sam Lantinga
dcb97a5f49
Set a default shader entry point
...
The default should be the entrypoint generated by SDL_shadercross. That way it doesn't need to be hand-specified in the common workflow.
2025-03-14 11:38:13 -07:00
Sam Lantinga
ffe69fc354
Fixed SDL_GPUTextureSupportsSampleCount() documentation
...
Fixes https://github.com/libsdl-org/sdlwiki/issues/751
2025-03-14 09:30:19 -07:00
Sam Lantinga
02faa8f75c
Rename SDL_SetGPURenderStateFragmentUniformData() to SDL_SetGPURenderStateFragmentUniforms()
2025-03-14 09:26:30 -07:00
Sam Lantinga
96194347bc
Added an example of fullscreen shader effects with the GPU renderer
2025-03-14 09:26:30 -07:00
Sam Lantinga
2aee105b43
Added support for custom shaders with the GPU renderer
...
Added an example of MSDF font rendering with the SDL 2D renderer
2025-03-14 09:26:30 -07:00
Sam Lantinga
1ae4ef65e6
Fixed incorrect assert
2025-03-13 22:37:08 -07:00
Sam Lantinga
3e9e22f17d
Added SDL_SCALEMODE_PIXELART
...
This is based on the algorithm presented by t3ssel8r:
https://www.youtube.com/watch?v=d6tp43wZqps
2025-03-13 09:48:37 -07:00
Sam Lantinga
853375da61
Removed texture_size from the GPU renderer vertex shader
...
This isn't used anywhere, and this saves a UV multiply and divide
2025-03-13 09:48:37 -07:00
Sam Lantinga
28ec461ebf
Organize the GPU renderer draw code
2025-03-13 09:48:37 -07:00
Sam Lantinga
af0420d898
Switched GPU renderer shaders to shadercross and HLSL
2025-03-13 09:48:37 -07:00
Sam Lantinga
5e951a230e
windows: Fix WIN_SetWindowAlwaysOnTop causing owner window z-order changes when child windows are created or change top-level status
...
- WIN_SetWindowAlwaysOnTop is always called as part of window creation (normally setting HWND_NOTOPMOST) which also set the z-order for the parent
window when child windows are created. Since HWND_NOTOPMOST is above all non-topmost windows this had the effect of reordering but not focusing
the parent window.
2025-03-12 13:06:31 -07:00
Sam Lantinga
50a397bb45
Removed help for obsolete (and removed) command line option
2025-03-12 12:38:34 -07:00
Sam Lantinga
3235a4eb4f
Initialize the padding of aligned allocations to zero
...
Fixes valgrind uninitialized memory errors when doing SIMD blits
e.g. testautomation --filter surface_testScale
2025-03-12 11:42:02 -07:00
Sam Lantinga
2ce3dfdf1d
Fixed Nintendo controller face button layout under Steam
2025-03-10 17:25:01 -07:00
Sam Lantinga
be6ed6e9c4
Fixed sscanf("026", "%1x%1x%1x", &r, &g, &b)
...
Fixes https://github.com/libsdl-org/SDL/issues/12510
2025-03-10 14:45:08 -07:00
Sam Lantinga
24339524c5
Use sized types when fixing undefined behavior
2025-03-10 09:12:40 -07:00
Sam Lantinga
99336ea378
Fixed memory leak in memory leak tracking
2025-03-08 09:18:25 -08:00
Sam Lantinga
3353b92a96
Fixed pen events on iOS after reinitializing SDL
...
We weren't resetting apple_pencil_id, so not re-registering it later.
2025-03-07 16:32:53 -08:00
Sam Lantinga
d631a3add0
Add a link to docs/INTRO-mingw.md
2025-03-06 16:25:17 -08:00
Sam Lantinga
b99ff00a95
Removed logic forcing vsync on if setting it off fails
...
The platforms that needed this (Windows Phone and Windows RT) are no longer supported, and if this is needed in the future it should be done at the renderer level, not here.
Fixes https://github.com/libsdl-org/SDL/issues/12475
2025-03-06 16:18:02 -08:00
Sam Lantinga
e20e27e1fb
Added SIMD blitters for 8888 -> 8888 format conversion
2025-03-06 02:14:54 -08:00
Sam Lantinga
4c82b5843e
Added support for SDL_PIXELFORMAT_MJPG to SDL_DuplicateSurface()
...
Fixes https://github.com/libsdl-org/SDL/issues/12472
2025-03-05 23:33:26 -08:00
Sam Lantinga
cb099ebd4f
Make texture scale mode a part of the 2D renderer draw state
...
Also added texture addressing mode support to the PSP and Vita renderers (untested)
Fixes https://github.com/libsdl-org/SDL/issues/12461
2025-03-05 21:35:04 -08:00
Sam Lantinga
49af576940
Disable XTest by default
...
On Ubuntu 24.04 running XWayland, XTestFakeMotionEvent() appears to succeed but doesn't actually move the cursor, even if the cursor is hidden.
2025-03-05 13:23:02 -08:00
Sam Lantinga
794ff283e2
Added support for using XTest to warp the mouse
2025-03-05 13:23:02 -08:00
Sam Lantinga
fae324dacb
Update XSync code to match SDL3 conventions
2025-03-05 13:23:02 -08:00
Sam Lantinga
fe9bdcf508
Added SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT
2025-03-05 09:07:05 -08:00
Sam Lantinga
8f40dad460
Document the thread safety of SDL surface functions
2025-03-05 07:24:24 -08:00