Sam Lantinga
18d367afd2
Fixed process I/O redirection to NUL on Windows
...
(cherry picked from commit 4093e4a193 )
2025-04-11 15:45:33 -07:00
Sam Lantinga
9a4faf9ab9
Add the CREATE_NO_WINDOW flag for background processes
...
Fixes https://github.com/libsdl-org/SDL/issues/12097
(cherry picked from commit c025fdbb7c )
2025-04-11 15:45:33 -07:00
Sam Lantinga
cb0ba020d4
Don't reset the render target when invalidating GPU renderer cache state
...
Fixes https://github.com/libsdl-org/SDL/issues/12646
(cherry picked from commit f35a2736b7 )
2025-04-11 09:24:38 -07:00
Sam Lantinga
f705e2f9f7
Fixed conflict when linking both SDL and hidapi statically
...
Fixes https://github.com/libsdl-org/SDL/issues/12790
(cherry picked from commit 98e76d283f )
2025-04-10 09:58:13 -07:00
Sam Lantinga
4e1282617a
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.
(cherry picked from commit 93ac1e6894 )
2025-04-08 12:21:34 -07:00
Sam Lantinga
f102ff16a2
Don't treat the Keychron K1 Pro System Control keyboard as a joystick
...
Fixes https://github.com/libsdl-org/SDL/issues/12758
(cherry picked from commit d29bb902f3 )
2025-04-08 11:08:55 -07:00
Sam Lantinga
a1dde664d1
Updated version documentation to match SDL 3.x practice
...
(cherry picked from commit cccad933a0 )
2025-04-07 10:23:27 -07:00
Sam Lantinga
a447863e4f
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.
(cherry picked from commit dcb97a5f49 )
2025-04-04 07:39:16 -07:00
Sam Lantinga
8222513f63
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
(cherry picked from commit 6bb16296b0 )
2025-04-03 11:34:03 -07:00
Sam Lantinga
2dd20ce8e7
Fixed building for Xbox One
...
Fixes https://github.com/libsdl-org/SDL/issues/12714
(cherry picked from commit 756b455d3a )
2025-04-03 09:10:01 -07:00
Sam Lantinga
f51b88e6b5
Note that you might get a different size window than you expect
...
(cherry picked from commit df32827407 )
2025-04-03 08:54:27 -07:00
Sam Lantinga
7cb0fa5c56
Fixed documentation for SDL_GL_*_SIZE
...
(cherry picked from commit ab34ea5a26 )
2025-04-02 22:32:39 -07:00
Sam Lantinga
976c92a2fb
Added support for the HORI Taiko No Tatsujin Drum Controller
...
(cherry picked from commit 82b245d13a )
2025-04-02 08:30:55 -07:00
Sam Lantinga
0759f22a91
More clarification for high DPI support
...
(cherry picked from commit 4de396734d )
2025-03-31 18:53:57 -07:00
Sam Lantinga
02036ee643
Fixed texture colorspace when creating a texture from a surface
...
Fixes https://github.com/libsdl-org/SDL/issues/12691
(cherry picked from commit 36fc1c2c9c )
2025-03-31 18:50:45 -07:00
Sam Lantinga
2103451d00
Clarify high DPI support and best practices
...
(cherry picked from commit 2e494fda30 )
2025-03-31 16:49:55 -07:00
Sam Lantinga
b6db091d60
Fixed A/B/X/Y buttons on Nintendo 3DS
...
Fixes https://github.com/libsdl-org/SDL/issues/12690
(cherry picked from commit 44faac2921 )
2025-03-31 15:38:16 -07:00
Sam Lantinga
9827653c38
Updated to version 3.2.11 for development
2025-03-31 13:54:19 -07:00
Sam Lantinga
877399b2b2
Updated to version 3.2.10 for release
2025-03-31 13:12:19 -07:00
Sam Lantinga
366294e1c5
Fixed build
...
(cherry picked from commit 0d04e9ea6a )
2025-03-30 21:35:22 -07:00
Sam Lantinga
4d966ff546
Set the alpha opaque when blending to an RGB format
...
Fixes the render_testRGBSurfaceNoAlpha automated test in sdl2-compat
(cherry picked from commit 7bb95bde49 )
2025-03-30 21:30:04 -07:00
Sam Lantinga
6b665066f0
Added SIMD blitters for 8888 -> 8888 format conversion
...
(cherry picked from commit e20e27e1fb )
2025-03-30 21:29:48 -07:00
Sam Lantinga
4b8c38e7ba
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.
(cherry picked from commit a23f97483f )
2025-03-28 20:32:28 -07:00
Sam Lantinga
cec6073085
Updated link to PSP Hello World
...
(cherry picked from commit 304cb742881c5da76d41f28181624f8c2aafa05a)
2025-03-27 12:19:51 -07:00
Sam Lantinga
d73ad0ef18
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.
(cherry picked from commit 2e61b41652 )
2025-03-27 08:10:58 -07:00
Sam Lantinga
e77ef86f09
Added mappings for the NSO N64/SEGA/SNES controllers
...
These are used on Linux when the HIDAPI driver isn't available.
(cherry picked from commit e28974124a )
2025-03-25 14:46:30 -07:00
Sam Lantinga
951ba597ed
Fixed face buttons for the NSO SNES controller under the HIDAPI driver
...
(cherry picked from commit b88200b797 )
2025-03-25 14:46:30 -07:00
Sam Lantinga
38697dd812
Fixed mixed trigger and body rumble for Xbox controllers on Windows
...
Fixes https://github.com/libsdl-org/SDL/issues/12095
(cherry picked from commit b6ca03611f )
2025-03-24 11:07:12 -07:00
Sam Lantinga
134b57f6f5
Improve move/resize visual smoothness on Windows
...
Fixes https://github.com/libsdl-org/SDL/issues/12528
(cherry picked from commit 6b13d69105 )
2025-03-21 16:47:29 -07:00
Sam Lantinga
ed8e7e85f0
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
(cherry picked from commit 2fbb583290 )
2025-03-21 12:15:09 -07:00
Sam Lantinga
f971a59746
Fixed DebugLogRenderCommands() output
...
(cherry picked from commit 758eb256b9 )
2025-03-20 21:25:23 -07:00
Sam Lantinga
5836266bfb
We need to rebind D3D12 resources after updating them
...
Fixes https://github.com/libsdl-org/SDL/issues/12544
(cherry picked from commit 4ceb02434b )
2025-03-20 20:22:33 -07:00
Sam Lantinga
59857acd08
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
(cherry picked from commit 03a53ce0d1 )
2025-03-20 16:30:04 -07:00
Sam Lantinga
8129b637f3
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.
(cherry picked from commit 8caeaaacdd )
2025-03-20 16:30:04 -07:00
Sam Lantinga
9e1675671d
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
(cherry picked from commit cbb83be895 )
2025-03-20 16:30:04 -07:00
Sam Lantinga
8b191c3ca6
Fixed typo in build.gradle
...
(cherry picked from commit fe024b8fe3 )
2025-03-20 11:22:20 -07:00
Sam Lantinga
06a412cd68
Fixed gradle deprecation warnings
...
"Space-assignment syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10.0"
(cherry picked from commit bf7b9b020e )
2025-03-20 11:05:56 -07:00
Sam Lantinga
b74609d5f3
Use the android-21 SDK as documented in README-android.md
...
(cherry picked from commit ac28702504 )
2025-03-20 11:05:56 -07:00
Sam Lantinga
d8756582f9
Don't create surfaces with invalid pixel formats
...
Fixes https://github.com/libsdl-org/SDL/issues/12556
(cherry picked from commit 476e7e54cb )
2025-03-20 09:43:40 -07:00
Sam Lantinga
ff90984dc3
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
(cherry picked from commit f2ed5c7a1b )
2025-03-19 22:03:18 -07:00
Sam Lantinga
81952f9f96
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
(cherry picked from commit 96bf12444c )
2025-03-19 21:23:06 -07:00
Sam Lantinga
d0122ff624
Make sure we're getting called for the correct window
...
Fixes https://github.com/libsdl-org/SDL/issues/12525
(cherry picked from commit 47b0c75470 )
2025-03-19 20:22:52 -07:00
Sam Lantinga
7a36aa37aa
Fixed crash if a window couldn't be created on Windows
...
Fixes https://github.com/libsdl-org/SDL/issues/11482
(cherry picked from commit 3415bc920a )
2025-03-19 20:10:49 -07:00
Sam Lantinga
6302589829
Use an autoreleasepool in Cocoa_GetDisplayUsableBounds()
...
Fixes https://github.com/libsdl-org/SDL/issues/12571
(cherry picked from commit 8b924df48b )
2025-03-18 14:40:01 -07:00
Sam Lantinga
3225d31679
Fixed building with SDL_LEAN_AND_MEAN
...
Fixes https://github.com/libsdl-org/SDL/issues/12578
(cherry picked from commit 82335fd0e9 )
2025-03-18 09:55:46 -07:00
Sam Lantinga
cd673c8254
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
(cherry picked from commit 4fc9509ab7 )
2025-03-17 13:57:15 -07:00
Sam Lantinga
3f13c0b36d
Fixed crash if info->path is NULL
...
(cherry picked from commit 715301cef5 )
2025-03-17 09:46:57 -07:00
Sam Lantinga
0799237d74
Added unaligned version of SDL_ConvertPixels_SwapNV_std()
...
Fixes https://github.com/libsdl-org/SDL/issues/12546
(cherry picked from commit 501e71f25f )
2025-03-15 09:25:39 -07:00
Sam Lantinga
53f64e40c4
Fixed SDL_GPUTextureSupportsSampleCount() documentation
...
Fixes https://github.com/libsdl-org/sdlwiki/issues/751
(cherry picked from commit ffe69fc354 )
2025-03-14 09:30:44 -07:00
Sam Lantinga
b958189c92
Removed help for obsolete (and removed) command line option
...
(cherry picked from commit 50a397bb45 )
2025-03-12 12:38:52 -07:00
Sam Lantinga
341f910835
Initialize the padding of aligned allocations to zero
...
Fixes valgrind uninitialized memory errors when doing SIMD blits
e.g. testautomation --filter surface_testScale
(cherry picked from commit 3235a4eb4f )
2025-03-12 11:43:09 -07:00
Sam Lantinga
21e6c5814c
Fixed Nintendo controller face button layout under Steam
...
(cherry picked from commit 2ce3dfdf1d )
2025-03-10 17:31:12 -07:00
Sam Lantinga
776f0a685c
Fixed sscanf("026", "%1x%1x%1x", &r, &g, &b)
...
Fixes https://github.com/libsdl-org/SDL/issues/12510
(cherry picked from commit be6ed6e9c4 )
2025-03-10 14:46:30 -07:00
Sam Lantinga
9f32fafe21
Use sized types when fixing undefined behavior
...
(cherry picked from commit 24339524c5 )
2025-03-10 09:54:05 -07:00
Sam Lantinga
fe97cff7d1
Fixed memory leak in memory leak tracking
...
(cherry picked from commit 99336ea378 )
2025-03-08 09:54:43 -08:00
Sam Lantinga
7c82171a85
Fixed pen events on iOS after reinitializing SDL
...
We weren't resetting apple_pencil_id, so not re-registering it later.
(cherry picked from commit 3353b92a96 )
2025-03-07 16:33:09 -08:00
Sam Lantinga
2d2085c80b
Add a link to docs/INTRO-mingw.md
...
(cherry picked from commit d631a3add0 )
2025-03-06 16:26:15 -08:00
Sam Lantinga
fec3e2cd45
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
(cherry picked from commit b99ff00a95 )
2025-03-06 16:18:42 -08:00
Sam Lantinga
2aec1c2ef6
Added support for SDL_PIXELFORMAT_MJPG to SDL_DuplicateSurface()
...
Fixes https://github.com/libsdl-org/SDL/issues/12472
(cherry picked from commit 4c82b5843e )
2025-03-05 23:39:33 -08:00
Sam Lantinga
b32cd4f84b
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
(cherry picked from commit cb099ebd4f )
2025-03-05 22:39:31 -08:00
Sam Lantinga
d75ba9c2d2
Added SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT
...
(cherry picked from commit fe9bdcf508 )
2025-03-05 09:13:10 -08:00
Sam Lantinga
e454d7d4be
Document the thread safety of SDL surface functions
...
(cherry picked from commit 8f40dad460 )
2025-03-05 07:26:49 -08:00
Sam Lantinga
cd8bffb2dd
Fixed continuous logging if returning to desktop mode fails on X11
...
(cherry picked from commit aef240b2e4 )
2025-03-04 17:26:03 -08:00
Sam Lantinga
9646e3cc1b
Handle XWayland not sending display disconnected events
...
Also updated X11_CheckDisplaysMoved() to handle multiple X11 screens
Fixes https://github.com/libsdl-org/SDL/issues/12462
(cherry picked from commit e9632c83c7 )
2025-03-04 17:26:03 -08:00
Sam Lantinga
1a2362ebf1
Updated to version 3.2.9 for development
2025-03-04 15:07:23 -08:00
Sam Lantinga
f6864924f7
Updated to version 3.2.8 for release
2025-03-04 14:37:06 -08:00
Sam Lantinga
6b3dafa4d3
Fixed crash when restoring the desktop mode on macOS
...
Fixes https://github.com/libsdl-org/SDL/issues/12460
(cherry picked from commit 80ae3a7516 )
2025-03-04 14:34:10 -08:00
Sam Lantinga
5c0c5d2816
Fixed crash unplugging a HIDAPI controller
...
(cherry picked from commit 5f07347e4f )
2025-03-04 11:42:37 -08:00
Sam Lantinga
de11dd3d60
Make SDL_RegisterEvents() thread-safe
...
Fixes https://github.com/libsdl-org/SDL/issues/12457
(cherry picked from commit 82552e5b7c )
2025-03-04 10:28:53 -08:00
Sam Lantinga
d959719a3d
Fixed clip rect when logical presentation is enabled
...
We don't need to include the logical offset, it's already included in the viewport.
Fixes https://github.com/libsdl-org/SDL/issues/12454
(cherry picked from commit 4bb46e93c8 )
2025-03-04 08:25:46 -08:00
Sam Lantinga
5a7b17fec5
Added fullscreen_active to better track fullscreen state
...
This is true if fullscreen is pending or currently active. This is a better check in SDL_SetDesktopDisplayMode() because a fullscreen mode may be pending and complete asynchronously and the window hasn't been set to fullscreen yet.
(cherry picked from commit 7c29c8b266 )
2025-03-03 21:19:15 -08:00
Sam Lantinga
70a289076a
Don't save temporary mode changes to the desktop mode
...
Fixes https://github.com/libsdl-org/SDL/issues/12441
(cherry picked from commit 24ec2ed785 )
2025-03-03 11:05:20 -05:00
Sam Lantinga
18d93d11e1
Only use VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR on Android
...
This fixes Nintendo Switch where the identity bit isn't available. We only needed this on Android to automatically handle device user orientation.
(cherry picked from commit 2c7c3d4d7b )
2025-03-02 09:14:12 -08:00
Sam Lantinga
110a832f5c
Save and restore error messages when rolling back after failed init
...
Fixes https://github.com/libsdl-org/SDL/issues/12439
(cherry picked from commit 1a7c206986 )
2025-03-02 07:57:36 -08:00
Sam Lantinga
bc6307a872
Updated to version 3.2.7 for development
2025-03-01 19:29:51 -08:00
Sam Lantinga
65864190cc
Added testpen to the Xcode test project
2025-03-01 18:49:25 -08:00
Sam Lantinga
292e431748
Updated to version 3.2.6 for release
2025-03-01 18:30:34 -08:00
Sam Lantinga
f0cb78e082
Handle XCreateIC() failing when composition UI is enabled
...
Fixes https://github.com/libsdl-org/sdl2-compat/issues/328
2025-03-01 13:54:07 -08:00
Sam Lantinga
55484ef023
Moved WIN_UpdateMouseCapture() to be with the other mouse functions
2025-03-01 12:54:17 -08:00
Sam Lantinga
020664bd10
Update mouse button state when re-entering a window
...
Fixes https://github.com/libsdl-org/SDL/issues/12423
2025-03-01 12:54:17 -08:00
Sam Lantinga
b836ad4d4f
Fix a root signature mismatch for the D3D12 renderer
...
The shaders hadn't been rebuilt after https://github.com/libsdl-org/SDL/commit/c74f273848b0259c4902c97213f5dc0760aecce9
Fixes https://github.com/libsdl-org/SDL/issues/12276
2025-03-01 12:02:49 -08:00
Sam Lantinga
6e4193b743
Note that the file names are UTF-8 encoded
2025-03-01 08:25:31 -08:00
Sam Lantinga
b8c2bc143e
Added build dependencies for Arch Linux
...
These are based on the dependencies listed at:
https://archlinux.org/packages/extra/x86_64/sdl3/
2025-02-28 16:31:10 -08:00
Sam Lantinga
ef23ebfb5a
Fixed the cursor clip rect when toggling window borders on macOS
2025-02-28 11:57:34 -08:00
Sam Lantinga
281f0fae1c
Include the VID/PID of generic keyboard/mouse devices on Windows
2025-02-27 14:03:39 -08:00
Sam Lantinga
eb89d0c8c3
Don't put wired Switch Pro controllers into simple report mode
...
This stops the controller from sending input or responding to queries until it's unplugged.
2025-02-26 17:54:43 -08:00
Sam Lantinga
1ea99bc904
Early out if setting a duplicate window title
...
Setting the window title is an expensive windowing operation, so short circuit it if possible.
2025-02-26 17:10:41 -08:00
Sam Lantinga
cc984c9735
Added a mapping for the 8BitDo SN30 Pro+ controller on macOS
...
This mapping is for Android mode (Start + B at startup)
Fixes https://github.com/libsdl-org/SDL/issues/12126
2025-02-26 12:24:47 -08:00
Sam Lantinga
ba88b6aa06
Fixed reliability of initializing Switch controllers on macOS
...
It looks like both macOS (15.1.1) and SDL are trying to talk to the controller at the same time, which can cause interleaved replies or even locking up the controller. Waiting a bit before talking to the controller seems to take care of this.
2025-02-26 12:24:47 -08:00
Sam Lantinga
66ecdc69ac
Don't update the report mode until the related hint is set
...
Fixes https://github.com/libsdl-org/SDL/issues/12404
2025-02-26 12:24:47 -08:00
Sam Lantinga
cf819ca818
Don't allow further operations on properties while we're destroying them
...
Fixes https://github.com/libsdl-org/SDL/issues/12407
2025-02-26 08:34:14 -08:00
Sam Lantinga
e012573766
Don't fixup mappings for Joy-Con controllers
...
They don't have a D-pad mapping, so look at the paddles instead to see whether we need to fix up the mapping.
Fixes https://github.com/libsdl-org/SDL/issues/12232
2025-02-25 19:14:18 -08:00
Sam Lantinga
34c3734953
Fixed opening one Joy-Con when the other is visible but disconnected
...
This can happen on Windows when the controller is turned off directly. It still shows up in the device list and you can send packets to it, but it's off and doesn't respond. We'll mark this device as broken and open the other as a single Joy-Con.
2025-02-25 19:14:18 -08:00
Sam Lantinga
049a7a04de
Wake the main thread for main function dispatch
...
Also added a test case to catch the main thread waiting indefinitely when a function is pending.
Fixes https://github.com/libsdl-org/SDL/issues/12390
2025-02-25 12:50:41 -08:00
Sam Lantinga
85a302550d
Set an error message if the rect passed to SDL_RenderReadPixels() is entirely outside the viewport
2025-02-25 10:28:57 -08:00
Sam Lantinga
29df99ee38
Clarified SDL_RenderReadPixels() documentation
...
Clarified that the rect to be read is clipped against the current viewport, not actually relative to it.
Also added a note for people using SDL_SetRenderLogicalPresentation() so they know they have to map between logical space and render space if they want to read back.
2025-02-25 10:28:57 -08:00
Sam Lantinga
1c2189c7c9
strings.h isn't available in Windows environments
...
I believe this header isn't necessary for clang-tidy, string.h has all the functions we care about.
Fixes https://github.com/libsdl-org/SDL/issues/12238
2025-02-25 09:41:50 -08:00
Sam Lantinga
ac5fca4ae5
Clarify the expected usage of SDL_StorageReady()
...
Fixes https://github.com/libsdl-org/SDL/issues/12201
2025-02-25 08:56:56 -08:00
Sam Lantinga
ad840e8796
Better document that main functionality is in SDL_main.h
...
Fixes https://github.com/libsdl-org/SDL/issues/12159
2025-02-25 08:38:39 -08:00
Sam Lantinga
6980325310
Added support for the "%n" sscanf format specifier
2025-02-24 20:02:59 -08:00