Frank Praznik
3ed80843fe
video: Fix boolean logic for getting the pending window position
...
(cherry picked from commit 03cdd297e0 )
2025-03-21 11:36:46 -07:00
hwsmm
4029521a63
Don't send text event while ctrl/alt is held on X11/Wayland
...
(cherry picked from commit ac5b2b6102 )
2025-03-20 21:27:22 -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
Carl Åstholm
a934a36a18
emscripten: Don't use legacy JS library functions for assertions
...
(cherry picked from commit 54f5b73333 )
2025-03-20 16:32:40 -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
Ryan C. Gordon
10ed6f49a9
asyncio: SDL_LoadFileAsync was not null-terminating the file data.
...
(cherry picked from commit 10072bb07d )
2025-03-20 16:30:04 -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
Evan Hemsley
ac21e3ef3f
GPU Vulkan: Fix render pass race ( #12587 )
...
(cherry picked from commit c696e93180 )
2025-03-19 13:34:26 -07:00
Frank Praznik
a5b51669fb
time: Fix compilation on Solaris
...
The tm_gmtoff field of the broken-down time 'tm' struct wasn't formally standardized until POSIX.1-2024, but practically it has been available on desktop *nix platforms such as Linux/glibc, FreeBSD, OpenBSD, NetBSD, OSX/macOS (NextStep before that), and others since the 1990s. The notable exception is SunOS/Solaris, where the timezone offset must still be retrieved in the strictly POSIX.1-2008 compliant way.
(cherry picked from commit 7b93a744c8 )
2025-03-19 12:27:39 -04:00
Carl Åstholm
0ac030549b
emscripten: Fix undefined behavior in opengles2 renderer
...
(cherry picked from commit 14deef997c )
2025-03-18 19:19:01 -07:00
Frank Praznik
6f1afe7084
video: Send pending coordinates for moved, hidden windows
...
Some backends can't actually position a window until it is shown/mapped, so assume that it will be where it was asked to be as long as it is hidden.
(cherry picked from commit d66483dfcc )
2025-03-18 19:56:25 -04: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
Arnoldo Adonaí Barón Robles
ae05ab280d
Fix Vulkan error check
...
(cherry picked from commit a551c2a6d7 )
2025-03-17 22:11:21 -07:00
Caleb Cornett
51a6cb2cf5
gpu: Fix MTLLibrary dispatch data destructor
...
(cherry picked from commit 6d0fb0a2e6 )
2025-03-17 18:54:30 -07:00
Evan Hemsley
daf468e141
GPU: Fix Vulkan backend never checking deallocations ( #12567 )
...
---------
Co-authored-by: Sam Lantinga <slouken@libsdl.org >
(cherry picked from commit 0bd70684b3 )
2025-03-17 13:59:47 -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
Cameron Gutman
3e34720851
mouse: Allow use of integer coordinates with fractional wheel events
...
SDL 2.0.18 added preciseX/Y to mouse wheel events, which we cannot
emulate in sdl2-compat without a mechanism to control integer position
and scroll deltas separately.
(cherry picked from commit aad1e35162 )
2025-03-15 13:44:19 -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
Frank Praznik
a530df20b2
cocoa: Set the internal window data before calling methods that may result in referencing the internal data
...
(cherry picked from commit 512d97eaba )
2025-03-12 17:09:37 -04: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
rohlem
74b3b8e9e3
avoid UB (left shift of negative number) in SDL_windowsevents.c
...
(cherry picked from commit f1d16e9b4d )
2025-03-10 09:54:05 -07:00
Frank Praznik
fa4a9ba74e
wayland: Fix enum/boolean comparison and assignment
...
(cherry picked from commit f2866418d4 )
2025-03-09 12:28:39 -04:00
Cameron Gutman
9a6f8a2512
mouse: Add internal integer mouse mode hint for sdl2-compat
...
Performing this inside SDL3 dramatically simplifies sdl2-compat. See https://github.com/libsdl-org/sdl2-compat/issues/372 .
(cherry picked from commit 597bfe6b27 )
2025-03-08 19:07:05 -08:00
bobsayshilol
1173bc2dde
emscripten: Fix handling of special HTML targets
...
With ASAN enabled the existing code triggered null-pointer-dereference
in the strcmp since EMSCRIPTEN_EVENT_TARGET_WINDOW is a "fake" pointer
with the value ((const char*)2). In fixing this it was also noticed
that using the #window/#document/#screen targets as mentioned in the
docs fails since document.querySelector() returns null for them and we
should instead be mapping them to the special HTML targets provided.
(cherry picked from commit 65cd2256c5 )
2025-03-08 17:16:57 -08:00
TheMode
ada55bd887
Implement SDL_GetSystemRAM and SDL_GetNumLogicalCPUCores for the 3ds ( #12494 )
...
(cherry picked from commit 5d804a39d9 )
2025-03-08 09:54:43 -08:00
Sam Lantinga
fe97cff7d1
Fixed memory leak in memory leak tracking
...
(cherry picked from commit 99336ea378 )
2025-03-08 09:54:43 -08:00
ds-sloth
8cdeb1a35a
Fix n3ds/SDL_syssem.c:SDL_SignalSemaphore ( libsdl-org/SDL#12411 )
...
(cherry picked from commit 0306b5a865 )
2025-03-07 17:32:05 -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
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
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