Commit Graph

19469 Commits

Author SHA1 Message Date
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
Dragon-Baroque
464cb0ab6e The posix4 library has been merged into the libc library
(cherry picked from commit 07e4dea693)
2025-03-19 18:41:51 -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
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
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
Joshua T. Fisher
84dff407d4 Fixup the mingw readme cmakelists
(cherry picked from commit 7746a9656e)
2025-03-11 19:43:43 -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
2d2085c80b Add a link to docs/INTRO-mingw.md
(cherry picked from commit d631a3add0)
2025-03-06 16:26:15 -08:00
Joshua T. Fisher
03a4eea0ef Added MinGW Intro readme, touched up CMake and Visual Studio readmes. (#12485)
(cherry picked from commit 04b4577b58)
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
SDL Wiki Bot
550bdc658a Sync SDL3 wiki -> header
[ci skip]

(cherry picked from commit f01bcaeb17)
2025-03-05 09:13:10 -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
SDL Wiki Bot
2477f7f982 Sync SDL3 wiki -> header
[ci skip]

(cherry picked from commit 9f557941f3)
2025-03-05 07:26:50 -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 release-3.2.8 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
Frank Praznik
ac09af2600 video: Synthesize fullscreen related moves if the driver does not.
(cherry picked from commit 9f9a442823)
2025-03-04 12:49:56 -05:00
Frank Praznik
26d1afa29c x11: Synthesize fullscreen size events on Openbox
Openbox doesn't send size events when entering fullscreen, so they must be synthesized. This is not desirable on any other window manager, as it can break fullscreen positioning on multi-monitor configurations.

(cherry picked from commit e7abbf158a)
2025-03-04 12:49:56 -05:00
Volian0
6aab3b9da8 Fix for Message Box failing to init on X11 (#12455)
Fixed X11 message boxes failing to initialize, because the proper X Logical Font Description could not be found

(cherry picked from commit debbe1cf75)
2025-03-04 08:34:58 -08:00