Sam Lantinga
877399b2b2
Updated to version 3.2.10 for release
2025-03-31 13:12:19 -07:00
Frank Praznik
3f059376ac
wayland: Commit the confinement region upon creation
...
This may prevent the pointer from escaping small regions if moving quickly.
(cherry picked from commit 6b1d6bfbe7 )
2025-03-31 11:59:29 -04:00
Frank Praznik
30a6d01cc5
wayland: Defer creating cursor confinement regions until the surface is mapped
...
Otherwise, the confinement area will be lost if the window is recreated when initializing the renderer.
(cherry picked from commit 266ee41c86 )
2025-03-31 11:59:29 -04:00
SDL Wiki Bot
b6fb47aa70
Sync SDL3 wiki -> header
...
[ci skip]
(cherry picked from commit cb1d79db39 )
2025-03-31 08:53:19 -07:00
Vittorio Romeo
7ecae856e5
Update include/SDL3/SDL_power.h
...
Co-authored-by: Sam Lantinga <slouken@libsdl.org >
(cherry picked from commit 088ad66f70 )
2025-03-31 08:53:19 -07:00
Vittorio Romeo
5db7694f22
Add performance disclaimer in SDL_GetPowerInfo documentation
...
(cherry picked from commit 032d696021 )
2025-03-31 08:53: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
Frank Praznik
519011f271
x11: Popup positions after constraining are in the window-relative space, not global
...
(cherry picked from commit 210b317d8d )
2025-03-29 11:11:24 -07:00
Andrei Tsurkan
5c224a3221
fix missing AVFoundation in CMakeLists.txt
...
(cherry picked from commit f7a89d19c6 )
2025-03-29 08:45:26 -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
Cameron Gutman
16f6c1058c
gamepad: Fix inability to disable SDL_EVENT_GAMEPAD_UPDATE_COMPLETE events
...
(cherry picked from commit 712c76fdc1 )
2025-03-28 17:19:49 -05:00
Green Sky
7939309520
video: fix surface leak when duplicating mjpeg
...
(cherry picked from commit eb918af3dc )
2025-03-28 13:19:29 -07:00
Sam Lantinga
cec6073085
Updated link to PSP Hello World
...
(cherry picked from commit 304cb742881c5da76d41f28181624f8c2aafa05a)
2025-03-27 12:19:51 -07:00
Frank Praznik
a9f121f3f7
cocoa: Clear pending state on fullscreen switch failures
...
The window failing to enter/exit fullscreen notifications don't necessarily imply anything about the actual state of the window. On failure, dump pending events, and don't presume anything about the current window state, as it will be handled by subsequent enter/leave notifications.
(cherry picked from commit 09fff161e9 )
2025-03-27 11:59:43 -04:00
Frank Praznik
361218ce15
cocoa: Re-add sync timeout
...
This should never happen, but it's a failsafe against future bugs or odd configurations
(cherry picked from commit 05d23cae73 )
2025-03-27 11:59:09 -04:00
Ryan C. Gordon
04dcfada00
audio: Allow PipeWire and PulseAudio streams to migrate to other sinks.
...
SDL still manages hotplug and default device management here, but if a user
wants to use an external tool, such as `pactl move-sink-input`, to put it
onto a different device, they probably know what they're doing and we
shouldn't stop them.
If this turns out to have some unexpected consequences, though, we can revisit
the change.
Fixes https://github.com/libsdl-org/sdl2-compat/issues/367
(cherry picked from commit 4c035a1fd8 )
2025-03-27 11:22:59 -04: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
Ryan C. Gordon
a1b888f622
alsa: Don't start the hardware until the device thread is ready to do work.
...
Otherwise, in the time it takes the thread to start and other init tasks to
complete, we tend to get an underrun on some systems, which ALSA logs to
stderr.
So this is moved to an InitThread implementation, which runs from the device
thread, right before it begins its main loop.
Reference PR #12632 .
(cherry picked from commit ae17b04c0d )
2025-03-26 15:01:04 -04:00
Ryan C. Gordon
d6267afcb9
audio: Feed output devices immediately, instead of waiting upfront.
...
This prevents the waste of an initial buffer of audio on many backends, and is
hopefully harmless on all of them.
Reference PR #12632 .
(cherry picked from commit 41636959d2 )
2025-03-26 14:58:54 -04:00
Ryan C. Gordon
b8325be9cf
pulseaudio: Fixed typo in commented-out debug logging.
...
(cherry picked from commit 48d4104ecb )
2025-03-26 14:58:46 -04: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
Frank Praznik
ab5e178dab
Fix spelling mistake in documentation
...
(cherry picked from commit b45ed98ae9 )
2025-03-25 12:39:54 -04:00
Frank Praznik
04dace6c75
x11: Send the _XWAYLAND_MAY_GRAB_KEYBOARD message when grabbing the keyboard
...
GNOME requires this to allow keyboard grabs on XWayland. Otherwise, XGrabKeyboard will still report success, but shortcuts won't be inhibited.
See https://gitlab.gnome.org/GNOME/mutter/-/commit/5f132f39750f684c3732b4346dec810cd218d609
(cherry picked from commit 716e33f106 )
2025-03-25 12:36:35 -04:00
Frank Praznik
013918cd83
cocoa: Properly set the pending fullscreen spaces state when in a transition
...
(cherry picked from commit b520cde18f )
2025-03-24 23:26:00 -04:00
Carl Åstholm
996466e855
Check if GL_OES_EGL_image_external is supported before trying to use it
...
(cherry picked from commit dd9b9d4513 )
2025-03-24 19:52:54 -07:00
Carl Åstholm
61e7878ac0
Document SDL_malloc alignment guarantees
...
(cherry picked from commit 7ec13a2ead )
2025-03-24 19:41:08 -07:00
Frank Praznik
c067cb4e7d
wayland: Fix global mouse position retrieval
...
(cherry picked from commit 8cb303126f )
2025-03-24 19:06:35 -04: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
Cameron Gutman
f03572335a
keyboard: Don't check text input on a null window
...
(cherry picked from commit c3a3a11db4 )
2025-03-23 23:53:19 -05:00
Frank Praznik
d8837edfa2
wayland: Scale accelerated relative pointer coordinates with emulated resolutions
...
The accelerated relative coordinates are always relative to the desktop resolution, and need to be scaled with emulated fullscreen resolutions for mouse movement to remain stable. Otherwise, pointer speeds will be too fast on emulated resolutions below the desktop resolution, and too slow on those above.
(cherry picked from commit 027df89ed3 )
2025-03-22 14:36:05 -04:00
expikr
e5f8043037
chore: rename integer mode field names
...
(cherry picked from commit f52f982b1e )
2025-03-22 09:37:33 -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
Marcin Serwin
072e760197
audio: hold floating point exceptions when using neon
...
(cherry picked from commit 4fcef9074b )
2025-03-21 15:09:24 -07:00
Frank Praznik
d37a3e2a71
x11: Fix backwards _NET_WM_SYNC_REQUEST init check
...
(cherry picked from commit b493e29a81 )
2025-03-21 15:34:26 -04: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
Frank Praznik
eb9faad124
cocoa: Fix zoom check when leaving fullscreen
...
Non-resizable windows will always report as zoomed, so isZoomed is not a reliable check here.
(cherry picked from commit 79081a178f )
2025-03-21 14:44:53 -04:00
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
Max
ed893bde04
Updates SDL_SetEventFilter code snippet to SDL3
...
SDL_EventFilter points to a function that now returns a bool
(cherry picked from commit 817260c73d )
2025-03-20 16:50:53 -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
SDL Wiki Bot
d39d951f89
Sync SDL3 wiki -> header
...
[ci skip]
(cherry picked from commit 67b4c3a156 )
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
Ryan C. Gordon
c2c848a752
SDL_audio.h: Fixed typos in docs.
...
(cherry picked from commit 85435d5a14 )
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
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
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
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
Frank Praznik
1d6bb62870
Use _this pointer to reference the video device
...
(cherry picked from commit 3b9f0dff10 )
2025-03-03 19:01:40 -05:00
Frank Praznik
0c3603d893
Check the display device before dereferencing
...
It can be null if the desktop mode is set early during initial display enumeration.
(cherry picked from commit 0ccf272eea )
2025-03-03 11:25:25 -05:00
Frank Praznik
38a5bca892
video: Handle Cocoa desktop mode switch inhibition in the video layer
...
The X backend had the same issue, so both Cocoa and X can be handled in the same location.
(cherry picked from commit 6c347cbf33 )
2025-03-03 11:05:32 -05: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
Simon McVittie
1d0ecf982f
pipewire: Don't require pw_check_library_version() with Pipewire < 0.3.75
...
The Debian 12 'bookworm' stable release only has 0.3.65, which is earlier
than the introduction of that symbol. Similarly, Steam Runtime 3 'sniper'
and Steam Runtime 2 'soldier' have a backport of 0.3.65 from Debian 12,
so they have the same limitation.
steamrt/tasks#686
Signed-off-by: Simon McVittie <smcv@collabora.com >
(cherry picked from commit d57aa6f7af )
2025-03-03 07:32:51 -08: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
Frank Praznik
6a9e970880
cocoa: Don't overwrite the desktop mode when changing the fullscreen mode
...
Changing the mode triggers a display reconfiguration event, which will overwrite the desktop mode with the set fullscreen mode, preventing proper restoration when leaving fullscreen. Don't overwrite the desktop mode if the reconfiguration is due to a fullscreen mode switch.
(cherry picked from commit b69201daeb )
2025-03-01 23:43:29 -05:00
Frank Praznik
4e3058ce82
cocoa: Run pending events to completion
...
Fullscreen spaces and miniaturization will always give us some notification that they succeeded or failed, so the timeout isn't required. This prevents errant timeouts when live-resize is active.
(cherry picked from commit 078d737a27 )
2025-03-01 19:34:00 -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
Ryan C. Gordon
a88105784f
camera: Delete some failure code that should have been removed before.
2025-03-01 14:52:56 -05:00
Brick
f868408a3a
Ceil the audio resampling rate to avoid over-estimating output samples.
...
Reverts 580a496391 , fixes #12115
2025-03-01 11:07:55 -08:00
Anonymous Maarten
cbdc93b17f
cmake: make sure a SDL3 library is present when not using COMPONENTs
2025-03-01 17:54:45 +01:00
Anonymous Maarten
8a7beca122
camera: clear the spec when closing, so re-opening can probe again
2025-03-01 08:34:01 -08:00
SDL Wiki Bot
ee5f5c9172
Sync SDL3 wiki -> header
...
[ci skip]
2025-03-01 16:26:19 +00:00
Sam Lantinga
6e4193b743
Note that the file names are UTF-8 encoded
2025-03-01 08:25:31 -08:00
Ozkan Sezer
60c65f9fa4
SDL_camera.c: fix failure-return in SDL_PrepareCameraSurfaces().
2025-03-01 04:37:02 +03: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
SDL Wiki Bot
7ab1412e20
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-28 21:21:47 +00:00
Ryan C. Gordon
725af6ad16
camera: Fixed surface formats, etc, for Emscripten backend.
...
Fixes #12374 .
2025-02-28 16:15:01 -05:00
Sam Lantinga
ef23ebfb5a
Fixed the cursor clip rect when toggling window borders on macOS
2025-02-28 11:57:34 -08:00
guitarfreak
c682599448
GPU_d3d12: Switched the default swapchain scaling mode to none.
...
Since there is no option to change it this seems like a much better default value. The stretching behaviour is really off-putting.
The new behavior shows a small black border when resizing the windows. This makes it more in line with the other backends and it's what you would expect to happen as a user.
2025-02-28 11:33:51 -08:00
guitarfreak
ea513fd47c
Fixed vulkan gpu backend android orientation behaviour to just work like on iOS.
...
I changed it so that the OS does the orientation change itself with a potential performance penalty.
This makes it automatically do the right thing, just like on iOS which would make the orientation change behaviour more consistent across different platforms.
But without adding an option to the user, this would disallow the user solving the problem in his in the app/shaders and saving some performance.
It's up to you to decide what to do. But I changed this in my local copy of the source for my use case.
But this also
2025-02-28 07:34:16 -08:00
Elbagast
87b1c9736f
Fix pen generated mouse events not having SDL_PEN_MOUSEID ( #12392 )
...
* Update SDL_mouse.c
Stop a mouseID of SDL_PEN_MOUSEID being discarded when dispatching mouse events. I'm not sure if this enough to fix the lack of SDL_PEN_MOUSEID being emitted.
* Update SDL_mouse.c
Since we test for touch input here we also test for pen input in the same way.
* Stop duplicate synthetic touch events
If SDL_HINT_PEN_MOUSE_EVENTS and SDL_HINT_MOUSE_TOUCH_EVENTS are both enabled, the pen generated synthetic mouse event will then produce a touch event without this additional check.
This requires the previous commits in order to do anything since it needs to be able to identify those pen generated mouse events.
2025-02-27 20:45:27 -05:00
Wim Taymans
a44107540d
sysjoystick: don't leak fd on error
2025-02-27 19:49:46 -05:00
Wim Taymans
9a802797d2
SDL_pen: fix eraser check
...
It looks like a copy and paste error.
2025-02-27 19:49:46 -05:00
SDL Wiki Bot
54c7aa9c90
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-28 00:42:06 +00:00
Ryan C. Gordon
35e8cf8ee6
render: allow render targets to use logical presentation.
...
Fixes https://github.com/libsdl-org/sdl2-compat/issues/279
2025-02-27 19:41:11 -05:00
Sam Lantinga
281f0fae1c
Include the VID/PID of generic keyboard/mouse devices on Windows
2025-02-27 14:03:39 -08:00
Frank Praznik
d09bf56818
clipboard: Cleanup coding style
2025-02-27 12:35:37 -05:00
Frank Praznik
edaf447678
tests: Add showing/setting the primary selection text to testclipboard
2025-02-27 12:35:37 -05:00
Frank Praznik
7b9036bea6
wayland: Don't overwrite clipboard data with the primary selection text
...
Primary selection text is handled separately, and shouldn't clobber the clipboard data.
2025-02-27 12:35:37 -05:00
Ryan C. Gordon
f7cadcba84
examples: Use SDL_GetAudioStreamQueued, not SDL_GetAudioStreamAvailable.
...
The "available" side is at the mercy of whatever format the hardware wants,
but we control what we queued.
Fixes #12403 .
2025-02-27 11:46:56 -05:00
Alexander Batalov
b3336c5a73
Match style
2025-02-27 07:10:09 -08:00
Alexander Batalov
2b784b5bf6
Fix SDL_GlobDirectory
2025-02-27 07:10:09 -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
SDL Wiki Bot
56e2955b6a
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-26 21:03:33 +00: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
Frank Praznik
fab52b578f
wayland: Ensure that color descriptions are always retrieved
2025-02-26 15:15:44 -05:00
jsoulier
9464aaa8af
Change D3D12 GPU backend to respect has_depth_stencil_target
2025-02-26 10:16:50 -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
hwsmm and Frank Praznik
f0f593f04b
Embed a description about Wayland clipboard instead of a link
...
Co-authored-by: Frank Praznik <frank.praznik@gmail.com >
2025-02-25 14:33:33 -05:00
hwsmm
bb748ef2d9
Don't cleanup clipboard in SDL_SendClipboardUpdate on Wayland
2025-02-25 14:33:33 -05:00
SDL Wiki Bot
38a73a1783
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-25 18:29:56 +00: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
cosmonaut
2f77558bad
fix comment
2025-02-25 09:44:10 -08:00
cosmonaut
44f1ec35c4
GPU: Make Vulkan transfer buffers dedicated allocs
2025-02-25 09:44:10 -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
SDL Wiki Bot
ffdca343fb
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-25 16:58:12 +00: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
SDL Wiki Bot
fc365e945a
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-25 16:39:56 +00: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
SDL Wiki Bot
bb8dcf08e7
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-25 15:54:44 +00:00
Sam Lantinga
6980325310
Added support for the "%n" sscanf format specifier
2025-02-24 20:02:59 -08:00
Sam Lantinga
e6a24fcbb5
fix stbi__parse_png_file() reading too much bytes (thanks @miniupnp!)
...
just "rewind" the bytes that have been read past the IEND chunk.
2025-02-24 17:29:25 -08:00
Sam Lantinga
db4e6c1931
Cocoa metal layers need their size updated before renderer updates
...
Also refactored event watch code so it can be shared between internal window event dispatch and public event watchers.
Fixes https://github.com/libsdl-org/SDL/issues/12376
2025-02-24 15:37:13 -08:00
SDL Wiki Bot
0a592b78c1
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-24 23:12:58 +00:00
Tomasz Pakuła
58388e8db4
Add SDL_HINT_JOYSTICK_HAPTIC_AXES
...
Allows users to overwrite the number of haptic axes defined for a given
joystick. Also supports a "wildcard" VID:PID of `0xFFFF/0xFFFF`
2025-02-24 15:12:04 -08:00
Ethan Lee
db817a37f4
gpu: Fix forward declaration and inclusion of PrivateGPUDriver
2025-02-24 15:46:39 -05:00
zopsicle
a7bc6c5e08
gpu: initialize VkDebugUtilsLabelEXT::color
...
Fixes #12383 .
2025-02-24 11:51:13 -08:00
Caleb Cornett
60b7faa987
gpu: Validate that reserved struct members are unset
2025-02-24 08:57:09 -08:00
Ralph Sennhauser
2990d142c4
Map additonal Linux keycodes to SDL scancodes
...
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com >
2025-02-24 07:53:22 -08:00
Ralph Sennhauser
a0086a5cc4
Add missing scancode names
...
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com >
2025-02-24 07:53:22 -08:00
Petter Reinholdtsen
35544df838
Changed PULSEAUDIO_FlushRecording() to only flush audio present when called.
...
When the flushing is not able to keep up with the audio stream coming in, it
will end up flushing forever and block API clients from getting any audio.
The example program in #9706 get some audio with SDL 3, while do not get any
audio with SDL 2, which I suspect is because SDL 3 is quicker at flushing the audio.
A fix for the SDL 2 issue is available in #12378 .
2025-02-24 07:30:36 -08:00
SDL Wiki Bot
deadfe0c98
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-23 20:20:09 +00:00
Caleb Cornett
0815637cf0
vulkan build fix
2025-02-23 12:19:12 -08:00
Caleb Cornett
ea77472d75
Document/ignore GPU features without universal support
2025-02-23 12:19:12 -08:00
Petar Popovic
ad11c6988c
src/io/SDL_asyncio.c:SDL_AsyncIOFromFile(): Fix null-dereference warning
2025-02-23 11:12:24 -08:00
Weng Xuetian
8bfde6755e
Remove unnecessary fcitx's devel package dependency in linux doc
...
Fcitx related support only relies on libdbus.
2025-02-23 10:33:18 -08:00
Frank Praznik
52af81ea17
wayland: Fix mapping borderless windows under libdecor
...
Additionally, add a warning about calling the frame visibility function universally during the mapping process, as the libdecor Cairo plugin has a bug that will cause a crash in this scenario.
2025-02-23 11:04:29 -05:00
Frank Praznik
1a0a94b501
x11: Accommodate the borders when setting the initial window position
2025-02-23 10:49:40 -05:00
Sam Lantinga
52e64f816c
Use SDL C runtime functions in OpenVR driver
...
Fixes link errors when building with -DSDL_LIBC=OFF
2025-02-22 12:41:03 -08:00
Sam Lantinga
7224b40407
Fix errors when building stb_image with -DSDL_LIBC=OFF
...
I integrated changes from SDL_image and updated as needed for JPEG memory loading functionality.
Fixes https://github.com/libsdl-org/SDL/issues/12364
2025-02-22 12:41:03 -08:00
Cameron Gutman
945da099ae
pipewire: Fix possible deadlock when opening a device
...
If the pipewire thread invokes output_callback() while we're still
waiting inside PIPEWIRE_OpenDevice(), we will deadlock. The pipewire
thread owns the loop lock and is blocked on the audio device lock,
which cannot be released because pw_thread_loop_wait() needs to
reacquire the loop lock before it can return and allow
PIPEWIRE_OpenDevice() to complete and release the device lock.
2025-02-22 11:37:06 -08:00
Anonymous Maarten
70f657e520
ci: farewell, clang32 on msys2
2025-02-22 19:06:27 +01:00
Sam Lantinga
e50db698e2
Disable all camera drivers if SDL_CAMERA_DISABLED is defined
...
Fixes https://github.com/libsdl-org/SDL/issues/12182
2025-02-22 09:48:49 -08:00
Sam Lantinga
1ddba3ad55
Replace "8BitDo Tech Ltd" with "8BitDo" in the manufacturer string
...
Fixes the 8BitDo Micro gamepad so it shows up as "8BitDo Bluetooth Wireless Controller" in keyboard mode over Bluetooth.
2025-02-22 09:19:59 -08:00
Sam Lantinga
fdf72d1e45
Use the keyboard/mouse vendor if available
...
Fixes the 8BitDo Micro gamepad so it shows up as "8BitDo HID-compliant mouse" and "8BitDo HID Keyboard Device" in keyboard mode over USB.
2025-02-22 09:19:59 -08:00
Sam Lantinga
a811e0ef0f
Added support for the 8BitDo Micro gamepad
2025-02-22 09:19:59 -08:00
Sam Lantinga
bc85c55350
testcontroller: create window with high pixel density
...
This improves the picture quality when running on an iPhone.
2025-02-22 09:02:01 -08:00
Sam Lantinga
75bbcbf87b
Added support for Motion JPEG pipewire camera capture
2025-02-22 00:23:03 -08:00
Anonymous Maarten
5c214e5e9c
testcamera: SDL_AppQuit destroys state and SDL
...
This fixes a double-free of SDLTest_CommonState
2025-02-21 23:04:13 -08:00
Anonymous Maarten
03e00cd347
v4l2: map SDL_PIXELFORMAT_MJPG to V4L2_PIX_FMT_MJPEG
2025-02-21 23:04:13 -08:00
Sam Lantinga
fcd41c1d2c
Check desired window area when checking zoom state
...
isZoomed returns true if the window has the size and position that it would if it were maximized, so we need to check to see if our floating state matches that before saying we're zoomed.
This fixes calling zoom:nil on a borderless resizable window that was created with the same size as the usable desktop area, which happens to also be the maximized state.
Fixes https://github.com/libsdl-org/SDL/issues/12228
2025-02-21 18:38:12 -08:00
Petar Popovic
b5297de56f
Add 'const' to pointer parameters
2025-02-21 15:59:40 -08:00
Sam Lantinga
911e53dece
Retain mouse focus as long as we're getting mouse events
...
Fixes https://github.com/libsdl-org/SDL/issues/12218
Fixes https://github.com/libsdl-org/SDL/issues/12323
2025-02-21 15:35:28 -08:00
Sam Lantinga
3b8cb62283
Make it easier to enable IME debug logs
2025-02-21 15:24:45 -08:00
williamhCode
9a607e886e
make start&length represent utf32 indices
2025-02-21 12:54:56 -08:00
Anonymous Maarten
9d06145d6c
ci: fix type + names of intel compiler artifacts
2025-02-21 21:11:54 +01:00
Timothee "TTimo" Besset and Sam Lantinga
fa380a4004
Update include/SDL3/SDL_assert.h
...
Co-authored-by: Sam Lantinga <slouken@libsdl.org >
2025-02-21 11:07:54 -08:00
Timothee "TTimo" Besset and Sam Lantinga
2a1b617fb2
Update include/SDL3/SDL_assert.h
...
Co-authored-by: Sam Lantinga <slouken@libsdl.org >
2025-02-21 11:07:54 -08:00
Timothee 'TTimo' Besset
69e03094bd
fallback to defining SDL_TriggerBreakpoint as __builtin_trap in older linux arm64 environments that do not have a __has_builtin facility
2025-02-21 11:07:54 -08:00
Petar Popovic
c70f54e28b
Remove redundant casts
2025-02-21 10:09:10 -08:00
Sam Lantinga
2e346d7166
Added 32-bit texture formats to Texture_GetBlockWidth() and Texture_GetBlockHeight()
...
Fixes https://github.com/libsdl-org/SDL/issues/12335
2025-02-21 09:29:18 -08:00
Sam Lantinga
5d776c070a
Refactored SDL_CreateJoystickName() into a general SDL_CreateDeviceName()
2025-02-21 09:10:54 -08:00
expikr
3293eb1a16
use hidapi to get mouse/keyboard string
2025-02-21 07:42:20 -08:00
Anonymous Maarten
7855842306
ci: disable precompiled headers for classic intel compiler
2025-02-21 04:49:33 +01:00
Anonymous Maarten
71d1de5d96
ci: add cppflags to CMAKE_(C|CXX)_FLAGS
2025-02-21 04:46:26 +01:00
Anonymous Maarten
28f0867948
SPA_FALLTHROUGH expands to nothing when using the Intel compiler
2025-02-21 04:30:19 +01:00
Anonymous Maarten
8d3db06ff2
ci: GitHub is retiring Ubuntu 20.04 support
2025-02-21 04:30:19 +01:00
Anonymous Maarten
c153f83df0
ci: enable ccache
2025-02-21 04:30:19 +01:00
SDL Wiki Bot
52ee0c1058
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-20 20:17:22 +00:00
Sam Lantinga
9267930fea
Added a fast path for converting the same format and pitch
2025-02-20 12:16:26 -08:00
Sam Lantinga
f24f9d3bed
Revert "testcamera: added support for Motion JPEG camera frames"
...
This reverts commit 5ccee77190 .
2025-02-20 12:16:26 -08:00
Sam Lantinga
2e89c53ebc
Added support for decoding MJPG into NV12 textures
2025-02-20 12:16:26 -08:00
Sam Lantinga
06602f4e80
Document that the pitch is the length of the image data for SDL_PIXELFORMAT_MJPG
2025-02-20 12:16:26 -08:00
Sam Lantinga
a792434a37
Added initial MJPG support using stb_image
2025-02-20 12:16:26 -08:00
Anonymous Maarten
baf69edfc7
Revert "cmake: build SDL_uclibc with -fPIC"
...
This reverts commit 9784414ddd .
Some platforms (e.g. ps2) do not support pic.
2025-02-20 20:37:53 +01:00
Anonymous Maarten
fdf8e5a704
ci: build static loongarch libraries with -fPIC
2025-02-20 20:28:57 +01:00
Anonymous Maarten
9784414ddd
cmake: build SDL_uclibc with -fPIC
2025-02-20 20:28:54 +01:00
Frank Praznik
b48de48efb
wayland: Add support for high-DPI icons
2025-02-20 13:57:37 -05:00
Frank Praznik
6e0264d38e
x11: Use the current or last-requested window position when setting the size hint
...
The move operation is just a no-op to try and force the hint to take effect, so it should use the current window coordinates.
2025-02-20 13:25:47 -05:00
Sam Lantinga
1a38960eee
Call SDL_DiscardAllCommands() for the software renderer as well
2025-02-20 09:53:11 -08:00
Sam Lantinga
8f4c5e15f1
Finish any drawing when destroying a software renderer
...
Fixes the SDL3 version of https://github.com/libsdl-org/sdl2-compat/issues/373
2025-02-20 08:49:47 -08:00
Paper
1a853973ab
thread/windows: fix stack overflow in exception naming
2025-02-20 07:57:00 -08:00
Sam Clegg
a40b2de946
Fix SDL_emscriptenaudio.c under wasm64
...
Same as #12332 which already landed on SDL2 branch.
2025-02-19 13:00:47 -08:00
Anonymous Maarten
523e6530a8
SDL_test: fix "'function': different 'const' qualifiers" warning in SDL_test_harness
2025-02-19 19:06:48 +01:00
Frank Praznik
9e4c657ed8
wayland: Fix color manager protocol string check
2025-02-19 11:43:53 -05:00
nightmareci
7500a758b8
Remove usages of restrict keyword in SDL_render.c
...
I ran into the usage of `restrict` breaking builds targeting Windows XP, as the v141 MSVC toolset doesn't support the keyword.
2025-02-18 11:40:43 -08:00
Frank Praznik
a7f01cd73c
x11: Set the pending window position immediately after mapping
...
Waiting until the first configure event to perform the move can result in the window visibly jumping in position.
2025-02-18 11:27:03 -05:00
Mike Kosek
1fd626939f
Renamed DreamPort to DreamPicoPort
2025-02-18 11:06:28 -05:00
ImThour
31f9cb4806
Unchecked Return Value in WIN_SuspendScreenSaver ( #12316 )
2025-02-17 15:36:56 -08:00
ImThour
057c3602e9
Removing Double-free Issue
2025-02-17 15:34:18 -08:00
ImThour
5c79f4cae1
Incorrect bfOffBits Calculation in WIN_ConvertDIBtoBMP
2025-02-17 13:59:03 -08:00
Cameron Gutman
70d23b2349
README-migration: Remove errant reference to SDL_FALSE_
2025-02-17 15:16:35 -06:00
Petar Popovic
6aef6ae9a8
AddPulseAudioDevice(): Fix use-after-free
2025-02-17 11:12:44 -08:00
Frank Praznik
3b4cfc11f0
wayland: Update copyright dates in added color manager source files
2025-02-17 11:36:00 -05:00
Frank Praznik
fadb261b66
wayland: Add color manager protocol support
...
Support the official wp_color_manager_v1 protocol.
2025-02-17 11:31:12 -05:00
Sam Lantinga
6ef687c864
Simplified and fixed media foundation buffer handling
2025-02-17 08:14:30 -08:00
Sam Lantinga
de12cb92dc
Fixed crash at shutdown with new hashtable code
2025-02-17 08:14:30 -08:00
ImThour
a513168902
Fixed Memory/Resource Leaks ( #12304 )
2025-02-17 07:30:30 -08:00
Petar Popovic
045a4492f1
test/testaudio.c: Fix use-after-free warning
2025-02-16 19:35:54 -08:00
Petar Popovic
da2460f9e7
test/testautomation_audio.c: Free variables before returning
2025-02-16 16:57:56 -08:00
captain0xff
7ea0ffb748
update
2025-02-16 13:44:00 -08:00
captain0xff
06eb10c518
haiku: check if the returned _SDL_GLView is null or not
2025-02-16 13:44:00 -08:00
SDL Wiki Bot
dea99e54fd
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-16 17:44:58 +00:00
Sam Lantinga
1754943596
Fixed camera frame acquisition on Windows 7
...
Fixes https://github.com/libsdl-org/SDL/issues/12210
2025-02-16 08:13:35 -08:00
Sam Lantinga
e3d9f1172c
Remove the reference to the thread when it is detached
...
Fixes https://github.com/libsdl-org/SDL/issues/12301
2025-02-16 07:56:30 -08:00
Petar Popovic
831fc70923
test/testautomation_intrinsics.c: Free variables before returning
2025-02-16 07:50:07 -08:00
Petar Popovic
c6a3b5b6ef
src/test/SDL_test_harness.c: Free variables before returning
2025-02-15 21:00:04 -08:00
Ryan C. Gordon
84a236c92e
hashtable: Redesign the hashtable API.
...
This was intended to make the API public, so SDL_hashtable.h got an extreme
documentation makeover, but for now this remains a private header.
This makes several significant interface changes to SDL_HashTable, and
improves code that makes use of it in various ways.
- The ability to make "stackable" tables is removed. Apparently this still
worked with the current implementation, but I could see a future
implementation struggle mightily to support this. It'll be better for
something external to build on top of the table if it needs it, inserting a
linked list of stacked items as the hash values and managing them separately.
There was only one place in SDL using this, unnecessarily, and that has also
been cleaned up to not need it.
- You no longer specify "buckets" when creating a table, but rather an
estimated number of items the table is meant to hold. The bucket count was
crucial to our classic hashtable implementation, but meant less once we
moved to an Open Addressing implementation anyhow, since the bucket count
isn't static (and they aren't really "buckets" anymore either). Now you
can just report how many items you think the hash will hold and SDL will
allocate a reasonable default for you...or 0 to not guess, and SDL will
start small and grow as necessary, which is often the correct thing to do.
- There's no more SDL_IterateHashTableKey because there's no more "stackable"
hash tables.
- SDL_IterateHashTable() now uses a callback, which matches other parts of SDL,
and also lets us hold the read-lock for the entire iteration and get rid of
the goofy iterator state variable.
- SDL_InsertIntoHashTable() now lets you specify whether to replace existing
keys or fail if the key already exists.
- Callbacks now use SDL conventions (userdata as the first param).
- Other naming convention fixes.
I discovered we use a lot of hash tables in SDL3 internally. :) So the bulk
of this work is fixing up that code to use the new interfaces, and simplifying
things (like checking for an item to remove it if it already exists before
inserting a replacement...just do the insert atomically, it'll do all that
for you!).
2025-02-15 18:52:56 -05:00
Cameron Gutman
4a9b579195
joystick: remove dead udev code
...
SDL_USE_LIBUDEV is never even defined here and SDL_hid_init() already does this.
2025-02-15 14:17:13 -06:00
SDL Wiki Bot
ba45256940
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-15 17:42:27 +00:00
Sam Lantinga
fd4e6d2949
Don't render 0 sized texture rectangles
...
Fixes https://github.com/libsdl-org/sdl2-compat/issues/355
2025-02-15 07:07:56 -08:00
Frank Praznik
6f3b14a6df
audio/video: Fix uninitialized field warnings
2025-02-14 17:16:10 -05:00
Sam Lantinga
5b98c4a524
Fixed motion events with TOOL_TYPE_UNKNOWN
...
This happens using hand tracking on a VR headset, and should be treated like normal touch interaction.
2025-02-14 11:50:43 -08:00
Chen Steenvoorden
8a648dfd9b
emscripten: Fixed unregistering of key event handlers
2025-02-14 10:15:15 -08:00
Petar Popovic
c16b7bcb7a
SDL_Get*Driver() functions: Set error message on failure
2025-02-13 16:10:37 -08:00
ImThour
ed0a03e9b5
Fixed Cursor Icon State for SYSTEM_CURSOR_PROGRESS
2025-02-13 11:38:41 -08:00
Petar Popovic
5dce8c748f
SDL_GetRelativeMouseState(): Get relative mouse position also when relative mouse mode is disabled
2025-02-13 11:34:24 -08:00
SDL Wiki Bot
cedf53bbc2
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-13 05:39:38 +00:00
Sam Lantinga
3de975884a
Document the "trace" log priority
2025-02-12 21:37:30 -08:00
Sam Lantinga
b9d018f2a2
Fixed wayland cursor use-after-free at shutdown
2025-02-12 20:47:31 -08:00
SDL Wiki Bot
041894a523
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-13 01:45:34 +00:00
Semphris
3be67ced64
Fix GTK tray icon without menu + lifetime
2025-02-12 16:18:31 -08:00
Ryan C. Gordon
1354affd28
haiku: Fixed keyboard input.
...
_GetWinID() doesn't work with keyboard-related BMessages, because Haiku
assumes you know what window has keyboard focus at the time, so these events
don't have a `window-id` property. So when this call failed, the key event
handler would return early.
This was probably a copy/paste error that snuck in at some point, as SDL2
doesn't have this issue.
2025-02-12 17:17:14 -05:00
Sam Lantinga
d2b7a84651
Fixed SDL_GetNumGamepadTouchpads() returning 1 for a NULL gamepad
2025-02-12 13:08:41 -08:00
Sam Lantinga
ca29304ce1
Fixed continually resetting keyboard and mouse readings
2025-02-12 13:02:15 -08:00
Sam Lantinga
f67c644649
Fixed reporting hat positions for GameInput controllers
2025-02-12 13:02:15 -08:00
Sam Lantinga
1b35ca9c32
Refactored GameInput initialization
2025-02-12 13:02:15 -08:00
Frank Praznik
706de78a9e
audio/video: Skip preferred drivers when loading a driver on demand
...
Preferred driver entries have special conditions for initializing, which aren't relevant when a specific driver was explicitly requested.
2025-02-12 11:51:36 -05:00
Sam Lantinga
715c18739b
Added an internal hint "SDL_VIDEO_X11_XINPUT2" for sdl2-compat
2025-02-11 15:11:33 -08:00
Sam Lantinga
ce69e98989
Copy SDL2_SYSWMEVENT data into temporary memory for the event
2025-02-11 15:11:33 -08:00
coffeechriph
55fd205ba4
Add missing integer texture formats to SDL_GPUTextureFormatTexelBlockSize ( #12151 )
2025-02-11 14:21:30 -08:00
Semphris
e6029401d9
Check for non-NULL icon for trays on Unix
2025-02-11 13:47:17 -08:00
captain0xff
b03332b68d
updated bytepusher demo to be C++ compatible
2025-02-11 13:38:29 -08:00
captain0xff
5dd2492645
updated the snake demo to be C++ compatible
2025-02-11 13:38:29 -08:00
Frank Praznik
78f816d74e
x11: Apply the modifier state from key events
...
Use the modifier state supplied with key events to track the system modifier state instead of relying on the state returned by XQueryPointer(), which can be racy when used with automated text entry.
2025-02-11 14:14:12 -05:00
Sam Lantinga
99cf16287a
Fixed the name of SDL_SYSWMEVENT
2025-02-11 09:48:40 -08:00
Sam Lantinga
6c37971521
Removed the mapping for the Sanwa Supply JY-P76USV
...
It turns out the mapping we include doesn't work for real controllers, and they're using a generic chipset and generic name and can't be generally distinguished from other controllers.
See https://github.com/libsdl-org/SDL/issues/8644 for details.
2025-02-11 07:59:25 -08:00
Edu Garcia
9b18e8438f
[GPU] D3D12 backend debug markers were being cut
...
Code used wcslen that return number of characters, but D3D12 debug layer uses bytes + wide chars
2025-02-11 07:21:44 -08:00
Sam Lantinga
0bce19cf15
The 10-bit texture formats have alpha on Direct3D
...
A similar change was made for Vulkan in https://github.com/libsdl-org/SDL/commit/a036aeda3b27ce7e115ebf25e717adf0bdabe91e
2025-02-10 19:45:02 -08:00
Sam Lantinga
3cfa476d3f
Added support for SDL_PIXELFORMAT_ABGR8888 textures
...
This is the output format of stb_image for image decoding, so let's avoid a texture format conversion where possible.
Also standardized SDL_PIXELFORMAT_ARGB8888 as the default texture format for all renderers.
2025-02-10 19:45:02 -08:00
Sam Lantinga
5ccee77190
testcamera: added support for Motion JPEG camera frames
2025-02-10 17:18:16 -08:00
Sam Lantinga
cf41ccc6ce
Removed stb_image.h from SDL
...
This adds quite a bit of code size to SDL for a niche use-case. This is easily handled in the application instead.
2025-02-10 17:18:16 -08:00
Sam Lantinga
9308404e9a
Removed functions not used by SDL
2025-02-10 17:18:16 -08:00
Sam Lantinga
5e31bbf05e
Remove functions not used when STBI_NO_PNG and STBI_NO_HDR are defined
2025-02-10 17:18:16 -08:00
Sam Lantinga
84b0c13c44
Added support for Motion JPEG camera capture
...
Fixes https://github.com/libsdl-org/SDL/issues/12183
2025-02-10 17:18:16 -08:00
Frank Praznik
3bc53b9ade
wayland: Don't set libdecor frame visibility before the first commit
...
This will be needed later, after libdecor passes through toplevel bounds, but for now it causes a crash in the Cairo plugin, so remove it.
2025-02-10 18:39:36 -05:00
Frank Praznik
c032586262
wayland: Scale-to-display mode requires both viewports and xdg-output for proper functionality
2025-02-10 15:47:28 -05:00
SDL Wiki Bot
b63d3afc18
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-10 20:15:51 +00:00
Sam Lantinga
0bc1f87120
Added SDL_PROP_SURFACE_HOTSPOT_X_NUMBER and SDL_PROP_SURFACE_HOTSPOT_Y_NUMBER
2025-02-10 12:15:03 -08:00
Frank Praznik
da464e9e5f
win32: Keep the window on the last maximized display when leaving fullscreen
...
A window may have been maximized by dragging it to the top of another display, in which case the floating position may be out-of-date. If the window is being restored to maximized, and the maximized and floating position are on different displays, try to center the window on the maximized display for restoration, which mimics native Windows behavior.
2025-02-10 15:05:54 -05:00
Mike Kosek
bf01cc8ce7
Renamed "Dreamcast Controller Usb" to "DreamPort"
2025-02-10 10:33:47 -08:00
Sam Lantinga
ecd089bb69
Don't return short waits from SDL_IOReady()
...
The Wayland keyboard repeat code assumes that if we have a certain timeout then we'll wait at least that long, and generate a key repeat event on timeout. If we wait a shorter time, we won't generate a key repeat event and then return 0, even if we were supposed to wait indefinitely.
Fixes https://github.com/libsdl-org/SDL/issues/12239
2025-02-10 10:29:30 -08:00
danginsburg
4fd0b2a85c
Fix #12142 - the problem was if the size of the vertex buffer was exceeded, the currentVertexBuffer would be reset to zero and thus we'd leave it pointing to an in-use VB that would get overwritten on the next present before the vkQueueSubmit occurred.
2025-02-10 08:47:57 -08:00
Sam Lantinga
f6126e9ea1
Centered joystick axis values should be 0
...
Fixes https://github.com/libsdl-org/sdl2-compat/issues/338
2025-02-10 08:36:00 -08:00
Neal Gompa
d35bef64e9
pipewire: Ensure that the correct struct is used for enumeration APIs
...
PipeWire now requires the correct struct type is used, otherwise
it will fail to compile.
Reference: https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/188d920733f0791413d3386e5536ee7377f71b2f
Fixes: https://github.com/libsdl-org/SDL/issues/12224
2025-02-10 11:03:01 -05:00
rubisetcie
9bd6d36471
Added SDL_DEPS_SHARED option to control default dynamic loading of shared libraries ( #12215 )
2025-02-10 07:40:24 -08:00
Stenzek
78721d720c
joystick: Fix PS5 player LED hint change callback name
...
The LED hint was getting registered for SDL_HINT_JOYSTICK_ENHANCED_REPORTS
instead of SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED, which results in a
use-after-free followed by a crash.
2025-02-10 07:36:07 -08:00
ImThour
7aba6c4c73
Proper Resource Cleanup in WIN_UpdateWindowShape
...
mask is created but never deleted if SetWindowRgn() fails. This may lead to resource leaks.
2025-02-09 16:11:53 -08:00
Christian Walter
e29ebb9f18
Update geometry renderer example
...
This PR updates the geometry renderer example such that the `color` values of `vertices[3]` are set correctly in `SDL_AppIterate`.
2025-02-09 10:53:14 -08:00
ImThour
ca9a044b3e
Memory Leak in WIN_CreateHCursor When CreateColorBitmap Fails
2025-02-09 10:49:56 -08:00
Clint Kilmer
69d28027ad
Fix for 500ms hang after user clicks on the title bar, but before moving ( #12217 )
...
Reference: https://gamedev.net/forums/topic/672094-keeping-things-moving-during-win32-moveresize-events/5254386/
2025-02-08 11:21:10 -08:00
Guldoman
a0b6c0fd8f
x11: Don't wait for events when the connection errored out ( #8392 )
...
Calling `X11_XIfEvent` after the X11 connection errored out can result in hangs.
2025-02-08 10:07:11 -08:00
Mike Kosek
864bb65ce9
Removed crc
2025-02-08 07:56:40 -08:00
Mike Kosek
006605c3bf
Corrected alphabetical order
2025-02-08 07:56:40 -08:00
Mike Kosek
dc035c5ca6
Added mapping for Dreamcast Controller USB
2025-02-08 07:56:40 -08:00
Michael Savage
5d1bbd9b27
Fix SSE 4.2 test
...
When building with zig cc I get:
```
error: always_inline function '_mm_crc32_u32' requires target feature 'crc32', but would be inlined into function 'calc_crc32c' that is compiled without support for 'crc32'
5 | crc32c = (unsigned)_mm_crc32_u32(crc32c, *(unsigned*)text);
| ^
1 error generated.
```
This PR adds -mcrc32, another option would be to use a different SSE4.2 op
2025-02-08 07:37:14 -08:00
ds-sloth
7c12c63f63
Add generic SDL_syscond to N3DS threads source list
2025-02-06 18:02:03 -08:00
ds-sloth
2ced6b09fc
Delete src/thread/n3ds/SDL_syscond.c
...
This PR removes the incorrect implementation of `SDL_cond` currently included with the 3DS port.
Pseudocode of the incorrect implementation of `SDL_CondWait` this PR removes:
* Receive an `SDL_cond` backed by a `libctru` `CondVar` and an `SDL_mutex` backed by a `libctru` `RecursiveLock`.
* Want to call `libctru` function `CondVar_Wait` which expects a `CondVar` and a `LightLock` (non-recursive lock)
* Do so by calling this function with the internal (inadequately protected) `LightLock` member of the `RecursiveLock` (`&mutex->lock.lock` on line 105), without updating any internal thread or lock count fields of the `RecursiveLock`.
Happy to discuss or test some examples. My own use case works much better with the generic cond logic, and this seems like a safe fix to me given that the generic logic is well-tested and this seems not to be.
If you like the PR I'll send another one for the SDL2 branch.
2025-02-06 18:02:03 -08:00
SDL Wiki Bot
7af17f874c
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-07 02:00:45 +00:00
Sam Lantinga
982094c85c
Updated to version 3.2.5 for development
2025-02-06 16:40:59 -08:00
Sam Lantinga
b5c3eab6b4
Updated to version 3.2.4 for release
2025-02-06 16:03:43 -08:00
Sam Lantinga
48c00bfe6c
Fixed creating a window with both software and hardware renderer attached
2025-02-06 15:35:38 -08:00
SDL Wiki Bot
3c6e6645fa
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-06 22:54:21 +00:00
Sam Lantinga
ad8429f1b0
Let the renderer always see window events
...
These are necessary for proper operation of the renderer and shouldn't be blocked by event filters, etc.
2025-02-06 14:38:20 -08:00
Sam Lantinga
c59ac249d2
Revert "wayland: Don't send size events while the window is hidden"
...
This reverts commit 0825d07a43 .
It turns out that resizing while hidden is fine, the real problem in https://github.com/libsdl-org/sdl2-compat/issues/268 is that SDL2 did not send an initial resize event and SDL3 does, which we're fixing in a better way in sdl2-compat.
2025-02-06 14:37:53 -08:00
SDL Wiki Bot
6cb3d37a2b
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-06 20:11:12 +00:00
Petar Popovic
80653a42c7
Remove non-ASCII character from public header SDL_hints.h
2025-02-06 12:10:16 -08:00
Sam Lantinga
a646dc89e5
Note that SDL_GUIDToString() and SDL_StringToGUID() are thread-safe.
2025-02-06 10:44:21 -08:00
Ryan C. Gordon
8730f6a569
dynapi: Don't use SDL_getenv; it might malloc before the app sets an allocator.
...
Use platform-specific code instead, so SDL's allocator never comes into play.
(cherry picked from commit d2693d4c7d )
2025-02-06 12:46:15 -05:00
Quan Zhuo
c9341489cc
Fix #12197 : Force set /utf-8 for msvc compilers ( #12198 )
...
The MSVC compiler determines the encoding of the source code based on
the BOM of the source code when reading it. If there is no BOM, it
defaults to the local encoding, which is gb2312, codepage 936, on
Simplified Chinese Windows. This can cause errors such as newline
characters in strings.
2025-02-06 09:34:41 -08:00
Sam Lantinga
8397e1fcc0
Fix up SDL2 style mappings for HIDAPI controllers
...
Fixes https://github.com/libsdl-org/sdl2-compat/issues/316
2025-02-06 09:21:52 -08:00
Sam Lantinga
7691cabe4a
Removed incorrect HIDAPI gamepad mapping
2025-02-06 08:37:10 -08:00
Evan Hemsley
86691d325b
GPU: Remove stencil bit from sampler aspect mask on Vulkan ( #12196 )
2025-02-05 17:52:35 -08:00
Sam Lantinga
6782cfe2c5
Don't use the HIDAPI driver for Thrustmaster wheels
...
Closes https://github.com/libsdl-org/SDL/pull/12173
2025-02-05 17:19:59 -08:00
Sam Lantinga
1c0e2b7f97
SDL_OpenHapticFromJoystick() returns a valid haptic object
2025-02-05 17:08:41 -08:00
Sam Lantinga
c4550d906a
testcontroller: show the gamepad device type
2025-02-05 08:27:26 -08:00
SDL Wiki Bot
5ad0337685
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-05 15:45:41 +00:00
Petar Popovic
68dabd48c4
SDL_GetTrayEntries(): Rename parameter size to count
2025-02-05 07:44:46 -08:00
Sam Lantinga
b99e19c0a2
Fixed potential double-free
2025-02-05 00:04:45 -08:00
Sam Lantinga
8ba8cca69b
Fixed memory leak looking up pen tool names
2025-02-04 23:59:08 -08:00
Sam Lantinga
2cd2834dfe
Fixed memory leak in the pen cleanup
...
Fixes https://github.com/libsdl-org/SDL/issues/12099
2025-02-04 23:49:12 -08:00
Cameron Gutman
c4c185283f
dbus: fix spurious leak reports with SDL_SHUTDOWN_DBUS_ON_QUIT=0
2025-02-04 17:01:06 -08:00
Cameron Cawley
691a6133d3
Remove #undef __3DS__
2025-02-04 13:57:41 -08:00
Jean-Philip Desjardins
33c0654d54
Allow OpenGL initialization on XB1 and XSX.
2025-02-04 07:35:52 -08:00
WinterSquire
eb5ab22032
Check nullptr before calling the windows message hook for WM_ENTERSIZEMOVE and WM_ENTERMENULOOP
2025-02-03 21:33:58 -08:00
Ryan C. Gordon
e7f326a84e
bmp: Removed debug printf call.
2025-02-03 23:35:08 -05:00
Ryan C. Gordon
61b1c25eeb
x11: SDL_SetWindowPosition on an unmapped window will do the actual move later.
...
Fixes https://github.com/libsdl-org/sdl2-compat/issues/303
2025-02-03 22:52:13 -05:00
Petar Popovic
f1b3523c67
Remove redundant parenthesis in SDL_MUSTLOCK macro
2025-02-03 19:47:16 -08:00
Petar Popovic
8527d042bc
Remove const from parameter of inline function SDL_RectsEqualEpsilon()
2025-02-03 19:46:36 -08:00
Sam Lantinga
07c22da464
Fixed decoding 4-bit RLE encoded BMP files
...
Also flipped the return value of readRlePixels() to match convention.
Fixes https://github.com/libsdl-org/sdl2-compat/issues/308
2025-02-03 19:34:38 -08:00
Petar Popovic
8ccf85c59e
Formatting spaces around pointer symbol.
2025-02-03 17:03:26 -08:00
Sam Lantinga
94409d3504
Added Switch Input-only controller entries for Zuiki MasCon controller for Nintendo Switch.
...
The device string indicates RED on the one I have and is PIDs 0003 and some other posts online say 0001 for the normal model, so I'll try 0001-0003 to get all 3 color variants
2025-02-03 16:49:29 -08:00
Sam Lantinga
a8a2874ef4
Added distinct VID/PIDs for the PS4 vs Xbox eSwap Pro controllers
2025-02-03 13:26:04 -08:00
Sam Lantinga
84bc2abdad
Corrected the entry for the PXN V900 racing wheel
2025-02-03 13:11:02 -08:00
Sam Lantinga
eac07bda0a
Sort the controller lists by VID/PID
2025-02-03 12:39:53 -08:00
Sam Lantinga
6243a06539
Call the windows message hook for WM_ENTERSIZEMOVE and WM_ENTERMENULOOP
...
Fixes https://github.com/libsdl-org/SDL/issues/12169
2025-02-03 09:17:17 -08:00
SDL Wiki Bot
ec959a4349
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-03 16:52:24 +00:00
Sam Lantinga
8e51b2468a
Renamed SDL_SoftStretch() to SDL_StretchSurface()
...
Fixes https://github.com/libsdl-org/SDL/issues/12168
2025-02-03 08:51:32 -08:00
SDL Wiki Bot
f40ef62a2a
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-02 23:14:17 +00:00
SDL Wiki Bot
614ae843a9
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-02 22:14:15 +00:00
Sam Lantinga
8848f86560
Corrected the version where SDL_SoftStretch() was added
2025-02-02 14:13:13 -08:00
Sam Lantinga
a98a4b8a68
Re-added SDL_SoftStretch() to the API
...
This is needed for sdl2-compat, since a blit is not quite equivalent.
2025-02-02 13:41:36 -08:00
SDL Wiki Bot
842f85da05
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-02 21:17:22 +00:00
Sam Lantinga
c06172dc1c
Track mouse button state by real mouse ID
...
We'll switch to the global mouse ID just once we are ready to deliver events.
This makes sure that any button events that come in for a specific mouse ID maintain that state if we switch to relative mode and start using that mouse ID for events.
Fixes https://github.com/libsdl-org/sdl2-compat/issues/263
2025-02-02 12:58:45 -08:00
Ozkan Sezer
73a8143581
timer, windows: allow building high resolution code with old SDKs.
2025-02-02 21:23:50 +03:00
Sam Lantinga
be991239d9
Updated to version 3.2.3 for development
2025-02-01 17:43:38 -08:00
Sam Lantinga
2fa1e7258a
Updated to version 3.2.2 for release
2025-02-01 17:01:45 -08:00
Em
c922762791
proposed fix: set curr_src.h is to bottom_height before drawing bottom edges / corners in SDL_RenderTexture9Grid, to avoid issue where inadvertently using top height if the npatch existed on a larger texture than the drawn edge would cause too many pixels to be included in the bottom part of the render.
2025-02-01 16:09:08 -08:00
Sam Lantinga
235022fe2f
Fixed error C2059: syntax error: '}'
...
Fixes https://github.com/libsdl-org/SDL/issues/12155
2025-02-01 15:32:58 -08:00
John Kvalevog
dc13a6ae95
SDL_SaveBMP_IO: Write bitmap header v5 values
...
bV4CSType was changed to LCS_sRGB to work with Preview on macOS.
Fixes : #11903
2025-02-01 11:10:24 -08:00
SDL Wiki Bot
fe6bd8e9bf
Sync SDL3 wiki -> header
...
[ci skip]
2025-02-01 10:40:21 +00:00
Sam Lantinga
bc3264130d
Fixed mouse motion events while the mouse is grabbed
...
When the mouse is grabbed, the X server sends mouse events only to the grabbing client, and XInput2 events for the master device are not delivered.
We should consider using the window mouse rect confinement instead of a true X server grab for SDL mouse grab functionality.
2025-01-31 23:45:09 -08:00
Sam Lantinga
69d361dee1
Ignore SDL_HINT_RENDER_DRIVER set to software when creating a window surface
...
We handled the case where software was in a list of render drivers, but not when the hint was set to exactly "software".
Fixes https://github.com/libsdl-org/sdl2-compat/issues/266
2025-01-31 15:49:58 -08:00
Evan Hemsley
70a239210e
GPU: Describe "readonly storage" images as sampled images on Vulkan backend ( #12149 )
2025-01-31 15:07:33 -08:00
Sam Lantinga
4c6d949e6d
wayland: make sure the desktop mode is in the fullscreen mode list
...
Fixes https://github.com/libsdl-org/SDL/issues/12079
2025-01-31 14:53:40 -08:00
Sam Lantinga
ab5cb707a6
Fixed enabling call logging
2025-01-31 14:22:29 -08:00
Sam Lantinga
16f8122a0d
Keep the simplest mapping of scancode + modifer for a given keycode
...
Fixes https://github.com/libsdl-org/sdl2-compat/issues/259
2025-01-31 12:07:08 -08:00
Timothee Besset
6beda34215
do not build camera drivers if camera support is disabled
2025-01-31 10:24:54 -08:00
Frank Praznik
0825d07a43
wayland: Don't send size events while the window is hidden
...
Some clients don't expect this, and it can cause issues, particularly if events are emitted while creating a hidden window.
2025-01-31 12:40:07 -05:00
Evan Hemsley and Caleb Cornett
8e766c9252
GPU: Resource binding state shadowing ( #12138 )
...
---------
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com >
2025-01-31 08:34:10 -08:00
SDL Wiki Bot
43924ec873
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-31 01:04:48 +00:00
SDL Wiki Bot
8c2682a219
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-31 00:56:29 +00:00
Ozkan Sezer
e4fcc7b6e7
gpu/vulkan/SDL_gpu_vulkan.c: fix type redefinition error
...
src/gpu/vulkan/SDL_gpu_vulkan.c:763: error: redefinition of typedef 'VulkanUniformBuffer'
src/gpu/vulkan/SDL_gpu_vulkan.c:482: note: previous declaration of 'VulkanUniformBuffer' was here
2025-01-31 02:50:00 +03:00
John Alanbrook
14edb21aec
check for backslashes as well as the forward slash
2025-01-30 12:41:48 -08:00
SDL Wiki Bot
50b8c6cdfb
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-30 19:31:13 +00:00
Ryan C. Gordon
943c4abcb4
pipewire: Report correct device default formats instead of hardcoding Float32.
...
The comment in the source wasn't true; PipeWire doesn't _have_ to work in
float format. It presumably does if it has to mix, but if a game is the only
thing making noise on the system--a common scenario--then it might be able to
pass, say, Sint16 data straight through to the hardware without conversion.
Fixes #12129 .
2025-01-30 02:46:56 -05:00
Aki
943579a545
Fix inverted pen Y tilt on macOS and add tilt display to example
...
- Negate tilt.y in Cocoa pen handling to correct inverted Y tilt axis
- Update drawing example to display X/Y tilt values for visualization
- see https://github.com/qt/qtbase/blob/0f128fd7c5a9ee721d1e631743f6eb61d927cf3b/src/plugins/platforms/cocoa/qnsview_tablet.mm#L63
- see https://source.chromium.org/chromium/chromium/src/+/main:components/input/web_input_event_builders_mac.mm;drc=0af5ffa1e4cc4cc4f818725f8fee93ec57855e4b;l=421
2025-01-29 22:09:02 -08:00
Petar Popovic
31364477f2
Rename parameter of type SDL_CameraID from devid to instance_id
2025-01-29 17:49:53 -08:00
Petar Popovic
36758d70c9
Rename parameters of type SDL_AudioDeviceID from dev to devid
2025-01-29 14:44:08 -08:00
Seth Anderson
2abc7735a4
Free XIDeviceInfo in X11_MaybeAddPenByDeviceID
2025-01-29 10:55:49 -08:00
Sam Lantinga
8298d60e4a
Dynamically load CreateWaitableTimerExW and SetWaitableTimerEx
...
These functions are not available on Windows XP
2025-01-29 05:40:49 -08:00
Sam Lantinga
409f3ade88
Removed SDF test program
...
There's a much better example of SDF support in testgputext in SDL_ttf
2025-01-29 04:15:27 -08:00
Sam Lantinga
4176e188bf
Enable testgles2 on all platforms
...
We use SDL's headers so we're not dependent on system OpenGL header availability.
2025-01-29 04:03:31 -08:00
Timothee Besset
cf249b0cb2
fix -Wformat problem in 32 bit builds
2025-01-28 16:57:25 -08:00
SDL Wiki Bot
11dbff246f
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-28 19:01:16 +00:00
Ryan C. Gordon
ccd5fcef12
audio: Fix potential NULL dereference in AudioStream gain adjustment.
...
You can end up with a NULL scratch buffer, which is otherwise not needed on
this path, then ConvertAudio will end up needing that scratch space to move
to float32 to apply gain.
Fixes #12091 .
(I assume.)
2025-01-28 13:14:25 -05:00
Frank Praznik
48f5550651
wayland: Don't send keyboard and mouse added events during initialization
...
Only send them when a device is added post-initialization, as is done on other platforms.
2025-01-28 13:02:29 -05:00
Sam Lantinga
2a946e91bc
android: updated release build SDK to match documented requirements
2025-01-28 06:03:37 -08:00
Sam Lantinga
44edbf7137
Use templates for the package support files
...
This makes them more easy to reuse in other projects.
2025-01-28 06:03:37 -08:00
Adam Kewley
1c008d8ed0
Change DBUS introspection timer from INFINITE -> DEFAULT when introspecting available dialog services
2025-01-28 05:13:35 -08:00
Carl Åstholm
c21bc48a70
Fix undefined behavior in SDL_windowsmouse.c
...
This fix prevents C undefined behavior from being invoked on Windows
if the user's configured cursor speed is below 6.
2025-01-28 05:12:16 -08:00
Sam Lantinga
1c7cc60286
Skip IsRegularFileOrPipe() check on Emscripten
...
The sandbox guarantees that this will be true.
Fixes https://github.com/libsdl-org/SDL/issues/12108
2025-01-27 22:25:12 -08:00
Ryan C. Gordon
8f958953f1
audio: Fix audio stream gain going wrong in certain scenarios.
...
Fixes #12091 .
2025-01-27 20:20:17 -05:00
Ryan C. Gordon
3b3af7105b
audio: Fix a minor code style thing.
2025-01-27 20:20:17 -05:00
mausimus
725ee7665c
Documentation: fixed typos around floats precision
2025-01-27 14:12:24 -05:00
Petar Popovic
6f098a920e
Avoid a crash when a tray without a menu is clicked on Windows.
2025-01-26 23:27:28 -08:00
Ryan C. Gordon
09f900f66e
audio: Remove resampling limits.
...
Audio streams used to accept audio with a src or dest frequency between
4000Hz and 384000Hz. It was arbitrary (or perhaps a relic of older
resampler revisions), and testing shows unnecessary, so remove it.
Fixes #12098 .
2025-01-27 01:13:54 -05:00
Sam Lantinga
5f8e0ebf58
Fixed memory leak at shutdown
2025-01-26 19:30:29 -08:00
Cameron Gutman
913e0a5e53
SDL_migration.cocci: handle more renamed event fields
2025-01-25 23:50:44 -06:00
Cameron Gutman
628130ec8f
SDL_migration.cocci: fix incorrect SDL3 API name
2025-01-25 23:50:04 -06:00
SDL Wiki Bot
fa8c0f0552
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-26 03:57:15 +00:00
SDL Wiki Bot
17c4bdd754
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-24 21:19:18 +00:00
SDL Wiki Bot
ad8a09000f
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-24 20:06:31 +00:00
cosmonaut
8df17c97d1
GPU: Add notes about shader resource requirements to documentation
2025-01-24 12:04:00 -08:00
Anonymous Maarten
303fd5ed5a
release: rename resources/cmake -> resources/CMake in dmg
2025-01-24 20:08:25 +01:00
Anonymous Maarten
fdf33f9047
xcode+cmake: Use SDL3.framework/SDL3 as IMPORTED_LOCATION
...
Not adding /SDL3 causes CMake to no longer set the RUNPATh on
binaries in the build directory.
It also breaks compatibility with CMake versions older then 3.28.
reverts c56a3f60fe (xcode+cmake: use SDL3.framework folder as IMPORTED_LOCATION)
reverts ad3c7b92f8 (xcode+cmake: use SDL3.framework folder as IMPORTED_LOCATION)
2025-01-24 20:07:51 +01:00
Ryan C. Gordon
cb3d6dc467
.wikiheaders-options: Removed wikipreamble setting.
...
Reference https://github.com/libsdl-org/sdlwiki/issues/713 .
2025-01-24 01:53:51 -05:00
SDL Wiki Bot
84c4ff2f10
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-24 04:47:03 +00:00
nightmareci
2e381a717f
Fix possible integer overflow of size + 1
2025-01-23 15:57:23 -08:00
SDL Wiki Bot
129ebc77b9
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-23 23:20:22 +00:00
Petar Popovic
a336b62d8b
Remove newlines from error messages
2025-01-23 11:45:04 -08:00
Frank Praznik
d0ae093681
x11: Don't force position windows with an undefined position
...
An undefined position means that the window manager can handle placement, so SDL shouldn't override that by forcing a position when showing a window.
Allows for removing a fair bit of now-unnecessary code as well.
2025-01-23 14:36:26 -05:00
hspir404
72a3eae0da
Fix buffer overrun in ConvertAudio with different src/dst channel count
...
- Source or destination format also has to not be F32 to trigger bug
2025-01-23 13:52:31 -05:00
Petar Popovic
983cfe8b1c
Remove even more newlines from log messages
2025-01-23 09:32:50 -08:00
nightmareci
718034f5fa
Remove newlines from log messages
2025-01-22 20:25:04 -08:00
Sam Lantinga
17625e20df
Removed redundant step in Visual Studio instructions
2025-01-22 13:26:11 -08:00
Sam Lantinga
c806c271c5
Tweaked emscripten introduction
2025-01-22 13:05:44 -08:00
Sam Lantinga
74536243dd
Emscripten works well using the normal CMake workflow
2025-01-22 12:56:32 -08:00
Anonymous Maarten
98c447802f
ci: bump to NetBSD 10.1
2025-01-22 19:39:17 +01:00
nightmareci
a437dbc7e3
Improve log documentation
2025-01-22 10:37:54 -08:00
SDL Wiki Bot
1c21a72bda
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-22 17:20:25 +00:00
Susko3
73fc2b03a3
Copy pen handling code from SDLSurface to SDLControllerManager
2025-01-21 21:33:11 -08:00
Sam Lantinga
6f3d0b3cdb
Fixed build when using an older Xcode SDK
...
Fixes https://github.com/libsdl-org/SDL/issues/12048
2025-01-21 18:17:02 -08:00
Anonymous Maarten
cb3cc28809
emscripten: pass --no-sandbox to the chrome web driver
...
This fixes running the Emscripten tests on Ubuntu 24.04.
2025-01-22 02:48:32 +01:00
SDL Wiki Bot
df3cfbc797
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-21 23:08:39 +00:00
cosmonaut
799093799a
GPU: Note buffer alignment requirements
2025-01-21 15:07:34 -08:00
SDL Wiki Bot
5bf077f1f1
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-21 23:04:33 +00:00
SDL Wiki Bot
5d6a780453
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-21 23:00:08 +00:00
Sam Lantinga
77b520e93e
Updated to version 3.2.1 for development
2025-01-21 14:02:06 -08:00
Klayism
bb3c5b4f3a
Fix multiple occurences of typo "an simple" to "a simple"
2025-01-21 14:00:54 -08:00
Anonymous Maarten
efa6e7aece
android: add style to test apk's
2025-01-21 20:20:17 +01:00
Sam Lantinga
535d80bade
Include the README and related files in the SDL framework
2025-01-21 10:51:21 -08:00
Sam Lantinga
ed2920afef
All SDL 3.0 release symbols are at version 3.2.0
2025-01-21 10:19:21 -08:00
Ryan C. Gordon
7a5604cf0c
Sync SDL3 wiki -> headers.
2025-01-21 13:12:25 -05:00
Ryan C. Gordon
7e130e27ba
fnsince.pl: Remove prerelease version tapdancing.
2025-01-21 13:10:57 -05:00
Sam Lantinga
b775135b4f
Removed temporary debug code
2025-01-21 08:57:08 -08:00
Sam Lantinga
a52fc209bb
Updated to version 3.2.0 for release
2025-01-21 08:52:28 -08:00
SDL Wiki Bot
f16c67115d
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-21 16:29:55 +00:00
Ryan C. Gordon
90bda6548f
video: Don't let SDL_CreateWindowTexture use the software renderer.
...
It used to check for "software" in the hint, but now it has to parse a
comma-separated list.
If it tries to use the software renderer here, you'll end up in an infinite
recursion.
2025-01-21 11:29:00 -05:00
Ryan C. Gordon
c45c4a5e51
render: SDL_HINT_RENDER_DRIVER now accepts a comma-separated list.
...
Fixes #11077 .
2025-01-21 11:29:00 -05:00
SDL Wiki Bot
670a7d8126
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-21 16:11:20 +00:00
Frank Praznik
8a67896d9a
docs: Note the preferred function for getting the content scale of a window
...
SDL_GetWindowDisplayScale() should be preferred over SDL_GetDisplayForWindow() + SDL_GetDisplayContentScale() for querying the per-window content scale, as the former provides a more accurate and current value for individual windows, as the per-window value can differ from the base display scale value, particularly on high-DPI and multi-monitor desktops.
2025-01-21 11:07:11 -05:00
Sam Lantinga
8526868563
dialog: cleaned up D-Bus portal implementation
...
Fixes https://github.com/libsdl-org/SDL/issues/12036
2025-01-20 22:57:42 -08:00
Ryan C. Gordon
071bebf235
coreaudio: Add a note about why this uses 3 buffers instead of 2.
2025-01-20 23:29:53 -05:00
Katelyn Gadd
c0a9d220b9
vulkan: Fixes for swapchain resize crash on X11.
...
Fixes #11075 .
2025-01-20 23:17:38 -05:00
SDL Wiki Bot
ea9880b760
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-21 04:01:28 +00:00
Quinn X. J.
bcf7ead6e4
documentation typo: SFLOAT -> FLOAT
2025-01-20 20:00:40 -08:00
Ryan C. Gordon
6d5815db52
vulkan: Deal with VK_ERROR_OUT_OF_DATE_KHR returns from vkAcquireNextImageKHR.
...
Fixes #11075 .
2025-01-20 22:32:23 -05:00
Katelyn Gadd
6b7dad7d82
vulkan: move temporary pointer to its own field to prevent a bad dereference.
...
Reference Issue #11075 .
2025-01-20 22:32:23 -05:00
Anonymous Maarten
3e530c6db1
cmake: remove superfluous cmake_minimum_required
2025-01-21 03:10:42 +01:00
Anonymous Maarten
7bff36e4b2
ci: add ubuntu arm job
...
f
2025-01-21 03:10:42 +01:00
Anonymous Maarten
37140aa9f7
cmake: expand libunwind
2025-01-21 03:10:42 +01:00
Caleb Cornett
abe6d9db97
Automatically detect SDL_main_private.h
2025-01-20 20:48:17 -05:00
Tomasz Pakuła
10c9fbf411
Use proper polar direction when creating FF_RUMBLE effect
...
Uses proper polar direction of 90 degrees. Previous value probably came from mistakenly using spherical system default.
2025-01-20 16:52:40 -08:00
Tomasz Pakuła
c6c7469708
Translate conditional effect direction instead of hardcoding it to 0
...
Provious code wrongly assumed that direction is not an important part
of conditional effect. Moreover, if there's need to hardcode polar
direction, the default should be 0x4000 (north).
For one axis affects, a direction of 0 means complete lack of force, if
a FFB-enabled device takes direction into force calculation. A sine function
graph can be used to represent the resulting forces where X is the input
direction and Y is the force multiplier (360 degrees equals to 1).
This fixes conditional effect playback on Moza Racing devices, which do
not ignore direction field.
2025-01-20 16:52:40 -08:00
Sam Lantinga
b476695e67
Call the windows message hook while inside a modal message loop
...
Fixes https://github.com/libsdl-org/SDL/issues/12029
2025-01-20 15:56:23 -08:00
Ryan C. Gordon
b6d0bc0431
coreaudio: Use three buffers for the audioqueue, not two.
...
This doesn't affect latency much, but it makes the system usable if the system
drops you down from the bluetooth a2dp profile (headphones) to the handsfree
(I think...?) profile because the bluetooth audio device is also recording,
which would be extremely common in a VoIP app, but also if you're talking
in a different app while also playing audio.
Fixes #8192 .
2025-01-20 18:35:04 -05:00
Ryan C. Gordon
aa10e51c74
audio: Added some minor missing comments in struct SDL_AudioDevice.
2025-01-20 18:35:04 -05:00
Frank Praznik
10a5b388df
win32: Retain the WS_MAXIMIZEDBOX style while in fullscreen
...
This needs to be preserved while in fullscreen, or leaving fullscreen for the maximized state can cause the taskbar to disappear with borderless windows.
2025-01-20 17:01:58 -05:00
Frank Praznik
6449339ae3
win32: Restore the base size of a window when leaving fullscreen
...
Always restore the base floating size of a window before possibly entering the maximized state, as base size can be lost during the fullscreen transition, resulting in the window de-maximizing to the wrong size.
2025-01-20 17:01:58 -05:00
Sam Lantinga
075c0337cd
Removed debug print statement
2025-01-20 13:11:19 -08:00
Sam Lantinga
a036aeda3b
The Vulkan renderer doesn't actually support RGB texture formats
...
Fixes https://github.com/libsdl-org/SDL/issues/10400
2025-01-20 13:09:49 -08:00
Sam Lantinga
9b454a762c
Revert "testautomation: don't validate alpha values on XRGB formats"
...
This reverts commit 759e01bd64 .
It's better to return the expected format from SDL_RenderReadPixels() than skip alpha testing.
2025-01-20 12:57:48 -08:00
Ryan C. Gordon
dcadd23ba1
render: Prevent division by zero if logical presentation is 0 pixels.
2025-01-20 15:52:33 -05:00
Ryan C. Gordon
adb91fd3db
process: Don't use vfork() on Apple platforms.
...
They want you to use fork(), which is almost-identical in their implementation.
They mark vfork() usage with a big scary deprecation warning.
2025-01-20 15:51:02 -05:00
Frank Praznik
819628c6bf
testautomation: Remove Win32 borderless resizable hint
...
This defaults to 'true' now, so setting it manually is no longer necessary.
2025-01-20 14:49:35 -05:00
Sam Lantinga
759e01bd64
testautomation: don't validate alpha values on XRGB formats
...
The results are not defined, and some renderers set 0xFF always and other renderers set the alpha to blend results, even though it won't be used when rendering.
Fixes --filter render_testBlendModes with D3D renderers
2025-01-20 11:29:41 -08:00
Sam Lantinga
c698c61f03
renderer: initialize the surface colorspace correctly
...
Fixes https://github.com/libsdl-org/SDL/issues/12027
2025-01-20 10:48:13 -08:00
Sam Lantinga
c975f77b0f
Update joysticks and so forth during live resize
...
Fixes https://github.com/libsdl-org/SDL/issues/12022
2025-01-20 10:11:31 -08:00
Sam Lantinga
362f96a6cf
testcontroller: use SDL_MAIN_USE_CALLBACKS so updates happen during live resizing
2025-01-20 10:11:31 -08:00
Sam Lantinga
f8040b2e01
Use UIKeyboardTypeDecimalPad for number fields on iOS
...
Fixes https://github.com/libsdl-org/SDL/issues/12025
2025-01-20 09:09:57 -08:00
Ryan C. Gordon
90b2e2527e
include: Added a tiny bit to SDL_sensor.h's category documentation.
...
Reference Issue #11847 .
2025-01-20 01:39:37 -05:00
Ryan C. Gordon
2be749b23b
include: More category documentation.
...
Reference Issue #11847 .
2025-01-20 01:37:25 -05:00
Ryan C. Gordon
642262e30e
cocoa: Fix mousegrab when going fullscreen.
...
When going into a fullscreen space, update mouseConfinementRect once the
transition is done. When going exclusive fullscreen, force a window sync so
the transition is complete before we do the update.
Fixes #9088 .
2025-01-20 01:02:30 -05:00
Ryan C. Gordon
d5766bc4b8
include: More category documentation.
...
Reference Issue #11847 .
2025-01-20 01:02:30 -05:00
Ryan C. Gordon
b809da52fd
assert: Try using __builtin_trap() for SDL_TriggerBreakpoint().
...
This was necessary on an arm64 install of Raspberry Pi OS.
2025-01-20 01:02:30 -05:00
SDL Wiki Bot
c4c0bfdfb1
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-20 04:34:56 +00:00
William Hou
7133969e3a
Feature add hint to remap option as alt key ( #12021 )
2025-01-19 20:34:04 -08:00
SDL Wiki Bot
53a5350292
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-20 02:54:44 +00:00
Sam Lantinga
5f2dd5f04e
tray: fixed multi-threading issues with GTk implementation
...
GTK+ documentation states that all GDK and GTK+ calls should be made from the main thread.
Fixes https://github.com/libsdl-org/SDL/issues/11984
2025-01-19 18:53:55 -08:00
Sam Lantinga
dfdc120268
tray: document thread-safety
2025-01-19 18:53:55 -08:00
Sam Lantinga
d4cda51057
tray: renamed SDL_HasNoActiveTrays() to SDL_HasActiveTrays()
2025-01-19 18:53:55 -08:00
Sam Lantinga
a974888aad
tray: fixed icon colors on Windows
2025-01-19 18:53:55 -08:00
Sam Lantinga
7570ab106d
tray: improved error checking
...
Also clean up any existing trays when the program quits
Fixes https://github.com/libsdl-org/SDL/issues/11893
2025-01-19 18:53:55 -08:00
Sam Lantinga
b716eeefef
testtray: minor cleanup
2025-01-19 18:53:55 -08:00
Sam Lantinga
3afd1e7eaa
windows: use WIN_UTF8ToStringW() for dialog titles
2025-01-19 18:53:55 -08:00
SDL Wiki Bot
78023500fa
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-19 23:59:37 +00:00
Ryan C. Gordon
34c12d0db8
include: Add category documentation to SDL_timer.h.
...
Reference Issue #11847 .
2025-01-19 12:19:30 -05:00
SDL Wiki Bot
b088e89191
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-19 17:12:43 +00:00
Ryan C. Gordon
0851322fb1
include: Add category documentation to SDL_power.h.
...
Reference Issue #11847 .
2025-01-19 12:11:49 -05:00
Semphris
43b54b3d72
Fix Windows dialog folder titles
...
Same fix as in cf946e32ba , which was not done for the folder implementation.
2025-01-19 08:19:40 -08:00
Ryan C. Gordon
32965b4bf1
pen: Send virtual mouse motion without a button press when a pen is hovering.
...
Fixes #11470 .
2025-01-18 21:51:03 -05:00
Ryan C. Gordon
5da9d4ecc2
cocoa: Slightly better display hotplugging detection.
...
Fixes #12016 .
2025-01-18 17:02:37 -05:00
Semphris
19f42094bb
Fix Windows fie dialog args freeing
2025-01-18 13:53:56 -08:00
Semphris
721fc7de0b
Correct spacing of pointers ('a* b;' -> 'a *b;')
2025-01-18 13:53:56 -08:00
Semphris
cd269730eb
Fix Windows dialog memory management
2025-01-18 13:53:56 -08:00
Sam Lantinga
049a8f0e52
Use SDL_calloc() instead of SDL_malloc()
...
This automatically initializes memory to zero so you don't have uninitialized memory bugs
2025-01-18 13:41:23 -08:00
Semphris
354d2c390c
Initialize invalid parent_{tray,entry} to NULL
...
The API states that the related functions must return NULL if the function
called (get the parent tray, or get the parent entry) is invalid for this
menu. Initialising the fields to NULL makes that API correct for Windows.
2025-01-18 16:17:16 -05:00
Semphris
b79ada6aa5
Windows trays: Fix ParentEntry & Enabling
...
The test/testtray program would crash on Windows when adding any item and then removing it, because a submenu's parent_entry field was not set.
Additionally, I noticed that some extraneous code copied from the {G,S}etTrayEntryChecked made {G,S}etTrayEntryEnabled work only for checkboxes, which is not the desired behavior.
Both issues were fixed in this commit.
2025-01-18 16:17:16 -05:00
Sam Lantinga
ba95c54f99
macOS: get the correct display name on macOS 10.15+
2025-01-18 09:42:37 -08:00
Frank Praznik
42e0fb10f8
wayland: Set the mouse state before calling the hit test callback
...
Update the mouse state before entering the hit test, in case the global state is queried, or the system menu opened, while in the client hit testing callback.
2025-01-18 12:10:25 -05:00
Sam Lantinga
cd0db8d35e
Added Linux evdev mappings for the Wireless HORIPAD For Steam
2025-01-18 08:09:25 -08:00
Ryan C. Gordon
1d7a681e4d
Revert "emscripten: resizable windows take whole page, resize with browser window."
...
This reverts commit d317fc9c08 .
This has some issues, we'll revisit it for 3.4.0.
Reference Issue #11949 .
2025-01-18 10:15:43 -05:00
SDL Wiki Bot
e054f3c085
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-18 15:12:47 +00:00
Ryan C. Gordon
75317dae59
include: Added category docs for SDL_mouse.h
...
Reference Issue #11847 .
2025-01-18 10:11:53 -05:00
Sam Lantinga
c7d1fd90ea
Added support for the 8BitDo Ultimate 2C Wireless in Bluetooth mode
...
Closes https://github.com/libsdl-org/SDL/pull/11415
2025-01-18 07:06:46 -08:00
Anonymous Maarten
dbe3baeb0f
release: document using the xcframework with CMake
2025-01-18 06:29:17 -08:00
Sam Lantinga
ad3c7b92f8
xcode+cmake: use SDL3.framework folder as IMPORTED_LOCATION
...
[ci skip]
2025-01-18 06:27:21 -08:00
Sam Lantinga
0401b07eea
Fixed typo
2025-01-18 06:23:14 -08:00
Sam Lantinga
08e74d29be
Fixed typo
2025-01-18 06:22:29 -08:00
Sam Lantinga
923123a527
emscripten: Let SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT accept "#none"
...
This is used to say "don't even try to listen for keypresses," for apps that
are managing this outside of SDL.
Fixes #10292 .
2025-01-18 06:19:27 -08:00
Sam Lantinga
c603a9c94a
Moved flag documentation
2025-01-18 06:16:10 -08:00
Sam Lantinga
90b7174a7d
Respect the SDL_BORDERLESS_RESIZABLE_STYLE hint, but default it to true.
2025-01-18 06:07:06 -08:00
Ryan C. Gordon
6a72d32d41
emscripten: Let SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT accept "".
...
This is used to say "don't even try to listen for keypresses," for apps that
are managing this outside of SDL.
Fixes #10292 .
2025-01-18 08:43:55 -05:00
Ryan C. Gordon
f3a39074b0
windows: use WS_THICKFRAME style on borderless windows.
...
This is apparently necessary in newer Windows releases (Windows 10 and later?)
to allow hit-testing to resize the window.
Fixes #8406 .
2025-01-18 08:38:49 -05:00
Nicolas Firmo
842f6dc402
Fixed wrong type of phase ( #12014 )
...
`phase` should be a `float` value that ranges between `0` and `1`.
2025-01-17 18:12:47 -08:00
Nicolas Firmo do Patrocinio Barra
b95989d14a
Fixed sine wave distortion over time.
...
Audio distortion after a while caused by loss of precision in dividing a large floating point number resolved by keeping `current_sine_sample` (formelly named `total_samples_generated`) between 0 and freq - 1.
2025-01-17 17:41:56 -08:00
Ryan C. Gordon
010f27dc70
storage: enumerate and glob on storage can accept a NULL path.
...
This will be treated as the root of the storage tree.
2025-01-17 20:11:50 -05:00
Ryan C. Gordon
a6a8598b98
storage: deal with paths with Windows '\\' path separators appended.
...
Reference Issue #11986 .
2025-01-17 20:11:50 -05:00
Sam Lantinga
7c6adc1ca7
gpu renderer: removed unused sampler slots
...
There used to be 3 scale modes, now there are only 2.
2025-01-17 16:31:40 -08:00
Ryan C. Gordon
feeea6a776
Sync SDL3 wiki -> headers.
2025-01-17 18:42:04 -05:00
Ryan C. Gordon
e9f7f11f1d
fnsince.pl: Fix script once bump to 3.1.10 exposed a bug.
2025-01-17 18:39:12 -05:00
SDL Wiki Bot
d2fc394a2a
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-17 23:11:30 +00:00
Ryan C. Gordon
d317fc9c08
emscripten: resizable windows take whole page, resize with browser window.
...
This also implements the SetWindowResizable interface, so this can be now
toggled after window creation, too.
Fixes #11949 .
2025-01-17 17:59:28 -05:00
SDL Wiki Bot
ee469c6aff
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-17 22:26:32 +00:00
cosmonaut
d4d22dd8de
GPU: Add remarks about point topology
2025-01-17 14:25:14 -08:00
Sam Lantinga
59ea078ee2
x11: check to see if displays moved when connected/disconnected
...
Fixes https://github.com/libsdl-org/SDL/issues/9738
2025-01-17 13:14:16 -08:00
Frank Praznik
1848ce680b
win32: Use the window coordinates to get the monitor when de-minimizing a maximized window
...
MonitorFromWindow can fail if called on a window being de-minimized, so fall back to using the monitor from the last window coordinates if initial retrieval fails.
2025-01-17 15:46:18 -05:00
Sam Lantinga
656c519cca
Fixed warning C6313: Incorrect operator. Use an equality test to check for zero-valued flags.
2025-01-17 12:08:58 -08:00
SDL Wiki Bot
9ed96f392d
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-17 19:46:20 +00:00
Sam Lantinga
ae8df1dcbd
Note that the primary monitor isn't always at 0,0
2025-01-17 11:52:33 -08:00
Sam Lantinga
4b429b9fa7
Updated README-platforms.md
...
Also added platform specific README files
2025-01-16 16:21:18 -08:00
Sam Lantinga
616ae99069
Removed README-git.md
...
We're fully hosted on GitHub, no need for additional explanation.
2025-01-16 15:45:51 -08:00
Ryan C. Gordon
c2dac95f58
Revert "Add CategoryAPICategory to the complete API index"
...
This reverts commit 21a42d2b0d .
It doesn't work like this, sorry. :)
2025-01-16 18:02:01 -05:00
Anonymous Maarten
dd4f5df824
release: support android-X-ext-Y directories
...
[ci skip]
2025-01-16 20:59:13 +01:00
ROllerozxa
cdc5483cf9
Vita: Fix off-by-one error for synthetic mouse events
2025-01-16 11:58:01 -08:00
SDL Wiki Bot
07a5c144c6
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-16 19:43:08 +00:00
Sam Lantinga
eb168e410c
Updated to version 3.1.11 for development
2025-01-16 11:41:28 -08:00
Frank Praznik
b96bb152c2
wayland: Don't redundantly set the border state when showing a window
...
They are now set before the initial configure.
2025-01-16 13:54:39 -05:00
Frank Praznik
5a564a718d
wayland: Add a dummy function for the libdecor dismiss popup callback
...
This was never added, and we've been lucky that it's never called as libdecor doesn't check the function pointer for null before doing so.
2025-01-16 13:48:16 -05:00
Frank Praznik
9f6eeb1095
wayland: Set the border state before the initial configure
...
This allows the toplevel bounds to be set correctly on borderless windows.
2025-01-16 13:40:31 -05:00
SDL Wiki Bot
274bc95dfd
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-16 18:29:57 +00:00
SDL Wiki Bot
07f7c40464
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-16 18:18:47 +00:00
Ryan C. Gordon
22d8e73530
include: filled in category documentation for SDL_messagebox.h.
...
Reference Issue #11847 .
2025-01-16 13:16:18 -05:00
Sam Lantinga
21a42d2b0d
Add CategoryAPICategory to the complete API index
2025-01-16 09:26:00 -08:00
Anonymous Maarten
1006236aa6
ci: add summary to release.yml
...
[ci skip]
2025-01-16 18:24:13 +01:00
Ethan Lee
326ce9bb8d
gpu: D3D12 buildfix for Xbox
2025-01-16 12:19:59 -05:00
Ethan Lee
c95b842b30
video: Xbox does not use CreateIconFromSurface
2025-01-16 12:19:46 -05:00
Sam Lantinga
d8e1ad0ebc
release: skip extended Android SDK versions
2025-01-16 09:07:00 -08:00
Frank Praznik
7ee2ab3830
wayland: Fix return value check from int-to-bool conversion
2025-01-16 11:52:16 -05:00
Sam Lantinga
1dd8fadca2
Updated to version 3.1.10 for the release candidate
2025-01-16 08:33:18 -08:00
SDL Wiki Bot
9225a421b7
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-16 13:20:18 +00:00
Ryan C. Gordon
3ffb1a8cbd
storage: generic title storage allows override paths without '/' appended.
...
Fixes #11299 .
2025-01-16 08:19:28 -05:00
Ryan C. Gordon
874c07f8de
storage: Don't allow "." and ".." paths, enforce '/' dir separators.
...
Also clarify what characters are valid for Storage paths in the category docs.
Fixes #11079 .
Fixes #11370 .
Fixes #11369 .
2025-01-16 08:19:28 -05:00
Ryan C. Gordon
67664a0427
testfilesystem: test some Storage APIs, too.
2025-01-16 08:19:28 -05:00
Ryan C. Gordon
eb793dede7
filesystem: SDL_GetCurrentDirectory() should add a path separator at the end.
2025-01-16 08:19:28 -05:00
Ryan C. Gordon
87e1b0eb89
filesystem: SDL_EnumerateDirectory() gives dirs with path seperators appended.
...
Fixes #11065 .
Fixes #11427 .
2025-01-16 08:19:28 -05:00
Ramez Ragaa
e98ee9bb04
Adjust testgl.c to test gl_release_behavior
2025-01-16 08:19:05 -05:00
Ryan C. Gordon
3424ec948c
video: SDL_GL_GetAttribute gets correct SDL_GL_CONTEXT_RELEASE_BEHAVIOR value.
...
Original patch was from @ramezgerges (thanks!).
Fixes #11697 .
2025-01-16 08:19:05 -05:00
Ryan C. Gordon
05877f2cea
cmake: Add the IoRing async i/o code to the Windows build.
...
The Visual Studio projects have been compiling this for awhile, but apparently
we haven't tested this through CMake before. Toolchains without access to
the latest Windows 11 SDK headers have been preprocessing out the dependency
on this code, so we never noticed.
2025-01-16 08:18:40 -05:00
Ryan C. Gordon
4d63a2b882
io: Renamed src/file to src/io
...
Fixes #11980 .
2025-01-16 08:18:40 -05:00
Sam Lantinga
ea642fe9ff
cocoa: clear mouse focus based on NSEventTypeMouseExited events ( #11991 )
...
We can't directly set the mouse focus since we may get spammed by entered/exited events,
but we can process the current focus later in the mouseMoved handler in line with the
mouse motion event sequence.
Fixes https://github.com/libsdl-org/SDL/issues/8188
2025-01-15 23:34:20 -08:00
Sam Lantinga
5f4696ce63
Updating documentation for the 3.2.0 release
...
* Simplified and updated the mingw release archive
* Simplified and updated the msvc release archive
* Updated the Xcode release archive
* Updated the Android release archive
2025-01-15 20:38:16 -08:00
Sam Lantinga
2c7b7d1d33
Keep the lifecycle observer active while there are windows active
...
Fixes https://github.com/libsdl-org/SDL/issues/11627
2025-01-15 17:10:49 -08:00
cosmonaut
355f69ebfe
GPU: Ensure thread safety of Vulkan resource creation
2025-01-15 13:45:43 -08:00
Frank Praznik
c9d602307c
cocoa: Only process hit tests on left clicks
...
Otherwise, right-click events over drag areas will be eaten.
2025-01-15 15:44:01 -05:00
Frank Praznik
dd0bdc2561
win32: Pass through non-left mouse button presses when over draggable areas
...
Returning anything other an HTCLIENT result will cause windows to eat the button press, so ensure that non-left presses are passed through to the client over draggable areas.
2025-01-15 15:44:01 -05:00
Ryan C. Gordon
84d35587ee
filesystem: SDL_SYS_EnumerateDirectory inexplicably takes the same arg twice.
2025-01-15 14:09:33 -05:00
Sam Lantinga
fc9b2478d8
windows: don't set focus click pending if SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH is set
...
Fixes https://github.com/libsdl-org/SDL/issues/11976
2025-01-15 10:54:12 -08:00
Sam Lantinga
18d21b36fe
windows: use the initial rect to anchor fixed aspect ratio resizing
...
Fixes https://github.com/libsdl-org/SDL/issues/11688
2025-01-15 10:33:22 -08:00
Sam Lantinga
1995471927
cocoa: fixed resizing windows with fixed aspect ratio
...
The existing algorithm works well for min-max ratios, but didn't allow edge expansion of fixed aspect ratio windows. Use NSWindow setContentAspectRatio instead.
2025-01-15 10:05:34 -08:00
Sam Lantinga
67382e9c83
Fixed detection of function keys on Emscripten
...
Fixes https://github.com/libsdl-org/SDL/issues/11973
2025-01-15 08:07:38 -08:00
Sam Lantinga
23410debf7
SDL_GetKeyboardNameForID(): Set an error message for invalid keyboard IDs
2025-01-15 00:01:06 -08:00
Petar Popovic
8ce176b59a
SDL_GetMouseNameForID(): Set an error message for invalid mouse IDs.
2025-01-14 23:59:49 -08:00
Sam Lantinga
51fa076fdc
Don't send normal keyboard events if no application window has focus
...
This can happen if all the windows shown have the SDL_WINDOW_NOT_FOCUSABLE flag. We'll still accept modifier state changes though, so you can do Control-click actions.
2025-01-14 23:44:43 -08:00
Sam Lantinga
a446381ea9
Tooltips and unfocusable windows can't become main windows
2025-01-14 23:44:43 -08:00
Ryan C. Gordon
ebb24eedc8
mouse: Clean up virtual touch devices as appropriate.
2025-01-15 02:19:59 -05:00
Ryan C. Gordon
dabc93a631
pen: Send virtual mouse and touch events for pen input.
...
Fixes #11948 .
2025-01-15 02:19:59 -05:00
ImThour
169c8d5140
Fix incorrect hotspot calculation for cursor positioning
...
Corrected the calculation of the vertical hotspot position in the `GetCachedCursor` function.
Changed the variable from `data->hot_x` to `data->hot_y` to ensure the correct vertical position of the cursor's hotspot is used when scaling.
2025-01-14 22:37:24 -08:00
Sam Lantinga
8e9c44bc3b
Fixed accidental removal of optional delegate interface check
...
Fixes https://github.com/libsdl-org/SDL/issues/11970
2025-01-14 22:35:13 -08:00
Sam Lantinga
4dd585fb62
coreaudio: convert MPEG channel layout to WAVE channel layout
2025-01-14 22:26:16 -08:00
Sam Lantinga
81e57147f8
Child windows shouldn't take focus if the parent window is in relative mouse mode
...
Fixes https://github.com/libsdl-org/SDL/issues/11807 on Windows
2025-01-14 21:27:06 -08:00
SDL Wiki Bot
3bea84531d
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-15 03:27:28 +00:00
Sam Lantinga
9ed23a4b79
Updated SDL_SetEventFilter() documentation
2025-01-14 19:25:31 -08:00
Sam Lantinga
e19a56f4d5
Don't send fake key events while processing real ones on Android
...
Fixes https://github.com/libsdl-org/SDL/issues/11350
2025-01-14 19:05:07 -08:00
Sam Lantinga
1ab61635a9
Use SDL_Log() for keyboard debugging.
2025-01-14 19:05:07 -08:00
Sam Lantinga
29c684c626
Removed debug logging
2025-01-14 18:05:37 -08:00
Sam Lantinga
0eaa6197c5
Removed unnecessary __builtin_available check
2025-01-14 17:00:30 -08:00
Sam Lantinga
ffe194c52e
Fixed build when SDL_JOYSTICK_MFI isn't enabled
2025-01-14 17:00:30 -08:00
Sam Lantinga
a4547fe77a
Updated weak framework dependencies for new deployment targets
2025-01-14 17:00:30 -08:00
Sam Lantinga
49dd24e195
Fixed potentially overlapping memcpy() to use memmove()
2025-01-14 14:31:20 -08:00
Green Sky
191a6417d5
events: use SDL_memmove instead of SDL_memcpy for overlapping memory
2025-01-14 14:20:32 -08:00
SDL Wiki Bot
bf793bf439
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-14 21:44:52 +00:00
Ryan C. Gordon
9e60a8994f
audio: Allow streams to change the device-side channels maps.
...
Fixes #11881 .
2025-01-14 16:42:53 -05:00
Sam Lantinga
b2793a2ce2
Removed obsolete Raspberry Pi documentation
2025-01-14 12:58:30 -08:00
Sam Lantinga
04e3b67707
Removed outdated Visual Studio instructions
2025-01-14 12:22:15 -08:00
Sam Lantinga
a41f93bd10
Added https://github.com/Ravbug/sdl3-sample as a more complete Android example
2025-01-14 12:22:00 -08:00
Sam Lantinga
5ca735b40f
Only use WAVE surround sound channel layouts on macOS 10.15+
2025-01-14 12:03:07 -08:00
Sam Lantinga
cdde6dd7bb
Bumped deployment requirements for Apple platforms
...
We require at least Xcode 12.2 and macOS SDK 11 to build. We support deploying to macOS 10.13, iOS 11.0, and tvOS 11.0.
This cleans up the code significantly
2025-01-14 12:03:07 -08:00
Sam Lantinga
8f8af918ba
Removed CMakeLists.txt example that says you shouldn't use it
2025-01-14 11:15:34 -08:00
Sam Lantinga
8feb21a1d1
Updated README-cmake.md with build instructions for several platforms
2025-01-14 11:15:34 -08:00
cosmonaut
4294c06836
GPU: Check texture format support in pipeline creation
2025-01-14 10:16:20 -08:00
SDL Wiki Bot
31dd4fe81f
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-14 17:58:27 +00:00
Maia
417ed7f35f
Fix references in docs
2025-01-14 09:56:39 -08:00
Scrooge86x
0aa319e4f9
Added support for custom tray icon on Windows via SDL hints.
...
SDL_CreateTray now respects SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL
and SDL_HINT_WINDOWS_INTRESOURCE_ICON hints and uses the specified icon
as the tray icon.
2025-01-13 18:35:49 -08:00
Ozkan Sezer
5815372206
minor update to mingw-w64 build instructions.
2025-01-14 05:04:24 +03:00
cosmonaut
5d079c9a26
GPU: Remove bogus property from header docs
2025-01-13 17:46:31 -08:00
cosmonaut
d590e1f122
GPU: Align D3D12 clear properties to naming convention
2025-01-13 17:38:21 -08:00
SDL Wiki Bot
7098e525d0
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-14 01:30:53 +00:00
Evan Hemsley
fb6df93384
GPU: Add name properties to resources ( #11946 )
2025-01-13 17:29:08 -08:00
SDL Wiki Bot
a2b0ddcca6
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-14 01:19:09 +00:00
Sam Lantinga
d28e953222
Added thread safety documentation for SDL_iostream.h
...
Fixes https://github.com/libsdl-org/SDL/issues/11942
2025-01-13 17:17:17 -08:00
SDL Wiki Bot
f731741ead
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-14 00:44:57 +00:00
Sam Lantinga
0eaa8c6d81
Added INTRO-emscripten.md
2025-01-13 16:42:50 -08:00
Sam Lantinga
21b433536a
Scale up the text for large displays
2025-01-13 16:42:50 -08:00
Sam Lantinga
6bc7e88ca6
Added INTRO-androidstudio.md
2025-01-13 16:42:50 -08:00
Sam Lantinga
e4e76ac72e
Added INTRO-xcode.md
2025-01-13 16:42:50 -08:00
Sam Lantinga
1b30a01b44
Added INTRO-visualstudio.md
...
Also removed out of date Visual C++ documentation
2025-01-13 16:42:50 -08:00
Sam Lantinga
191b9d5021
Added INTRO-cmake.md
2025-01-13 16:42:50 -08:00
Sam Lantinga
7d2a1c5f8f
Mention the tests in INSTALL.md
2025-01-13 16:42:50 -08:00
Sam Lantinga
b6b9390444
Simplified INSTALL.md
2025-01-13 16:42:50 -08:00
Sam Lantinga
55e094f7ac
Updated INSTALL.md with simple intro breadcrumbs
2025-01-13 16:42:50 -08:00
Sam Lantinga
584c1d5791
Tweaking the README
2025-01-13 16:42:50 -08:00
Sam Lantinga
995a6a0333
Minor readability improvement for README-contributing.md
2025-01-13 16:42:50 -08:00
Sam Lantinga
86b46c678c
Removed README-git.md
...
We're fully hosted on GitHub, no need for additional explanation.
2025-01-13 16:42:50 -08:00
Sam Lantinga
96414fa56a
Removed obsolete Raspberry Pi documentation
2025-01-13 16:42:50 -08:00
Sam Lantinga
670db4d248
Made the README links in INSTALL.md markdown links
2025-01-13 16:42:50 -08:00
Sam Lantinga
b08d045811
Added a Discord link to BUGS.txt
2025-01-13 16:42:50 -08:00
Sam Lantinga
2ad0f1e1fe
Updated the credits for SDL 3.0
2025-01-13 16:42:50 -08:00
Sam Lantinga
41d48db4ae
Removed the runtime README
...
The main README is suitable for inclusion in redistributable archives and we'll have custom installation instructions for each platform.
2025-01-13 16:42:50 -08:00
Sam Lantinga
922b73195c
Simplified the README
2025-01-13 16:42:50 -08:00
Sam Lantinga
5e4a2974aa
Removed obsolete warnings about MIT licensed SIMD code
...
We no longer use the code this was warning about
2025-01-13 16:42:50 -08:00
Ryan C. Gordon
3766a39409
emscripten: double the audio buffer size.
...
Some systems seem to not keep up with the smaller buffer.
Reference Issue #11930 .
2025-01-13 16:26:18 -05:00
SDL Wiki Bot
e10e42c814
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-13 20:58:20 +00:00
Ryan C. Gordon
2b8fb0bdd4
wikiheaders: Maybe fix perl warning.
...
Reference Issue #11944 .
2025-01-13 15:18:39 -05:00
SDL Wiki Bot
efaf3739c6
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-13 19:42:26 +00:00
Ryan C. Gordon
4bddf521dd
emscripten: Override emscripten's fullscreen button with SDL's implementation.
...
Fixes #6798 .
Fixes #7913 .
Fixes #9044 .
2025-01-13 14:17:36 -05:00
expikr
569de84907
better numerical precision for playback example
2025-01-13 10:29:51 -08:00
Sam Lantinga
e5a4f09363
Call SDL_UDEV_Quit() if we don't end up using it
2025-01-13 10:22:10 -08:00
SDL Wiki Bot
7d7a76c077
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-13 17:53:40 +00:00
Sam Lantinga
66408308b8
Added documentation for mouse handling in relative mode
...
Fixes https://github.com/libsdl-org/SDL/issues/11805
2025-01-13 09:52:21 -08:00
SDL Wiki Bot
438075a83a
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-13 17:38:58 +00:00
Frank Praznik
b4562c0243
cocoa: Add a hint to control menu visibility in fullscreen spaces windows
...
Adds SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY to control whether or not the menu can be accessed when the cursor is moved to the top of the screen when a window is in fullscreen spaces mode.
The three values are true, false, and 'auto' (default), with auto resulting in a hidden menu if fullscreen was toggled programmatically, and the menu being accessible if fullscreen was toggled via the button on the window title bar, so the user has an easy way back out of fullscreen if the client app/game doesn't have a readily available option to toggle it.
2025-01-13 12:37:16 -05:00
Sam Lantinga
611f132fd0
Don't use a hint callback for SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY
...
This was originally intended to make sure that nativeAllowRecreateActivity() could be called from another thread safely, but the hint system is now thread-safe, so we don't need to use a callback here.
Fixes https://github.com/libsdl-org/SDL/issues/11938
2025-01-13 07:49:09 -08:00
mausimus
03a3c19c27
examples: use doubles to generate sine waves and avoid distortion
2025-01-13 09:50:45 -05:00
Ryan C. Gordon
307e6f2ca6
emscripten: simulate mouse autocapture.
...
This is just enough to delay MOUSE_LEAVE events until a drag ending outside
the canvas is released, and make sure the MOUSE_UP event has the canvas's
SDL_WindowID, which it wouldn't when mouse focus is was lost by this point.
Fixes #10033 .
2025-01-13 02:39:39 -05:00
Anonymous Maarten
f79083d9bb
release: don't add test directory to mingw release archives
2025-01-13 04:32:49 +01:00
Anonymous Maarten
4ba4f0a106
release: add Android aar to devel zip archive
...
[ci skip]
2025-01-12 16:28:00 -08:00
Sam Lantinga
c4f2f7b352
Removed redundant information in example pages
...
This is large text and is already covered by the header and breadcrumb
2025-01-12 15:57:48 -08:00
SDL Wiki Bot
949ec0c501
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-12 23:52:58 +00:00
SDL Wiki Bot
839227b4b0
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-12 22:24:11 +00:00
cosmonaut
c04b739df6
GPU: Note that resource naming functions are not thread safe.
2025-01-12 14:22:26 -08:00
Ethan Lee
3df0767e34
gpu: Initialize Metal stencil format even if stencil test is disabled
2025-01-12 13:05:27 -08:00
Ozkan Sezer
307dac97ac
testcontroller.c: fix build errors due to -Wformat after commit b524af1
2025-01-12 22:00:02 +03:00
Sam Lantinga
21cc1878f1
Reset enhanced mode state when closing a controller
...
Fixes https://github.com/libsdl-org/SDL/issues/11912
2025-01-12 10:45:54 -08:00
Sam Lantinga
b524af1b43
testcontroller: log the ID of gamepads as they are added and removed
2025-01-12 10:02:39 -08:00
expikr
9a83fa026d
apply multiplier scale after system scale
2025-01-12 08:24:41 -08:00
SDL Wiki Bot
ea859fba3a
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-12 16:07:12 +00:00
Sam Lantinga
551510c0eb
SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE can be combined with SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE
2025-01-12 08:05:51 -08:00
Ryan C. Gordon
95c1584386
README-migration: note SDL2 brightness/gamma ramp APIs that have been removed.
...
Fixes #11918 .
2025-01-12 04:35:56 -05:00
Ryan C. Gordon
f0af6c348a
emscripten: Add SDL_EVENT_DISPLAY_ORIENTATION support.
...
Reference Issue #11389 .
2025-01-12 02:23:00 -05:00
Ryan C. Gordon
3ad9c38a46
emscripten: Don't set OpenGL swap intervals until first PumpEvents.
...
Any requested swap interval will be saved and set on the first PumpEvents.
Once PumpEvents has been called at least once, swap intervals are set
immediately.
This assumes that events won't be pumped until after an Emscripten main loop
has been defined, and so prevents a warning on the javascript console:
"emscripten_set_main_loop_timing: Cannot set timing mode for main loop since
a main loop does not exist! Call emscripten_set_main_loop first to set one
up."
Fixes #9969 .
2025-01-11 15:19:09 -05:00
Anonymous Maarten
d42b4ed961
Leave SDL_TriggerBreakpoint undefined on unknown platforms
2025-01-11 17:29:27 +01:00
Anthony
9a7cfbc2d0
Add onNativePen to proguard-rules.pro
2025-01-11 07:44:55 -08:00
Ryan C. Gordon
82125ec1d8
x11: Be more aggressive about finding _any_ usable messagebox font.
...
Fixes #4800 .
Fixes #11910 .
2025-01-11 00:35:39 -05:00
Sam Lantinga
4231848791
Revert "Separate android initialization from Activity ( #11891 )"
...
This reverts commit d14c93c4b1 .
This is a major breaking change for activities that inherit SDLActivity
2025-01-10 15:27:08 -08:00
Ozkan Sezer
61f13b94d1
add a fallback SDL_TriggerBreakpoint() for MSVC after commit ebaa30d3.
2025-01-11 02:11:50 +03:00
Xander
d14c93c4b1
Separate android initialization from Activity ( #11891 )
2025-01-10 15:05:58 -08:00
SDL Wiki Bot
c64197be1a
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-10 20:56:33 +00:00
Sam Lantinga
042898995c
Added SDL_ClickTrayEntry()
...
Also removed the app delegate from the tray code on Cocoa and folded that into SDL3AppDelegate.
Fixes https://github.com/libsdl-org/SDL/issues/11906
2025-01-10 12:55:50 -08:00
Ryan C. Gordon
fb0f6a1196
cocoa: Display mode changes set Desktop display mode, not current.
2025-01-10 15:35:43 -05:00
Ryan C. Gordon
38176bfe9a
cocoa: Implemented display hotplugging support.
...
Fixes #7764 .
2025-01-10 13:25:34 -05:00
Frank Praznik
0e2ca934b5
events: Remove unused function declaration
2025-01-10 11:23:54 -05:00
Sam Lantinga
715897aea7
Added support for displaying XIM composition strings
...
Fixes https://github.com/libsdl-org/SDL/issues/6437
2025-01-10 03:26:42 -08:00
Sam Lantinga
a8a65b6fca
Use XIM for IME input on X11
...
Tested with fcitx5 and ibus on Xorg and Xwayland
* Used US English with dead keys and verified that ` followed by a results in à
* Used Hangul to enter Korean and got text in the expected order
* Used the mozc IM to enter Japanese and was able to generate candidates and so forth
Fixes https://github.com/libsdl-org/SDL/issues/3907
Fixes https://github.com/libsdl-org/SDL/issues/6164
Fixes https://github.com/libsdl-org/SDL/issues/11894
2025-01-10 03:26:42 -08:00
SDL Wiki Bot
1f3b40797d
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-10 06:39:06 +00:00
Ryan C. Gordon
fb94a79f89
stdinc: define SDL_NOLONGLONG for old Visual Studios, document the symbol.
...
Reference PR #11900 .
2025-01-10 01:37:25 -05:00
Anonymous Maarten
bda90c3cb6
cmake: rename SDL_DISABLE_* CMake options to SDL_xxx
2025-01-10 04:23:32 +01:00
Ethan Lee
90aff306c1
gpu: Show a debug error when pipelines are not given the right shader stages
2025-01-09 20:17:21 -05:00
SDL Wiki Bot
00b23a012c
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-09 22:27:31 +00:00
Frank Praznik
6b776a9989
keyboard: Add some SDL keycodes for common Xkb keys
...
Add SDL keycodes for keys found commonly found in the default Xkb layout, such as left tab and compose, and keys frequently used for custom modifiers such as Meta, Hyper, and Level5 Shift.
As these keys aren't Unicode code points and don't have associated scancodes (at least on modern keyboards), they are placed in the new extended key code space, with bit 30 set as a flag.
2025-01-09 17:26:41 -05:00
Frank Praznik
e5966bbdb1
x11: Add support for Mod3 and more esoteric Xkb configurations
...
Adds support for Mod3, which is usually Level 5 shift, as well as not altering the functionality of the more esoteric modifier keys, such as meta and hyper.
Also use the system modifier state instead of setting them based on key presses, which may be incorrect due to remapping, or toggled in some other manner.
2025-01-09 17:26:41 -05:00
Frank Praznik
73ee99978d
wayland: Add support for Mod3 and more esoteric Xkb configurations
...
Adds support for Mod3, which is usually Level 5 shift, but can vary, as well as not altering the functionality of the more esoteric modifier keys, such as meta and hyper.
2025-01-09 17:26:41 -05:00
Anonymous Maarten
ebaa30d339
__debugbreak was introduced in Microsoft Visual Studio 2003
2025-01-09 16:04:14 -05:00
Anonymous Maarten
c8f3f1b461
_BitScanReverse was introduced in Microsoft Visual Studio 2005
2025-01-09 16:04:14 -05:00
Anonymous Maarten
a78104a47f
Disable long long support in the headers with SDL_NOLONGLONG
...
Some older toolchains don't support 'long long'.
2025-01-09 16:04:14 -05:00
Ethan Lee
6cdde10edb
gpu: Metal depth write should behave like Vulkan/D3D12
2025-01-09 15:28:26 -05:00
SDL Wiki Bot
dd0dc64d51
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-09 20:15:17 +00:00
SDL Wiki Bot
c688853a82
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-09 19:47:47 +00:00
Ryan C. Gordon
507593f485
wikiheaders: Allow symbols to be filtered from manpage generation by regex.
...
This is specifically to prevent generating a manpage for "Uint32" and friends.
Fixes #11898 .
2025-01-09 14:13:00 -05:00
Ethan Lee
7acf78ba92
storage: Trim the title storage root from enumerated paths
2025-01-09 13:50:52 -05:00
Frank Praznik
037cd25a22
win32: Use the pending size during NCCALCSIZE
...
Non-resizable windows still need to apply the pending size, as they can be resized programmatically.
Fixes programmatically resizing windows without the WS_THICKFRAME style.
2025-01-09 12:27:05 -05:00
Cameron Cawley
e8916b2608
pipewire: Use byte order pixel format aliases
2025-01-09 09:52:30 -05:00
SDL Wiki Bot
d2090d1c80
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-09 06:38:16 +00:00
Ryan C. Gordon
3f7f632e14
audio: Added SDL_AudioDeviceStreamPaused.
...
We had the other two wrapper functions to pause and resume, and forgot query.
2025-01-09 01:36:57 -05:00
Ryan C. Gordon
f61860fa93
testautomation: fixed incorrect test.
...
The test was doing this:
- The output size is 80x60
- The logical size is 40x30
- The viewport is { 10, 7, 40, 30 }
- Draw to fill this whole viewport.
This would offset the filled rectangle a little, as before, but then the
viewport was the size of the entire logical space, so it wasn't a rectangle
centered in the middle of the output, as was expected.
This used to produce the expected output before the fix in
fa7a529912 . But it appears the test was
incorrect, so this tweaks the viewport to produce the expected result.
2025-01-08 23:33:39 -05:00
Ryan C. Gordon
4bb3c2a1c7
render: Some cleanups.
...
Mostly setting NULL pointers to a local struct instead of copying non-NULL
pointers' contents into the local struct.
2025-01-08 14:59:28 -05:00
Ryan C. Gordon
61bdbacdae
render: SDL_RenderTextureTiled shouldn't try to drop draw calls, either.
2025-01-08 14:59:28 -05:00
Ryan C. Gordon
f044a3d6ca
Revert "render: GetRenderViewportSize shouldn't use scale, just logical presentation."
...
This reverts commit ef758d05c1 .
Turns out the bug in #11076 was that we were dropping texture draws
incorrectly, not that scale shouldn't be applied here. The dropped draw calls
were fixed in bf85320947 , and this revert is
making the renderer consistent again.
2025-01-08 14:59:27 -05:00
Ryan C. Gordon
fa7a529912
render: GetRenderViewportSize shouldn't scale viewport dimensions.
...
These are already scaled for the logical presentation (unless using the pixel
dimensions instead; we still scale those here).
Fixes #11704 .
2025-01-08 14:59:27 -05:00
SDL Wiki Bot
1636009511
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-08 19:57:05 +00:00
Ryan C. Gordon
bf85320947
render: Don't try to drop draws outside of the viewport.
...
It didn't take scale into account, and the backends would need to do clipping
anyhow, so let the system figure that out for us at the lower level.
Fixes #11318 .
2025-01-08 11:55:10 -05:00
Frank Praznik
f2f04e825d
tests: Fix get/set window size test being skipped
...
A return check conversion was missed when the SDL_* functions were converted to return boolean values instead of int, which caused this test to be skipped.
2025-01-08 11:02:45 -05:00
SDL Wiki Bot
cbdbd66e18
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-08 15:33:53 +00:00
Simon McVittie
ef1fdf11bd
tray: Create tray icons for libappindicator securely
...
If we write directly to filenames in /tmp, we're subject to
time-of-check/time-of-use symlink attacks on most systems (although
recent Linux kernels mitigate these by default). We can avoid these
attacks by securely creating a directory owned by our own uid,
and doing all our file I/O in that directory. Other uids cannot create
symbolic links in that directory, so we are protected from symlink
attacks.
This does not protect us from an attacker that is running with the same
uid, but if such an attacker exists, then we have already lost.
Resolves: https://github.com/libsdl-org/SDL/issues/11887
Signed-off-by: Simon McVittie <smcv@collabora.com >
2025-01-08 07:26:02 -08:00
Sam Lantinga
e6bb50a710
Updated to version 3.1.9 for development
2025-01-07 17:51:00 -08:00
SDL Wiki Bot
6b34c9fe7f
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-08 01:50:36 +00:00
Sam Lantinga
22422f7748
Fixed ABI compatibility with 3.1.6
2025-01-07 17:32:59 -08:00
Sam Lantinga
d7b10d05b1
Updated to version 3.1.8 for the preview release
2025-01-07 17:04:05 -08:00
Simon McVittie
4290fc8bda
tray: Load GTK and libappindicator by versioned names, except on OpenBSD
...
We are expecting a specific ABI (we can see that from the declarations
listed in this file) and the whole point of SONAME versioning is to
say that the library conforms to a specific ABI. If the SONAME is not
the one we expect, then calling its functions is likely to crash.
As usual, an exception to this is that OpenBSD does not use SONAME
versioning.
Signed-off-by: Simon McVittie <smcv@collabora.com >
2025-01-07 14:02:01 -08:00
Simon McVittie
6b38d250aa
tray: Don't try to use GTK 2 versions of libappindicator
...
We use GTK 3 functions in this file, so we cannot load a libappindicator
whose SONAME indicates that it is using GTK 2.
Signed-off-by: Simon McVittie <smcv@collabora.com >
2025-01-07 14:02:01 -08:00
Simon McVittie
bba066c44c
tray: Don't call g_object_unref(NULL)
...
g_object_unref() only accepts valid object instances.
Signed-off-by: Simon McVittie <smcv@collabora.com >
2025-01-07 14:01:08 -08:00
ritalat
0bc370dfba
Android doc cleanup
2025-01-07 16:56:29 -05:00
Ryan C. Gordon
6934c910b3
opengl: use GL_UNSIGNED_BYTE instead of GL_UNSIGNED_INT_8_8_8_8_REV.
...
This seems to be significantly more efficient on some modern platforms, but if
this turns out to be a widespread disaster, we can revert it.
2025-01-07 16:08:56 -05:00
Sam Lantinga
0176a19aee
Fixed platform define condition for Windows phone
...
Fixes https://github.com/libsdl-org/SDL/issues/11876
2025-01-07 08:47:54 -08:00
Ryan C. Gordon
0180ca541e
windows: Catch WM_POINTERCAPTURECHANGED events.
...
Fixes #11844 .
2025-01-07 10:22:15 -05:00
Ozkan Sezer
8ec576ddab
tray, windows: fix logic error from commit 1167cf54e1
2025-01-07 10:15:40 +03:00
Sam Lantinga
748f0b3201
Improved Steam Controller detection on iOS
2025-01-06 17:16:23 -08:00
Frank Praznik
ba1a980535
wayland: Only apply the toplevel bounds when initially mapping the window
...
The size shouldn't be clamped to the bounds after the window is mapped, or an explicitly requested user size may be overwritten.
2025-01-06 17:07:16 -05:00
Frank Praznik
28389f1c38
wayland: Apply toplevel bounds to windows
...
Apply the supplied xdg-toplevel bounds to resizable windows during initial mapping. Libdecor functionality will have to be added separately, as the functionality needs to be added to the library first.
2025-01-06 16:06:03 -05:00
Sam Lantinga
ef52a4d4df
Fixed warning C4389: '==': signed/unsigned mismatch
2025-01-06 12:03:45 -08:00
Sam Lantinga
8d8649b33f
Fixed error: returning 'SDL_TrayEntry **' from a function with incompatible return type 'const SDL_TrayEntry **'
2025-01-06 11:35:54 -08:00
Sam Lantinga
f8b13dadd7
Enabled warning level 4 on Visual Studio
...
This catches uninitialized variables, etc. and matches Steam's warning level
2025-01-06 11:30:36 -08:00
Sam Lantinga
1167cf54e1
Fixed warning C4706: assignment within conditional expression
2025-01-06 11:30:28 -08:00
Sam Lantinga
8a9b7ae8d1
Switched nEntries to int, to avoid signed/unsigned comparison warnings
...
Also standardized memory allocation calls to match SDL style
2025-01-06 11:29:28 -08:00
Sam Lantinga
fb4ec07119
Fixed warning C4701: potentially uninitialized local variable 'previous_context' used
2025-01-06 11:18:45 -08:00
Ryan C. Gordon
b674b715f5
fix integer overflow ub in testautomation_sdltest
...
(cherry-picked from commit f804293a27 )
2025-01-06 13:18:03 -05:00
Ryan C. Gordon
1e1442ed4a
README-migration.md: Note the GL/EGL library environment variable removals.
2025-01-06 13:12:31 -05:00
Ryan C. Gordon
d8c7006a42
README-migration.md: Removed obsolete documentation.
...
Fixes #11434 .
2025-01-06 13:07:21 -05:00
Ryan C. Gordon
6473de59b7
SDL_keyboard.h: Note that SDL_GetKeyName() returns uppercase letters.
...
Reference Issue #11434 .
2025-01-06 12:47:44 -05:00
SDL Wiki Bot
c7584df999
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-06 16:17:26 +00:00
Ryan C. Gordon
1f54b228ff
video: Convert some EGL environment variables to SDL hints.
...
Fixes #10479 .
2025-01-06 11:15:26 -05:00
Sam Lantinga
7c9f6c6313
Remove debug logging
2025-01-05 20:06:50 -08:00
SDL Wiki Bot
19ddb29d2d
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-06 02:54:14 +00:00
Ryan C. Gordon
d16f76e3d4
wasapi: Don't crash/hang if transitioning to/from a Remote Desktop Connection.
...
Fixes #9673 .
2025-01-05 21:53:35 -05:00
Ryan C. Gordon
742f2a2fad
SDL_render.h: Improve SDL_ConvertEventToRenderCoordinates documentation.
...
Fixes #9424 .
2025-01-05 20:55:42 -05:00
Frank Praznik
2b375d9704
wayland: Don't enable the text-input protocol when using Fcitx
...
Otherwise, key repeat will be broken. Enabling it under Wayland isn't recommended anyway.
2025-01-05 17:53:58 -05:00
Semphris
dcc645e413
Fix HTML examples template tabs
...
Tab labels now follow their drawer again. Also, to avoid tabs covering
up code or debugging logs, the tab label that's on top (and therefore
not automatically hidden behind the other drawer when that drawer
opens) will now automatically hide itself when the other drawer is
opened.
2025-01-05 11:39:20 -08:00
SDL Wiki Bot
ece6a6ed8f
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-05 19:12:20 +00:00
Ryan C. Gordon
7f9ee31024
include: Fill in more category documentation.
...
Reference Issue #11874 .
2025-01-05 14:11:11 -05:00
Anonymous Maarten
16ad3e5af6
cmake: consider X11 as not available when xext.h is not found
...
This is user friendlier than straight up erroring
2025-01-05 16:05:25 +01:00
David Gow
0ae57f1d90
tray: unix: Shutdown the GTK thread when not in use
...
When using the libappindicator/gtk/unix Tray backend, the background
thread which calls gtk_main() is never destroyed. This means that we
detect a leaked thread as SDL_Quit().
Instead, tell gtk to shut down its main loop when no tray icons are
active. This fixes the issue here: SDL notices no leak, and repeatedly
creating / destroying tray icons seems to work fine.
Signed-off-by: David Gow <david@ingeniumdigital.com >
2025-01-05 02:51:12 -08:00
Ryan C. Gordon
6a0405b933
testautomation: Added a test to stdlib_swprintf that previously would fail.
2025-01-05 02:45:15 -05:00
Kim Giseo
9f2186ad52
Removed outdated comment in AndroidManifest.xml
2025-01-04 19:25:00 -08:00
Ryan C. Gordon
181995b44f
stdlib: Reworked SDL_vswprintf to be more efficient and return correct values.
...
Fixes #11729 .
2025-01-04 21:55:07 -05:00
Erik Soma
8509041a09
video: Fix SDL_GL_GetAttribute depth/stencil size when 0
2025-01-04 18:57:48 -05:00
Ryan C. Gordon
344e394bf4
camera: Favor v4l2 over pipewire, for now.
...
Reference Issue #11473 .
Reference Issue #9776 .
Reference Issue #11819 .
Reference Issue #9989 .
Reference Issue #10842 .
2025-01-04 16:11:57 -05:00
SDL Wiki Bot
d8c679416b
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-04 19:04:41 +00:00
Semphris
b6dc44b133
Support dark theme for tray menus on Windows
2025-01-04 11:04:21 -08:00
Semphris
7673b84f52
Make SDL_GetTrayEntires() NULL-terminated
2025-01-04 10:56:19 -08:00
Katelyn Gadd
a58bc3eaf4
[GPU] Fix crash in nvidia user-mode win32 driver when game window is minimized during swapchain resize ( #11848 )
2025-01-04 10:25:08 -08:00
Susko3
0a5d2f3da2
Handle pen eraser button as a second button
2025-01-04 05:27:06 -05:00
Ryan C. Gordon
3519ef3b3b
SDL_asyncio.h: Fixed various datatype's \since documentation.
2025-01-04 04:10:15 -05:00
Ryan C. Gordon
56d7cc7a02
SDL_video.h: Added a note about platform quirks to SDL_DestroyWindow docs.
...
Fixes #10081 .
2025-01-04 03:48:10 -05:00
SDL Wiki Bot
04f3bdb118
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-04 08:24:05 +00:00
Ryan C. Gordon
18c6958cae
SDL_vulkan.h: Improve SDL_Vulkan_LoadLibrary/SDL_Vulkan_UnloadLibrary docs.
...
Fixes #9541 .
2025-01-04 03:22:34 -05:00
Daniel Wymark
522682cd6e
Add detailed documentation on building with MinGW64 ( #11780 )
2025-01-03 21:07:38 -08:00
Sam Lantinga
a4cd17cce5
Fixed building on macOS with the dialog subsystem disabled
2025-01-03 16:17:16 -08:00
Anonymous Maarten
efba42a67b
tests: avoid undefined signed overflow
2025-01-04 01:06:29 +01:00
Sam Lantinga
156b3b4a8c
Fixed language detection on iOS
...
On iOS you might see traditional Chinese on a US phone as: "zh-Hans_US"
2025-01-03 15:27:08 -08:00
Anonymous Maarten
53aaf8c26b
cmake: custom generate-XXX targets must depend on outputs
2025-01-04 00:19:45 +01:00
SDL Wiki Bot
9b40d43b1f
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-03 22:37:37 +00:00
Frank Praznik
85851459d6
docs: Note that using the Wayland display scaling mode can have imprecision when positioning due to unit conversion and rounding
2025-01-03 17:36:36 -05:00
Anonymous Maarten
db97da4ccb
ci: bump FreeBSD to 14.2
...
[sdl-ci-filter netbsd]
[sdl-ci-filter freebsd]
2025-01-03 23:24:41 +01:00
Frank Praznik
5579010b6a
wayland: Adjust the scaled popup position even if the dimensions didn't change
...
Otherwise, the unscaled position will be sent.
2025-01-03 17:17:16 -05:00
Ryan C. Gordon
2d37903323
pen: implement pen support for Windows.
...
Fixes #10516 .
2025-01-03 12:58:49 -05:00
Sam Lantinga
ef21ccf080
Create a separate metal shader for NV12 textures
...
Also unify the color output function so it works with the various combinations of input and output colorspaces.
Fixes https://github.com/libsdl-org/SDL/issues/11727
2025-01-03 09:30:47 -08:00
Sam Lantinga
49663bfb58
Make Windows dialogs DPI aware
...
Fixes https://github.com/libsdl-org/SDL/issues/4775
Fixes https://github.com/libsdl-org/SDL/issues/9691
2025-01-03 09:25:10 -08:00
Sam Lantinga
a8c41135aa
Enable themed Windows dialogs when building with Visual Studio
2025-01-03 09:25:10 -08:00
Anonymous Maarten
8b83a57847
Check that dll's built by MinGW do not link to unwanted runtime libraries
2025-01-03 16:56:22 +01:00
Ryan C. Gordon
e484182765
testcamera: Log the camera backend in use.
2025-01-03 03:46:22 -05:00
SDL Wiki Bot
011454b237
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-03 03:10:47 +00:00
Sam Lantinga
efc390d7e2
Don't log SDL errors by default
...
There are many recoverable errors that may happen internally and can be safely ignored if the public API doesn't return an error code. Seeing them causes lots of developer anxiety and they generally aren't helpful.
Fixes https://github.com/libsdl-org/SDL/issues/11813
2025-01-02 17:32:10 -08:00
Sam Lantinga
c077b7a918
Fixed the version availability of SDL_HINT_JOYSTICK_ENHANCED_REPORTS
2025-01-02 17:28:45 -08:00
SDL Wiki Bot
0b520cd4b4
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-03 01:18:56 +00:00
Sam Lantinga
9f7b2c3595
Fixed incorrect error message when a joystick can't be opened
2025-01-02 17:18:09 -08:00
Sam Lantinga
2c0a8363a5
Added SDL_HINT_JOYSTICK_ENHANCED_REPORTS
...
This hint defaults on, enabling advanced controller features.
This replaces SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE and SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, and is supported by PlayStation and Nintendo Switch controllers.
Fixes https://github.com/libsdl-org/SDL/issues/10086
2025-01-02 17:18:09 -08:00
SDL Wiki Bot
95d44f11c7
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-02 20:40:15 +00:00
SDL Wiki Bot
16dfaca728
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-02 20:06:39 +00:00
SDL Wiki Bot
32ab09ba21
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-02 19:44:57 +00:00
Frank Praznik
1461f893c3
video: Correct the window position property documentation
...
Windows are only relative to the parent if the "tooltip" or "menu" property is set.
2025-01-02 14:44:08 -05:00
SDL Wiki Bot
a63052db96
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-02 19:17:51 +00:00
Sam Lantinga
dd6b484359
Document platform gamepad hotplug requirements
...
Fixes https://github.com/libsdl-org/SDL/issues/11742
2025-01-02 11:16:35 -08:00
Sam Lantinga
ecf8dd054d
Show the display content scale in SDLTest_CommonDrawWindowInfo()
2025-01-02 10:58:15 -08:00
Sam Lantinga
4797970bfa
Enable SDL_HINT_JOYSTICK_THREAD by default
...
If you're not using SDL for video you won't get raw input messages without this hint, and this is tripping up enough people it makes sense to have this enabled by default. There isn't much downside to this, other than having another thread processing Xbox controller input.
Fixes https://github.com/libsdl-org/SDL/issues/10576
2025-01-02 10:25:18 -08:00
Sam Lantinga
6b4b9b5f2b
Improved XInput controller detection
...
Sometimes we'll get a Windows.Gaming.Input callback before the raw input device is even in the list, so try some other methods to better detect XInput devices.
2025-01-02 10:25:18 -08:00
Frank Praznik
8ea4b326b3
video: Fix focus when non-focused popup windows are hidden
...
Fix focus issues when a popup that is the child of a window that does not currently have keyboard focus is hidden or destroyed.
2025-01-02 13:24:24 -05:00
Katelyn Gadd
67ea67f191
Fix mip generation for 2x1 textures on D3D12
2025-01-02 13:17:06 -05:00
Erik Soma
c6b5c21aaf
clipboard: Ensure SDL_ClearClipboardData clears data even when no data has been set
2025-01-02 07:23:27 -08:00
Anonymous Maarten
f8f8d87bfa
ci: always create binary packages if build succeeded
2025-01-02 01:15:28 +01:00
Anonymous Maarten
b713e7581b
stdlib: fix SDL_strtol of "0" with base 0
...
SDL_strtol("0") skipped the "0" octal prefix
and returned a failure because the remainder of the string was empty.
2025-01-02 01:15:28 +01:00
Ozkan Sezer
54752f8d1c
SDL_malloc.c: replace FORCEINLINE usage with SDL_FORCE_INLINE
2025-01-02 01:15:28 +01:00
Anonymous Maarten
3842384a38
dynapi: trigger a breakpoint on a fatal error when SDL is built in debug mode
2025-01-02 01:15:28 +01:00
Anonymous Maarten and Ozkan Sezer
6cf6b160cd
SDL_hashtable: don't use assert from libc
...
Co-authored-by: Ozkan Sezer <sezeroz@gmail.com >
2025-01-02 01:15:28 +01:00
Anonymous Maarten
62bc2c4c92
SDL_malloc: don't define FORCEINLINE
...
The FORCEINLINE macro is also used by Windows SDK headers.
When it is an empty macro, FORCEINLINE-d functions will
get global visibility error and cause duplicate symbol link errors.
HRESULT_FROM_WIN32 is such a function.
2025-01-02 01:15:28 +01:00
Anonymous Maarten
4fccfb142e
cmake: avoid security cookies in SDL_uclibc when building with -DSDL_LIBC=ON
2025-01-02 01:15:28 +01:00
Anonymous Maarten
4fbf59ac3a
Implement __chkstk for arm64
...
Lifted from a previously built SDL3.dll
2025-01-02 01:15:28 +01:00
Anonymous Maarten
578ac0ef52
SDL_malloc: disable malloc stats
...
This avoids bringing in stdio.
2025-01-02 01:15:28 +01:00
Anonymous Maarten
31a4c92ee5
When building with libc enabled, we don't need to provide __chkstk ourselves
2025-01-02 01:15:28 +01:00
Sam Lantinga
02e85a153f
Use the expected plane size when capturing Android camera frames
...
On the Samsung Galaxy A52 the camera plane size is (pitch * (h - 1) + w) instead of (pitch * h). This led to us copying off the end of the plane when uploading the texture, so we pad out to our expected size.
2025-01-01 15:58:27 -08:00
Sam Lantinga
9955e1dc0d
Updated the Android gradle plugin to version 8.7.3
2025-01-01 14:33:18 -08:00
Sam Lantinga
0281071243
Lock joysticks when they are connected/disconnected on emscripten
...
Fixes https://github.com/libsdl-org/SDL/issues/11499
2025-01-01 13:51:47 -08:00
SDL Wiki Bot
c68ed04a06
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-01 21:27:47 +00:00
Frank Praznik
2b1d809b21
video: Fix positioning and focusing popups parented to child toplevel windows
...
Find the toplevel parent window, not the absolute highest toplevel window in the hierarchy, when positioning and adjusting the focus of popup windows.
Fixes a leftover case from when toplevel windows couldn't be parented to other toplevels.
2025-01-01 14:40:29 -05:00
SDL Wiki Bot
6d554a9ea3
Sync SDL3 wiki -> header
...
[ci skip]
2025-01-01 16:06:00 +00:00
Sam Lantinga
9fbc767d4f
Fixed formatting of SDL_storage documentation
2025-01-01 08:05:20 -08:00
Sam Lantinga
e43aa12b49
Updated copyright for 2025
2025-01-01 08:01:29 -08:00
Sam Lantinga
c0e5901c42
Reverted accidentally committed work in progress
2025-01-01 07:54:55 -08:00
Sam Lantinga
f2074d7af3
Updated copyright for 2025
2025-01-01 07:45:52 -08:00
Sam Lantinga
3197e27b59
testcamera: fixed return codes
2024-12-31 19:27:11 -08:00
Sam Lantinga
f18e023317
Added testclipboard
2024-12-31 19:27:11 -08:00
Sam Lantinga
54d4e48539
Get the initial clipboard state at startup
2024-12-31 19:27:11 -08:00
Sam Lantinga
6575b8157b
Synchronize clipboard mime types with external clipboard updates
...
Fixes https://github.com/libsdl-org/SDL/issues/8338
Fixes https://github.com/libsdl-org/SDL/issues/9587
2024-12-31 19:27:11 -08:00
Sam Lantinga
30a22d3fed
Allow a NULL size parameter to retrieve null terminated text
2024-12-31 19:27:11 -08:00
Sam Lantinga
d666c2d189
Use a consistent error message when video isn't initialized
2024-12-31 19:27:11 -08:00
Sam Lantinga
196e2c6662
Fixed crash if num_mime_types is NULL
2024-12-31 19:27:11 -08:00
Sam Lantinga
b902b0527b
Renamed n_mime_types to num_mime_types
2024-12-31 19:27:11 -08:00
Sam Lantinga
a767952617
Fixed spacing
2024-12-31 19:27:11 -08:00
Sam Lantinga
54c555e394
Send supported mime types for external clipboard contents on Windows
2024-12-31 19:27:11 -08:00
Sam Lantinga
8b155708ff
Fixed clipboard memory leak on shutdown
2024-12-31 19:27:11 -08:00
Frank Praznik
1d417ab27f
win32: Set the WS_THICKFRAME style on popup windows
...
Without it, programmatically resizing the window seems to fail. As popup windows are implicitly borderless, calculations taking the frame size into account need to be avoided.
2024-12-31 18:29:59 -05:00
Frank Praznik
643281d022
Revert "win32: Use the size in the WINDOWPOS data while handling popup windows in the WM_WINDOWPOSCHANGED message"
...
This reverts commit 4f0a056b95 .
2024-12-31 18:29:59 -05:00
Willem Dinkelspiel
2be89f0dd1
Clarify migration for GetWindowData and SetWindowData
2024-12-31 15:00:39 -08:00
SDL Wiki Bot
a37f993a07
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-31 22:56:38 +00:00
Ethan Lee
65e0fed5b3
gpu: Document why VertexID/InstanceID builtins are unreliable
2024-12-31 17:56:02 -05:00
Frank Praznik
dd83908109
keyboard: Check for both caps lock and shift when looking up a keycode by name
2024-12-31 15:17:32 -05:00
SDL Wiki Bot
99ad53ec3f
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-31 19:44:29 +00:00
Frank Praznik
df97ccf283
win32: Return 0 from WM_WINDOWPOSCHANGING if a resize is expected
...
This was accidentally removed while deleting some associated dead code.
2024-12-31 14:02:44 -05:00
Frank Praznik
4f0a056b95
win32: Use the size in the WINDOWPOS data while handling popup windows in the WM_WINDOWPOSCHANGED message
...
GetClientRect() returns old, incorrect size data for popup windows when called while processing the WM_WINDOWPOSCHANGED message, so use the WINDOWPOS data instead.
Popups can't be maximized or fullscreen, so no need to worry about a move event resizing them.
2024-12-31 13:33:11 -05:00
SDL Wiki Bot
18fc13c20d
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-31 18:00:37 +00:00
SDL Wiki Bot
6d20b65a9e
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-31 17:58:37 +00:00
Ethan Lee
3cd3c9317e
storage: Add error messages when ReadIO/WriteIO lengths mismatch
2024-12-31 12:34:12 -05:00
SDL Wiki Bot
6ca2a48595
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-31 16:20:17 +00:00
Ryan C. Gordon
fa9c3331d5
main: Adjust how SDL_HINT_MAIN_CALLBACK_RATE works.
...
Now (only in the generic backend, where it is implemented), this hint is
always respected. Previously it would only be used if no windows were created,
to help reduce CPU load on things like loopwave.
Since it's always used now, the default has changed from 60 (Hz) to 0 (run as
fast as possible). Things like loopwave should still likely force this way
lower than the previous default (and already do: loopwave explicitly sets it
to 5).
The hint can now also be set to "waitevent" which will cause SDL_AppIterate
to only be called after new events have arrived, for apps that are entirely
driven by input and want to consume (almost) no power or CPU time until then.
Fixes #11093 .
Fixes #11387 .
2024-12-31 08:19:38 -08:00
Ethan Lee
cd1bd0ac2e
storage: Remove an outdated FIXME.
...
Woops ended up doing GPU stuff instead, maybe after 3.2!
2024-12-31 10:46:42 -05:00
Végh Márton
0be5b8070d
Update SDL_asyncio.c
2024-12-30 23:29:21 -08:00
Sam Lantinga
1c04ebe423
Renamed SDL_ASYNCIO_CANCELLED to SDL_ASYNCIO_CANCELED
2024-12-30 19:13:02 -08:00
Sam Lantinga
d4d5faedab
Added SDL_EVENT_FINGER_CANCELED
...
Fixes https://github.com/libsdl-org/SDL/issues/10528
2024-12-30 19:13:02 -08:00
Sam Lantinga
8704ab8422
Wait for a display resize event before sending orientation changes
...
Fixes https://github.com/libsdl-org/SDL/issues/9585
2024-12-30 15:49:10 -08:00
Sam Lantinga
60deaf5f0f
Send display mode change events when the orientation changes
2024-12-30 15:24:38 -08:00
Sam Lantinga
5340f2e3fe
Updated to the latest version of gradle, with support for Android SDK 35
2024-12-30 13:13:52 -08:00
Sam Lantinga
e91c37f4dd
Added support for inset handling on Android 15
2024-12-30 12:23:00 -08:00
Petar Popovic
f3cbd04a81
Fix C99 trailing enum comma warning.
2024-12-30 17:21:02 +03:00
Petar Popovic
5f25691c85
Fix C23 empty initializer warning.
2024-12-29 18:17:24 -08:00
Frank Praznik
8cc4735d74
wayland: Don't override the min/max values when scaling to the screen
...
The point/pixel conversion functions should return zero when passed zero, or the min/max calculations can break.
2024-12-29 18:01:13 -05:00
Semphris
2d91f096ca
Remove libc function from Windows tray
2024-12-30 01:20:12 +03:00
SDL Wiki Bot
78c1dc3e2c
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-29 20:32:50 +00:00
Sam Lantinga
0410328b15
Fixed warning: ordered comparison of pointer with integer zero
2024-12-29 12:05:34 -08:00
Anonymous Maarten
d5f08b8f4b
stdinc: use __has_include to detect <stdbool.h>
...
Newer emscripten SDK does an unconditional #include <stdbool.h>,
which clashes with our custom bool.h typedef
2024-12-29 20:54:12 +01:00
Anonymous Maarten
543f244965
tests: include SDL_build_config.h when HAVE_BUILD_CONFIG is defined
2024-12-29 20:08:06 +01:00
Ozkan Sezer
c2121dd9a2
testcamera: fix MSVC build failure due to C4244 warning.
2024-12-29 21:28:02 +03:00
Sam Lantinga
5c84d38822
testcamera: don't pick a frame size larger than the maximum texture size
...
Ran into this on a Huawei Y6 phone, where the back facing camera can generate 4160x2000 frames, but the maximum texture size was 4096x4096
2024-12-29 09:41:00 -08:00
Sam Lantinga
6e1177ac03
Include tray function prototypes
2024-12-29 08:15:30 -08:00
Ryan C. Gordon
c030e6f782
examples/pen/01-drawing-lines: Match render target size to renderer output.
...
Otherwise, on HiDPI displays (like a retina iPad), the lines you draw don't
match where the pen is touching.
2024-12-28 15:36:02 -05:00
Ryan C. Gordon
0ad3a18937
uikit: reworked Apple Pencil code.
...
This manages axes correctly across events, sorts out the math to convert from
Apple's data to what SDL expects, and a few other tweaks and corrections.
2024-12-28 15:36:02 -05:00
Ryan C. Gordon
f6143da617
uikit: Patched to compile, added to Xcode project.
2024-12-28 15:36:02 -05:00
Salman Alshamrani
774e38d073
uikit: Initial Apple Pencil support.
...
Reference Issue #9911 .
Reference Issue #10516 .
2024-12-28 15:36:02 -05:00
Frank Praznik
5acd7fe208
wayland: Prevent popup configure events from overwriting the current size with old data
...
Don't apply the supplied dimensions if they haven't changed from the last configuration event, or a newer size set programmatically can be overwritten by old data.
This check is already being done for toplevel windows, but was never added to the popup configure event.
2024-12-28 14:23:30 -05:00
Sam Lantinga
c714b1a38b
Fixed public header inclusion in the Xcode project
2024-12-28 08:47:00 -08:00
Ramez Ragaa
cf439d5c63
Fix dib-to-bmp logic in SDL_windowsclipboard.c
...
This addresses the issue #11762 by reading the biCompression field to
determine the correct size of the color table, and consequently the
correct bih_size value.
2024-12-28 08:31:52 -08:00
Sam Lantinga
ec29d3fd66
Define NDEBUG in release Xcode builds
2024-12-28 08:25:09 -08:00
Sam Lantinga
92b7054870
Add SDL_tray.h to the public framework headers
...
Fixes https://github.com/libsdl-org/SDL/issues/11760
2024-12-28 08:15:19 -08:00
SDL Wiki Bot
1a466b5548
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-28 16:06:09 +00:00
Ozkan Sezer
ec8a780ad4
tray, unix: fix -Wformat warnings
...
src/tray/unix/SDL_tray.c: In function 'get_tmp_filename':
src/tray/unix/SDL_tray.c:345: warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'
src/tray/unix/SDL_tray.c: In function 'get_appindicator_id':
src/tray/unix/SDL_tray.c:361: warning: format '%ld' expects type 'long int', but argument 3 has type 'unsigned int'
2024-12-28 18:37:56 +03:00
Anonymous Maarten
cc723c9e4b
ci: run emscripten on Ubuntu 22.04
...
python3-selenium does not seem to work on Ubuntu 24.04
2024-12-28 16:20:59 +01:00
Anonymous Maarten
0cb4a94c88
cmake: really disable xrandr by default on Solaris
...
Fixes libsdl-org/SDL#10099
2024-12-28 11:55:59 +01:00
SDL Wiki Bot
4ffcb8ebab
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-28 07:58:04 +00:00
Carl Åstholm
49153ebfc4
audio: Add NULL check to SDL_UnbindAudioStreams
2024-12-28 00:10:58 -05:00
Carl Åstholm
1b99467c71
audio: Make SDL_Bind/UnbindAudioStreams take const arrays
2024-12-28 00:10:58 -05:00
Anonymous Maarten
0be6dc5734
cmake: disable xrandr by default on Solaris
...
Fixes libsdl-org/SDL#10099
2024-12-28 04:01:32 +01:00
Anonymous Maarten
4fbd6cba60
cmake: Solaris' SunPro has alternative way to link to pthread libraries
...
Fixes libsdl-org/SDL#10096
2024-12-28 03:46:17 +01:00
Anonymous Maarten
e25cc7a88f
cmake: cocoa video backend needs IOKit framework
...
Fixes libsdl-org/SDL#11628
2024-12-28 03:41:36 +01:00
Anonymous Maarten
38dd6bcd32
docs: gradle needs package identifier + change example Activity class path
2024-12-28 03:22:53 +01:00
Anonymous Maarten
f1232de3d2
cmake: add_dependencies must have at least 2 arguments
2024-12-28 02:43:12 +01:00
Anonymous Maarten
2664d36faf
cmake: avoid parallel generation of headers through intermediate target
...
See
https://cmake.org/cmake/help/latest/command/add_custom_command.html#example-generating-files-for-multiple-targets
2024-12-28 02:39:12 +01:00
SDL Wiki Bot
609b147432
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-28 01:12:59 +00:00
Lucas Murray
cc24518c41
render: Update GPU backend to use the new present workflow
2024-12-27 17:11:55 -08:00
Carl Åstholm
a0e537b9c0
examples: Fix dead links in app metadata
2024-12-27 17:10:52 -08:00
Anonymous Maarten
df1f1c2e12
cmake: don't create relocatable packages by default with non-MSVC toolchains
2024-12-28 02:04:00 +01:00
Anonymous Maarten
af3d97dcac
Update build-scripts/build-release.py
2024-12-28 01:41:10 +01:00
Frank Praznik
bc448fa445
win32: Use the nearest monitor size for calculating maximized window dimensions
...
Default to using the nearest monitor, instead of null, as a null monitor can be sent when restoring from minimized, which results in the restored, maximized window being the wrong size.
2024-12-27 18:17:55 -05:00
Frank Praznik
599b4ef254
win32: Fix maximizing borderless windows
...
Even if a borderless window doesn't have resizable borders set, the WS_MAXIMIZEBOX property needs to be set on the window, or maximizing it will make it fullscreen and cover the taskbar, instead of only filling the usable desktop space, as is usually expected from a maximized window. This style property needs to be retained until the window is no longer maximized, even if the resize flag is toggled off, or restoring from minimized can fail.
2024-12-27 18:17:55 -05:00
Frank Praznik
1c52e290a3
video: Don't overwrite pending size values when setting the window min/max
2024-12-27 18:08:26 -05:00
Sam Lantinga
9a4d29699d
Don't use connection state from the Nintendo Switch Pro report
...
This isn't reliable for third party controllers like the 8BitDo Pro 2.
Fixes https://github.com/libsdl-org/SDL/issues/10862
2024-12-27 13:58:49 -08:00
Sam Lantinga
75a24116b5
testcontroller: show gamepad connection state
2024-12-27 13:58:49 -08:00
Sam Lantinga
22f6eed1d9
Use the NVIDIA Shield home button as the guide button
2024-12-27 12:42:06 -08:00
Sam Lantinga
c148837546
Added a Bluetooth mapping for the NVIDIA Shield Controller on Linux
2024-12-27 12:18:08 -08:00
Sam Lantinga
82a1e9f6df
Fixed the guide button for the NVIDIA Shield Controller on Linux
...
This works with firmware v1.25 and v1.35
2024-12-27 12:17:51 -08:00
Frank Praznik
ba5cf2b152
x11: Don't overwrite popup window coordinates when changing the size
2024-12-27 12:58:53 -05:00
Frank Praznik
567b828e18
wayland: Use the proper popup coordinates if the position is set while the window is hidden
2024-12-27 12:58:53 -05:00
SDL Wiki Bot
1701208f32
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-27 17:25:19 +00:00
Sam Lantinga
622c3ebb94
Updated Xcode project with new tray files
2024-12-27 09:24:49 -08:00
Semphris
0461180e25
SDL_EVENT_QUIT when no window nor tray
...
SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE will not fire if there are active tray icons. This impacts only applications that create tray icons, and that at least one icon outlives the last visible top-level window. SDL_EVENT_QUIT will fire when the last active tray is destroyed if there are no active windows.
2024-12-27 09:22:27 -08:00
SDL Wiki Bot
ff139fe71b
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-27 17:20:36 +00:00
Blaž Tomažič
e9290eeedf
Use pthread_setname_np also on Android
...
Set thread name on Android the same way as we do on Linux.
Acording to Bionic source code this function is available since 2013 [1] and
hase the same signature.
[1] https://android.googlesource.com/platform/bionic/+/2a1bb4e64677b9abbc17173c79768ed494565047
(cherry picked from commit e79b0ce2e4 )
2024-12-27 08:07:47 -08:00
Ozkan Sezer
578509c326
windows/SDL_tray.c, video/windows/SDL_surface_utils.h: use SDL_windows.h
2024-12-27 12:28:02 +03:00
Ozkan Sezer
05932e05da
tray, windows: replace ZeroMemory() with SDL_zero()
2024-12-27 12:05:00 +03:00
hwsmm
e2323c1367
Refactor Android input handling and add pen support
2024-12-26 23:50:11 -05:00
hwsmm
f5fbdf7ed5
Make onNativePen available for Android
2024-12-26 23:50:11 -05:00
hwsmm
a5e8fc21b2
Add SDL_androidpen
2024-12-26 23:50:11 -05:00
hwsmm
80c39f2ff4
Expose SDL_GetPenStatus for Android pen buttons
2024-12-26 23:50:11 -05:00
Ryan C. Gordon
e3c99e3bd3
misc: Fixed typo in iOS error message.
...
(cherry picked from commit 96b4535cc7 )
2024-12-26 23:37:16 -05:00
Sam Lantinga
1413bfb185
Don't overwrite non-CRC gamepad mapping with a new mapping that specifies a CRC
...
Fixes https://github.com/libsdl-org/SDL/issues/11723
2024-12-26 20:18:26 -08:00
Sam Lantinga
948b16533c
testcamera: use the first available cameras
2024-12-26 19:23:43 -08:00
Ozkan Sezer
cd1bb6247b
video/windows/SDL_surface_utils.c: replace ZeroMemory() with SDL_zero()
2024-12-27 06:03:37 +03:00
SDL Wiki Bot
a773558517
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-27 02:32:08 +00:00
Ozkan Sezer
50fbae9302
tray, windows: define NOTIFYICON_VERSION_4 and NIF_SHOWTIP, if missing.
2024-12-27 05:30:50 +03:00
Sam Lantinga
c744c8fc0b
Document how to check for gamepad capabilities
...
Fixes https://github.com/libsdl-org/SDL/issues/10593
2024-12-26 17:49:56 -08:00
Sam Lantinga
a8d585aac3
Don't try to enumerate possible texture failure reasons.
...
This can cause misunderstanding about how texture creation works, as seen in https://github.com/libsdl-org/SDL/issues/9504 . Instead let people check the error for more information on why creation may have failed.
2024-12-26 17:17:08 -08:00
Sam Lantinga
ca17d19f90
Updated iOS file path documentation
...
Fixes https://github.com/libsdl-org/SDL/issues/10290
2024-12-26 17:00:01 -08:00
Ryan C. Gordon
7bbe6025be
misc: Make SDL_OpenURL work with VisionOS, tvOS, etc.
2024-12-26 16:50:52 -08:00
Ryan C. Gordon
ffed1c50c0
misc: Fix SDL_OpenURL on newer iOS releases.
...
Apparently as of iOS 18.2, the deprecated API we were using just refuses to
work at all.
Fixes #11728 .
2024-12-26 16:50:52 -08:00
Frank Praznik
1a6e139dde
win32: Only recalculate the position on show for popup windows
...
Regular child windows aren't positioned relative to the parent.
2024-12-26 18:18:46 -05:00
Frank Praznik
cf220ea4f1
win32: Fix popup positioning
2024-12-26 17:12:14 -05:00
Ozkan Sezer
17ef0c1237
SDL_video.c: replace strlcpy with memcpy in SDL_ShowMessageBox()
2024-12-27 00:01:56 +03:00
Ryan C. Gordon
8fde28813e
SDL_tray.h: Filled in doxygen for a few minor missing things.
2024-12-26 14:10:53 -05:00
SDL Wiki Bot
17df3fe836
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-26 18:26:48 +00:00
Sam Lantinga
eb1be89e70
Cleaned up thread state handling and added thread object validation
2024-12-26 10:26:08 -08:00
SDL Wiki Bot
7647f16ae1
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-26 18:03:51 +00:00
Salman Alshamrani
eadc64973a
Reset text field content on text input stop
2024-12-26 10:03:34 -08:00
Lucas Murray
b2c2a483e8
GPU: Rename HDR10_ST2048 to HDR10_ST2084
2024-12-26 09:47:13 -08:00
Lucas Murray
fe39509b85
GPU: Doc touch ups
2024-12-26 09:47:13 -08:00
SDL Wiki Bot
b8036bdd41
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-25 21:15:58 +00:00
Moritz
ca4f5dd40d
Added SDL_GetThreadState
2024-12-25 13:15:18 -08:00
lunasorcery
b7dac5072b
correct termination of windows openfiledialog filters
2024-12-25 11:42:32 -08:00
Maia
0becdad392
Add missing includes to SDL_tray.h
2024-12-25 07:54:54 -08:00
Brody Eller
5bf742daa6
Fix documentation for SDL_sinf
2024-12-24 20:41:41 -08:00
Anonymous Maarten
bed16f77d1
cmake: define HAVE_MALLOC_H when malloc.h is found
2024-12-25 02:10:53 +01:00
Sam Lantinga
b2178857dc
Corrected CoreAudio surround sound channel layouts
...
Fixes https://github.com/libsdl-org/SDL/issues/11709
2024-12-24 15:03:25 -08:00
expikr
f40a530fd9
subclass the builtin system message class instead
2024-12-24 12:06:47 -08:00
Semphris
cf946e32ba
Fix memory management for Windows dialog title
2024-12-24 12:06:05 -08:00
SDL Wiki Bot
4c70aa33ae
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-24 18:50:21 +00:00
Sam Lantinga
76920a230f
Fixed Xcode build
2024-12-24 10:49:58 -08:00
Semphriss
01b9b0edb7
Add system tray support ( #10873 )
2024-12-24 10:36:39 -08:00
SDL Wiki Bot
17a029502a
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-24 17:37:33 +00:00
Caleb Cornett
a27c139b12
GPU: Explicitly check Metal hardware support on device creation
2024-12-24 12:36:52 -05:00
Caleb Cornett
aa817a67d1
GPU: Document system requirements for each driver
2024-12-24 12:36:52 -05:00
Sam Lantinga
8653a5821b
Fixed mingw64 Windows build
2024-12-24 08:58:08 -08:00
Sam Lantinga
60dce94583
Fixed building with older Windows SDKs
2024-12-24 08:26:05 -08:00
L zard
440d5754f8
build_configs: remove unused symbols_to_check, added Windows ones
2024-12-24 07:19:38 -08:00
L zard
052cb5773e
build_configs: remove HAVE_LIBUNWIND_H
...
It is only used in SDL_test, which does not use the config header.
2024-12-24 07:19:38 -08:00
L zard
42c67756cc
build_configs: fix spacing
...
I messed up some spacing, so I thought I might as well strip all those unnecessary spaces.
2024-12-24 07:19:38 -08:00
L zard
286cc2ebd0
build_config: change unnecessary replacement variables to 1
...
Makes all macros only used in `#ifdef`s defined as `1` when they exist, instead of the CMake value of the corresponding variable.
2024-12-24 07:19:38 -08:00
L zard
c2508d5d99
Fix various #if defineds
2024-12-24 07:19:38 -08:00
L zard
f2b7495adc
SDL_camera_pipewire: use SDL_CAMERA_DRIVER_PIPEWIRE_DYNAMIC
2024-12-24 07:19:38 -08:00
L zard
ade829d7ca
build_config: fix SDL_DEFAULT_ASSERT_LEVEL
...
Currently, `SDL_DEFAULT_ASSERT_LEVEL` is commented out by CMake when its value is 0, setting the assertions level to the default value instead of disabling them.
This change:
- defines `SDL_DEFAULT_ASSERT_LEVEL_CONFIGURED` when its value is non-zero.
- defines `SDL_DEFAULT_ASSERT_LEVEL`, regardless of its value, when `SDL_DEFAULT_ASSERT_LEVEL_CONFIGURED` is defined.
2024-12-24 07:19:38 -08:00
L zard
e73d98ad72
build_config: add missing macros
...
Those are defined in other build_configs files and used elsewhere in SDL.
2024-12-24 07:19:38 -08:00
L zard
7f1c9c9053
build_config: move unconditionally defined macros
2024-12-24 07:19:38 -08:00
L zard
6f462e244f
build_config: remove unused SIZEOF_VOIDP
2024-12-24 07:19:38 -08:00
L zard
ddd7d0f927
build_configs: remove unused macros
...
Those are only used in build_config files that define them themselves, or not used at all.
2024-12-24 07:19:38 -08:00
Sam Lantinga
483e79bf82
Fixed mouse click count for relative mode and multiple mice
...
We'll track the click count separately for each input source, and the click distance is calculated using a point on an infinite plane that is pushed around by mouse motion deltas, unclamped by the window edge.
2024-12-23 19:00:14 -08:00
Sam Lantinga
ed75d9d22a
Document that the mouse ID is only valid in mouse relative mode
...
Fixes https://github.com/libsdl-org/SDL/issues/11259
2024-12-23 17:12:50 -08:00
Sam Lantinga
024e5da6fb
Mouse events only get a mouse ID in relative mode
2024-12-23 17:12:50 -08:00
evertonse
8a0f649363
windows: fix BITMAPINFOHEADER values when getting bitmap from Clipboard
2024-12-23 17:00:47 -08:00
L zard
af2dbbcb53
Merge SDL_wasapi_win32 into SDL_wasapi
2024-12-23 16:54:52 -08:00
SDL Wiki Bot
4d301b88d6
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-24 00:54:10 +00:00
Sam Lantinga
5a2eb60389
Only save the pending flags we will restore when hiding a window
...
Fixes https://github.com/libsdl-org/SDL/issues/11564
2024-12-23 16:53:54 -08:00
Sam Lantinga
969f03d9f0
Added SDL_PROP_RENDERER_GPU_DEVICE_POINTER
...
Fixes https://github.com/libsdl-org/SDL/issues/11600
2024-12-23 16:51:43 -08:00
SDL Wiki Bot
7a22076a7c
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-23 23:58:24 +00:00
Sam Lantinga
3a1810f9a9
Fixed the Linux mapping for the NVIDIA Controller v1.03
2024-12-23 15:43:17 -08:00
Sam Lantinga
49610fd1e8
Leave mouse relative mode when losing focus
...
Fixes https://github.com/libsdl-org/SDL/issues/7892
2024-12-23 15:23:11 -08:00
Caleb Cornett
62124e2c28
GPU: Enable Metal validation in debug mode ( #11691 )
2024-12-23 18:08:14 -05:00
SDL Wiki Bot
18115ef6bd
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-23 23:01:15 +00:00
Sam Lantinga
8691408baf
Clarify that you shouldn't make any assumptions about the an SDL_FingerID value.
...
Fixes https://github.com/libsdl-org/SDL/issues/11667
2024-12-23 14:28:54 -08:00
Sam Lantinga
37b87f79fb
Fixed Bluetooth Steam Controller detection on iOS and Android
2024-12-23 12:55:25 -08:00
Sam Lantinga
9a43c08146
Allow rendering during the modal resize loop on macOS
...
Fixes https://github.com/libsdl-org/SDL/issues/11508
2024-12-23 11:46:35 -08:00
Sam Lantinga
225c0e2ad9
Removed unused function declaration
2024-12-23 11:21:00 -08:00
Sam Lantinga
4add7e2005
Round the window size values when using fixed aspect ratio
...
This won't get you pixel perfect values, since the exact ratio won't necessarily be whole pixel values, but it will be closer, and matches the logic in the other branch.
2024-12-23 09:03:38 -08:00
Eduard Gushchin
3ac28bae6a
Removed references to non-existent method SDL_GetAsyncIOTaskResult
2024-12-23 08:02:03 -08:00
SDL Wiki Bot
da37e1541b
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-23 05:32:13 +00:00
SDL Wiki Bot
ecea3471f6
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-22 20:20:41 +00:00
Anonymous Maarten
f8d8bf8066
SDL_GetNumAllocations returns -1 when allocation counting is disabled
2024-12-22 12:20:04 -08:00
Anonymous Maarten
a33144fbc9
SDL_test: disable memory tracking if SDL does not count allocations
2024-12-22 12:20:04 -08:00
Sam Lantinga
2e4dc9c109
Disable tracking memory allocation counts by default
...
Fixes https://github.com/libsdl-org/SDL/issues/11099
2024-12-22 12:20:04 -08:00
capehill
80c1b1e1a0
Fix testautomation pixels_saveLoadBMP big endian issue
...
It seems created surfaces are ARGB8888 format on both BE and LE,
therefore BGRA32 failed.
2024-12-22 12:08:54 -08:00
SDL Wiki Bot
478ac0b9bf
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-22 19:01:42 +00:00
SDL Wiki Bot
03d6e4b69e
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-22 18:53:26 +00:00
Maia
ca4ffc8a00
Fix missing parens in preprocessor defined op
2024-12-22 10:36:03 -05:00
Maia
8475c496b4
Fix typo
2024-12-22 10:35:35 -05:00
SDL Wiki Bot
56cf8d8dc9
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-22 07:09:56 +00:00
Ryan C. Gordon
f0fad41f2c
include: Filled in all remaining missing documentation!
2024-12-22 01:58:13 -05:00
SDL Wiki Bot
4d8f5758cf
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-22 06:18:11 +00:00
Caleb Cornett
c080bb8417
GPU: Fix non-triangle D3D12 primitive topology types
2024-12-21 22:38:40 -05:00
Sam Lantinga
33442701ca
Use the monitor as the client rect for maximized borderless windows
...
Fixes https://github.com/libsdl-org/SDL/issues/9588
2024-12-21 09:19:03 -08:00
Sam Lantinga
7e298f50fe
Make windows resizable if we're about to maximize them programmatically
2024-12-21 09:19:03 -08:00
Sam Lantinga
34974d4d2b
Don't remove the resizable style for borderless windows
...
The application may have intended the window to be borderless and resizable
2024-12-21 09:19:03 -08:00
Sam Lantinga
cadeec9cc9
SDL_SoftStretch() doesn't handle large pixel formats
...
Fixes https://github.com/libsdl-org/SDL/issues/11534
2024-12-21 09:19:03 -08:00
Sam Lantinga
f37eef948c
Removed raw mouse events
...
It's too close the 3.2.0 release for an API change like this.
If/when we re-add these, some things for consideration:
* What use cases does this enable that aren't currently possible?
* What cross-platform API guarantees do we make about the availability of these events? e.g. do we try to simulate them where raw input isn't actually available?
* How is this different from the existing relative mode, and how do we clearly explain when you want these events vs wanting relative mode?
Notes from @expikr:
First observation: the reason I originally passed denominators instead of multipliers was because some rational values cannot be exactly represented by floats (e.g 1/120) so instead let the end-developer decide how to do the dividing themselves. It was the reason why it was using split values with an integer numerator to begin with, instead of having both as floats or even just normalize it in advance.
On the other hand, passing them as multipliers might have hypothetical uses for dynamically passing end-user controlled scaling in a transparent manner without coupling? (Though in that case why not just do that as additional fields appended to `motion` structs in an API-compatible layout?)
So it’s somewhat of a philosophical judgement of what this API of optional availability do we intend for it to present itself as:
- should it be a bit-perfect escape hatch with the absolute minimally-denominal abstraction over platform details just enough to be able to serve the full information (á la HIDPIAPI),
- or a renewed ergonomic API for splitting relative motion from cursor motion (in light of The Great Warping Purge) so that it is unburdened by legacy RelativeMode state machines, in which case it would be more appropriate to just call it `RELATIVE` instead of `RAW` and should be added alongside another new event purely for cursor events?
This alternate API stream was conceived in the context of preserving compatibility of the existing RelativeMode state machine by adding an escape hatch. So given the same context, my taste leans towards the former designation.
However, as The Great Warping Purge has made it potentially viable to do so, if I were allowed to break ABI by nuking the RelativeMode state machine entirely, I would prefer the latter designation unified as one of three separate components split from the old state machine, each independently controlled by platform-dependent availability without any state switching of a leaky melting pot:
- cursor visibility controls (if platform has cursor)
- cursor motion events (if platform has cursor)
- relative motion events (if the platform reports hardware motion)
2024-12-21 05:18:42 -08:00
Sam Lantinga
d07bb0e679
Removed raw key events
...
They weren't adding any value over the existing keyboard events
2024-12-21 05:18:42 -08:00
Sam Lantinga
c44fa5bb07
Updated raw input events to match SDL style
...
Also added raw keyboard events, and implemented raw input events on iOS, OpenBSD console, Linux console, and X11
2024-12-21 05:18:42 -08:00
SDL Wiki Bot
1025087c2e
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-21 13:15:56 +00:00
Sam Lantinga
a47b62d1fe
Removed PS2 compiler definition
...
This is already defined as part of the PS2 SDK
2024-12-20 15:51:39 -08:00
Wolfywolfy
f3c194f39a
Remove EXTRA_CFLAGS.
...
(cherry picked from commit 9491389baf )
2024-12-20 15:21:07 -08:00
Ethan Lee
7e8576fd19
gpu: Xbox fixes for swapchain presentation
2024-12-20 14:56:33 -05:00
Ethan Lee
f7580374a1
include: Always declare SDL_GDKSuspendComplete.
...
This is always defined in the symbol table and the function safely does nothing
on non-GDK targets, so treat it like any other SDL_system function.
2024-12-20 13:14:55 -05:00
SDL Wiki Bot
232c2970d3
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-20 15:57:39 +00:00
Frank Praznik
5ec5f23fff
tests: Print accurate enabled/disabled relative mode status in testrelative
2024-12-20 10:57:12 -05:00
SDL Wiki Bot
b815123cf2
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-20 07:48:16 +00:00
Ryan C. Gordon
819e1cc95b
SDL_stdinc.h: A couple wikiheaders fixes.
2024-12-20 02:45:04 -05:00
Ryan C. Gordon
b2eb23a617
SDL_filesystem.h: Fill in missing documentation.
2024-12-20 02:39:28 -05:00
Ryan C. Gordon
0b401137d2
SDL_stdinc.h: Document more stuff.
...
There's only a handful of C runtime wrappers left in this header now!
2024-12-20 02:28:34 -05:00
Ryan C. Gordon
b83dd793fd
SDL_stdinc.h: Tons of documentation updates.
...
Almost everything in this header is now documented! The remaining gaps are
literal C runtime wrappers like SDL_strdup, and the analyzer macros like
SDL_INOUT_Z_CAP.
2024-12-20 01:09:40 -05:00
Ethan Lee
a0864799f2
GDK: Fix compile_shaders_xbox.bat build events
2024-12-20 00:57:25 -05:00
Ethan Lee
5d9ccb6296
gpu: Add explicit casts to D3D12 staging descriptor changes
2024-12-20 00:56:48 -05:00
Ethan Lee
e992522cb2
Xbox buildfixes for WarpCursor jitter fix, dark mode
2024-12-20 00:55:54 -05:00
SDL Wiki Bot
b2c15a8c2a
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-20 00:35:23 +00:00
cosmonaut
0f9e86fe1c
tests: Fix GPU tests crashing when window is minimized
2024-12-19 16:21:50 -08:00
SDL Wiki Bot
c9e22d4672
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-20 00:13:34 +00:00
Ryan C. Gordon
ff366fba87
include: Move SDL_HAS_BUILTIN to SDL_begin_code.h, document it.
...
This macro fits better here, since most of the other macros in this file are
for testing similar compiler/target features, etc.
2024-12-19 19:12:56 -05:00
cosmonaut
e46d8756e5
tests: Update GPU tests to use new swapchain best practice
2024-12-19 15:55:04 -08:00
Ryan C. Gordon
401c8f8e4e
SDL_timer.h: Fixed doxygen typo.
2024-12-19 16:46:42 -05:00
SDL Wiki Bot
2f9a45af60
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-19 21:44:12 +00:00
Ryan C. Gordon
0c42891826
include: Filled in more documentation gaps.
2024-12-19 16:42:14 -05:00
Frank Praznik
3ce68f80bc
wayland: Clean up the relative pointer if the seat capability is removed
...
Also use wl_pointer_release, when available, instead of destroy.
2024-12-19 14:33:06 -05:00
Frank Praznik
7c8171da92
wayland: Handle the relative pointer manager appearing after the seat has been initialized
2024-12-19 14:26:51 -05:00
Frank Praznik
4bfc8f84f7
tests: Add a raw event mode to testrelative
...
Add a code path to test raw motion events (activated by '--raw').
2024-12-19 14:14:36 -05:00
Frank Praznik
8c849ecc6c
wayland: Add support for the MOUSE_RAW_* events
...
Mouse button numbers are passed through directly, and axis values are passed through as the raw, 32-bit, wl_fixed_t 24.8 fixed-point values, which need to be divided by the denominator to convert to int/float.
2024-12-19 14:10:09 -05:00
Frank Praznik
fce922b66c
wayland: Add support for the SDL_MOUSE_RELATIVE_SYSTEM_SCALE hint
...
The relative pointer protocol sends both the accelerated and unaccelerated deltas, so select between them based on the hint value.
2024-12-19 14:10:08 -05:00
SDL Wiki Bot
d6a95ae198
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-19 18:54:59 +00:00
Sam Lantinga
42de2ac6a9
Fixed typo
2024-12-19 10:51:02 -08:00
Sam Lantinga
e08f34c3be
Removed SDL_HINT_MOUSE_RELATIVE_MODE_WARP
...
This complicated mouse handling and is a rarely tested path. Real relative mode is much better performance and higher precision.
2024-12-19 10:33:02 -08:00
Sam Lantinga
6e0df0af24
Reduce the possibility of SDL_LockMutex getting called on a destroyed mutex after SDL_StopEventLoop
2024-12-19 09:32:31 -08:00
SDL Wiki Bot
519923ea80
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-19 17:20:47 +00:00
Ryan C. Gordon
624a4d5f26
include: Documented important SDL_begin_code symbols.
2024-12-19 12:19:46 -05:00
expikr
5c0f8dc179
add alternate raw mouse motion events with windows implementation ( #10042 )
2024-12-18 17:29:27 -08:00
expikr
345cab1e36
streamline cursor clipping logic on windows ( #11237 )
...
This commit does the following:
- add logic in the `WM_MOUSEMOVE` case of the Window to conditionally call `WIN_UpdateClipCursor` upon receiving cursor motion if SDL is expecting the mouse to be clipped in some way (Fixes #7890 )
- remove Windows-specific periodic refresh of cursor clipping and its `SDL_HINT_MOUSE_RELATIVE_CLIP_INTERVAL` hint (superceded by the above bullet point)
- streamline the processing logic within `WIN_UpdateClipCursor` for better readability of each branch, and avoid calling the Platform API until it is absolutely necessary.
- move `relative_mouse_center` field from Windows-specific per-window `SDL_WindowData` to the global `SDL_Mouse` struct, and the corresponding hint callbacks to `SDL_mouse.c` instead of `SDL_windowswindow.c`
2024-12-18 17:25:06 -08:00
Marcin Serwin
35a9d156a6
render: convert tmotion vectors to render basis
...
When using `SDL_ConvertEventToRenderCoordinates` with
`SDL_EVENT_FINGER_MOTION` events it converts `x` and `y` coordinates but
does not convert the the `dx` and the `dy` unlike `xrel` and `yrel` of
mouse motion events. This is means that these are rather useless after
conversion. This change unifies this behavior between touch and mouse
motion events.
2024-12-18 17:17:14 -08:00
pixelsuft
3739749404
Improve Win32 darkmode and fix title bar's context menu ( #11543 )
...
Use hidden uxtheme.dll and user32.dll functions for darkmode instead of using DwmSetWindowAttribute.
Fixes context menu on title bar.
2024-12-18 17:11:31 -08:00
SDL Wiki Bot
10f868abf4
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-19 01:06:43 +00:00
Sam Lantinga
f81472d767
Document that you should read from processes before waiting for them to exit.
...
Fixes https://github.com/libsdl-org/SDL/issues/11645
2024-12-18 16:18:44 -08:00
Frank Praznik
3001c61de0
x11: Use the master pointer device for absolute motion
...
Slave pointer devices can seemingly lag behind the master for some reason, so use the master pointer coordinates for absolute motion.
Master events are now only filtered out on the pen path.
2024-12-18 18:21:22 -05:00
Sam Lantinga
835b6e0c1a
Enable high refresh rates on iOS
...
Fixes https://github.com/libsdl-org/SDL/issues/7518
2024-12-18 14:36:30 -08:00
Eduard Gushchin
da80b9bce5
Fixed an inaccuracy in the documentation for SDL_ConvertPixelsAndColorspace
2024-12-18 14:20:24 -08:00
Eduard Gushchin
2ce21d1fed
Fixed an inaccuracy in the documentation for SDL_CancelGPUCommandBuffer
2024-12-18 14:18:33 -08:00
Eduard Gushchin
0ca8027205
Fixed an inaccuracy in the documentation for SDL_PenProximityEvent and SDL_PenMotionEvent
2024-12-18 13:02:14 -08:00
SDL Wiki Bot
4d9e7a2a68
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-18 19:09:01 +00:00
cosmonaut
b5eea03d1e
GPU: Clarify presentation concerns in SDL_gpu.h
2024-12-18 11:08:14 -08:00
SDL Wiki Bot
7dd523fbb1
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-18 18:57:45 +00:00
SDL Wiki Bot
48a0adb2ac
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-18 15:41:13 +00:00
Ryan C. Gordon
4d4a2786bb
render: Updates to format-string versions of SDL_RenderDebugText.
...
- Removes SDL_RenderDebugTextV
- Changes SDL_RenderDebugTextF to SDL_RenderDebugTextFormat and tweaks it to
work in a world without SDL_RenderDebugTextV.
- Tweaked rendering position of formatted text in the example program.
2024-12-18 10:40:31 -05:00
williamist and Anonymous Maarten
6abebca943
Fix format string in debug-text example
...
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com >
2024-12-18 10:40:31 -05:00
williamistGitHub
1d0e28a5b3
Add SDL_RenderDebugTextF & SDL_RenderDebugTextV
...
This should make it easier to quickly put important numbers and such on
the screen without having to format them into a string manually.
2024-12-18 10:40:31 -05:00
SDL Wiki Bot
5608bf5866
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-18 06:22:41 +00:00
Evan Hemsley
0fbcd0d586
GPU: Optimize usage of D3D12 staging descriptors ( #11657 )
2024-12-17 22:22:22 -08:00
Ryan C. Gordon
e957840d34
include: Filling in some more documentation gaps.
2024-12-18 01:18:40 -05:00
Semphris
684098fac3
Fix possible bug with Windows dialogs
...
The Windows implementation of dialogs use the Win32 API, which expects the file filters to have null bytes as separator, and two null bytes at the end of the filter list. To help with string manipulation, the internal code uses 0x01 bytes instead of null bytes, and converts all 0x01 bytes into null bytes at the last moment. If someone decides to put two consecutive 0x01 bytes in their filter names, the code might mistakenly pick them up and convert them to null bytes, leading to Windows failing to pick up later filters. In practice, this is probably not so bad, since it requires someone to have control over file filters already, and allows at most ignoring the following file filters. It is also unlikely to happen by accident since 0x01 is not printable. This commit fixes that by replacing all the 0x01 bytes with the space character.
2024-12-17 20:50:39 -08:00
Semphris
bc9c86bcc2
Dialog: Add suffix to filters all the time
...
For some obscure reason I can't remember, I had made it so the suffix would be added only if the filter list was empty. That isn't the expected behavior and caused a mishandling of memory on Windows, which requires a two-null-bytes suffix.
2024-12-17 20:50:39 -08:00
Ryan C. Gordon
b58e6d7274
.wikiheaders-options: Include CPU intrinsics macros in quick reference.
2024-12-17 23:37:28 -05:00
Ryan C. Gordon
c9ab8ad8d9
SDL_intrin.h: Added missing NEON and Altivec documentation.
2024-12-17 23:33:05 -05:00
SDL Wiki Bot
d38c09e5c4
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-18 04:26:44 +00:00
Ryan C. Gordon
6730cf7bed
SDL_intrin.h: Add documentation.
2024-12-17 23:25:25 -05:00
Ryan C. Gordon
2f68efda83
wikiheaders: Add underscore to the "big ascii" character table.
2024-12-17 23:23:13 -05:00
SDL Wiki Bot
19bdc01b8c
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-17 15:46:19 +00:00
Frank Praznik
eda0261c4e
video: Drop size and position requests for windows in a fixed size/position state
...
It is not uncommon for clients to redundantly set the window size and position, either as a holdover from an SDL 1 port, when this was required, due to any window state change triggering a universal update function that sets all window state, even if unnecessary (e.g. always calling SDL_SetWindowSize(), even if the window is fullscreen), or due to the use of compatability layers. Historically, these clients expect that their behavior won't override the base window state, which is an assumption that the windowing changes in SDL 3 broke by caching size and position changes that can't be applied immediately.
This change drops size and position requests when the window is in the maximized and fullscreen states (fullscreen-desktop windows will be repositioned, but the non-fullscreen floating position will not be overwritten), which is behavior more in line with existing client assumptions, and should ease the porting process, as well as prevent annoying bugs when older software is run via sdl2-compat.
In the process of making these changes, pending window state has been moved to separate variables in the SDL_Window struct, as this fixes bugs regarding fullscreen display selection and centering windows immediately after resize on asynchronous platforms, which had issues due to pending state possibly being overwritten.
2024-12-17 10:45:40 -05:00
Ozkan Sezer
6fa6297441
fix typo from commit b84f150d06
2024-12-17 11:15:56 +03:00
Ozkan Sezer
b84f150d06
fix macOS builds with hidapi disabled
...
Fixes: https://github.com/libsdl-org/SDL/issues/11647 .
2024-12-17 11:11:56 +03:00
SDL Wiki Bot
c52a96ca8e
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-17 07:29:13 +00:00
Sam Lantinga
080b3002c6
Fixed building with an older Windows SDK
2024-12-16 22:33:31 -08:00
Ryan C. Gordon
d0d1414836
messagebox: Copy title and message up front, to protect SDL_GetError() strings.
...
It's possible (likely!) someone could just pass a pointer returned by
SDL_GetError for one of these strings, but the message box code has to do a
ton of complicated stuff that might _also_ call SDL_SetError, so you could
end up with the string having different contents by the time you display it.
Just make a copy of the strings unconditionally at the start, so they're safe
no matter where they came from.
Fixes #10932 .
2024-12-16 21:58:05 -05:00
SDL Wiki Bot
a92eade183
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-16 17:20:27 +00:00
Ryan C. Gordon
0bb42cb023
alsa: a few more minor formatting tweaks.
2024-12-16 12:19:48 -05:00
Ryan C. Gordon
483ceb5355
alsa: Reenable SDL's internal channel map support when ALSA can't swizzle.
2024-12-16 12:19:48 -05:00
Ryan C. Gordon
35360ec4d7
alsa: Use more hints for opening default devices.
2024-12-16 12:19:48 -05:00
Ryan C. Gordon
576f13ac7c
alsa: Put debug logging back into correct category and logging level.
2024-12-16 12:19:48 -05:00
Ryan C. Gordon
ff96c59df4
alsa: Add back in code to guess the correct ALSA device prefix.
2024-12-16 12:19:48 -05:00
Ryan C. Gordon
b108b54c6a
alsa: Bring up to current SDL coding conventions and standards, other tweaks.
2024-12-16 12:19:48 -05:00
Ryan C. Gordon
639855b7e5
alsa: Remove direct calls to memset
2024-12-16 12:19:48 -05:00
Ryan C. Gordon
a4a1dff219
alsa: remove loop macro
2024-12-16 12:19:48 -05:00
Ryan C. Gordon
b9c062c858
alsa: Pulled in latest changes from @sylware
2024-12-16 12:19:48 -05:00
Sam Lantinga
76e7bc4c04
Added support for ALSA dmix audio output (thanks @sylware!)
...
Fixes https://github.com/libsdl-org/SDL/issues/8577
2024-12-16 12:19:48 -05:00
SDL Wiki Bot
3fa0537565
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-16 06:13:48 +00:00
Ryan C. Gordon
79316ca36e
Heavy work on improving category documentation.
...
Still more to go!
Reference Issue #9440 .
2024-12-16 01:10:37 -05:00
SDL Wiki Bot
9aca97f4e7
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-16 05:03:54 +00:00
Ryan C. Gordon
c0803f7683
SDL_dialog.h: Improvements and fixes to the documentation.
2024-12-16 00:02:50 -05:00
Ryan C. Gordon
a55686ce61
hints: Clarify when joystick hints should be set.
...
Fixes #9490 .
2024-12-15 21:28:28 -05:00
Frank Praznik
eb3fc0684c
wayland: Don't close an externally owned display on init failure
2024-12-15 10:51:51 -05:00
L zard
6cc9ce183d
SDL_internal: remove #undef SDL_LEAN_AND_MEAN
...
I am confused by the "You have to manually edit this file" comment. Does it mean that it is expected to manually remove the previous `#define SDL_LEAN_AND_MEAN 0` ?
In any case I put this part of the change in a separate commit so that it can easily be reverted.
2024-12-14 09:22:29 -08:00
L zard
8b6d3c88cf
Fix #ifdefs to have config flags either defined as 1 or undefined
...
See 387774ab8a
2024-12-14 09:22:29 -08:00
Frank Praznik
313d522f39
wayland: Only require fifo-v1 for Wayland by default
...
Some compositors may not implement commit-timing-v1 in addition to fifo-v1, at least not immediately, and Mesa doesn't require commit-timing for FIFO behavior. The fifo-v1 protocol alone is enough for the desired behavior.
Only check for fifo-v1 to enable Wayland by default.
2024-12-13 18:40:34 -05:00
Ryan C. Gordon
ac2edad809
audio: Simplify and unify audio stream format updating when devices change.
...
This used to do different things for recording streams in different parts of
the codebase, not to mention two separate codepaths through
UpdateAudioStreamFormatsPhysical in any case. My hope is this should kill off
a few corner case bugs...for example, this one:
Fixes #8402 .
2024-12-13 14:59:16 -05:00
Ryan C. Gordon
9a9616894d
wikiheaders: Fix uninitialized variable issue.
2024-12-13 13:52:35 -05:00
Ethan Lee
9628549c7c
Xbox buildfixes
2024-12-13 11:34:39 -05:00
Ryan C. Gordon
80b9986418
audio: Fixed potential NULL dereference.
...
This could happen if you call SDL_BindAudioStreams() when the subsystem isn't
initialized, and possibly in other corner cases.
Thanks to Qianxin CodeSafe Team, @QiAnXinCodeSafe, for discovering this issue!
Fixes #11643 .
2024-12-13 10:12:33 -05:00
Sam Lantinga
1944bc7407
Fixed warning C4702: unreachable code
2024-12-12 15:43:42 -08:00
Sam Lantinga
63a498c966
Fixed warning C4189: 'cqe': local variable is initialized but not referenced
2024-12-12 15:43:07 -08:00
Sam Lantinga
ce9dddfde2
Don't free properties while modifying the property hashtable
...
A property cleanup callback might end up trying to set other properties, so we don't want to have a lock held at that point.
Fixes an assertion in testprocess when cleaning up IO stream properties
2024-12-12 14:39:53 -08:00
Sam Lantinga
43a61fec91
Removed external hashtable locking functions
...
Read-write locks are not recursive and can't be upgraded from one type to another, so it's not safe to lock the hash table and then call functions that operate on it. If you really want this functionality, we'd need to create unlocked versions of the hashtable functions and you would call those once you've taken a lock on the hashtable, and we'd have to assert that the operations you're doing are compatible with the type of lock you've taken.
All of that complicates working with hashtables, so if you need that type of access, you should probably just use external locking.
2024-12-12 14:39:53 -08:00
Sam Lantinga
61511c48a4
SDL_HashTable is now optionally thread-safe
...
Fixes https://github.com/libsdl-org/SDL/issues/11635
2024-12-12 14:39:53 -08:00
Ryan C. Gordon
e0cee83a3a
emscriptenaudio: Removed comment about Firefox not supporting userActivation.
...
It does now, and has since Firefox 120 (around November 2023).
2024-12-12 10:48:23 -05:00
Ryan C. Gordon
2635239bbc
README-migration: some improvements to the audio section.
...
Minor edit about default devices, and an explanation of forcing device buffer
size with SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES.
Fixes #9857 .
2024-12-12 01:29:56 -05:00
Marcin Serwin
ce7cb10541
dialog/unix: create zenity argv on the main thread
...
Creating `argv` for zenity means we don't have to pass the building
blocks between threads which allows us to avoid deep copying some nested
structures. It also allows us to fail earlier in case of problems with
building the argument vector.
2024-12-11 20:57:07 -08:00
Marcin Serwin
cf59fc797f
dialog/unix: deep copy args to avoid data race
...
SDL properties passed to the `SDL_Zenity_ShowFileDialogWithProperties`
may be destroyed/modified immediately upon the function return.
Therefore, we must copy all the strings and structures passed via
pointers; otherwise, the `SDL_ZenityFileDialog` thread attempting to
read them will cause data race.
2024-12-11 20:57:07 -08:00
Marcin Serwin
af6c641b8c
dialog/unix: stricter typing
...
Introduce `const` where appropriate
2024-12-11 20:57:07 -08:00
Marcin Serwin
4c86511035
dialog/unix: reduce string allocations
...
Simplifies logic of spawning the zenity process by avoiding allocations
of static strings
2024-12-11 20:57:07 -08:00
Marcin Serwin
ff82238172
dialog/unix: remove /usr/bin/env indirection
...
SDL process is using `posix_spawnp` which already does the path lookup
so additional indirection via `env` is unnecessary
2024-12-11 20:57:07 -08:00
cosmonaut
c5acbef3bf
GPU: Fix D3D12_INTERNAL_StrToWStr returning incorrect length
2024-12-11 16:38:28 -08:00
Ryan C. Gordon
6fe09e3aa4
dynapi: Minor optimization to SDL_SetError wrapper.
2024-12-11 18:04:43 -05:00
SDL Wiki Bot
a1e8d5c327
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-11 19:17:12 +00:00
Evan Hemsley and Lucas Murray
3ee39f6c3f
GPU: Revise swapchain acquisition ( #11633 )
...
---------
Co-authored-by: Lucas Murray <22484+lmurray@users.noreply.github.com >
2024-12-11 11:16:35 -08:00
Ryan C. Gordon
bbd4eeb287
examples/audio/04-multiple-streams: Note about web browser audio in README.
2024-12-11 14:13:52 -05:00
Ryan C. Gordon
f45ce45603
ngage: Remove Nokia N-Gage support.
...
This can be reverted if a toolchain arrives that can handle C99 features like
variables declared in the middle of a scope, but for now we literally can't
compile SDL3 for this platform.
Fixes #11243 .
2024-12-11 13:29:43 -05:00
Ryan C. Gordon
3f425b6f20
examples/audio/04-multiple-streams: Patched to compile on Visual Studio.
2024-12-11 13:25:43 -05:00
Ryan C. Gordon
1fbb8e1824
examples/audio/04-multiple-streams: Remove drag-and-drop support.
...
I'm going to reuse that code for an actual drag/drop example later, but for
simplicity and accessibility of the examples, this is just going to load two
wavs and loop them, so you get the music with a sword-clinking sound mixed
over it.
2024-12-10 23:10:43 -05:00
SDL Wiki Bot
e6e468d0c4
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-11 00:28:23 +00:00
Sam Lantinga
962268ca21
Fixed Chinese locales on PSP (thanks @ccawley2011!)
2024-12-10 14:47:31 -08:00
Ryan C. Gordon
ac92af02ea
wikiheaders: put a header on the quick reference pages.
2024-12-10 11:36:19 -05:00
Ryan C. Gordon
be5fba963a
wikiheaders: optionally generate a Quick Reference page.
...
Plus some fixes to SDL's headers this brought up.
2024-12-10 11:25:15 -05:00
Frank Praznik
7c5c88a3ad
cocoa: Fix conditional coding style
2024-12-09 23:49:17 -05:00
Frank Praznik
d4225070ad
cocoa: Toggle the fullscreen menu item to 'leave' when entering a fullscreen space
...
Only return 'NO' during the menu item validation if the window is fullscreen and not in a fullscreen space.
2024-12-09 23:43:31 -05:00
Anonymous Maarten
48b6b93fb6
cmake: make RelWithDebInfo the default configuration
2024-12-09 18:03:03 +01:00
Frank Praznik
5447cb6d38
video: Prefer the window manager supplied coordinates for selecting a fullscreen display
...
Unless there are pending client requested window coordinates, such as in the case where the position is set followed by immediately by entering fullscreen, prefer the true window coordinates as sent by the window manager to select a fullscreen display.
Fixes the case where, if the window manager moves an already maximized window to another display, the window would be made fullscreen on the wrong display since the last floating coordinates would be used.
2024-12-09 11:50:26 -05:00
Anonymous Maarten
e4215a04d9
gpu: make macro's function-like using do-while-0
2024-12-09 00:01:16 +01:00
Anonymous Maarten
fb71b44231
gpu: define EXPAND_ARRAY_IF_NEEDED macro once and make it function-like
2024-12-09 00:01:16 +01:00
Anonymous Maarten
0370b92d80
gpu: SDL_ClaimWindowForGPUDevice must set an error message on failure
2024-12-09 00:01:16 +01:00
cosmonaut
5c020b9930
GPU: Enable VK_ERROR_NATIVE_WINDOW_IN_USE_KHR to print
2024-12-08 11:20:06 -08:00
cosmonaut
279836d259
GPU: Swapchain image count respects number of allowed frames in flight
2024-12-08 09:07:50 -08:00
Anonymous Maarten
1d5d948ccf
Fix building SDL3 without dialog support
2024-12-08 14:31:19 +00:00
Anonymous Maarten
19cc04a162
Add build-release.py updates from satellite libraries
...
[ci skip]
2024-12-08 02:16:02 +01:00
Marcin Serwin
b5c05b6e29
wayland: pass actual empty strings to zenity
...
The double quotes were passed literally to the zenity arguments which
resulted in the message box displaying literal `""` when no text was
given. The empty string is more logical in this case, e.g., the empty
title results in the message box having lesser height.
2024-12-07 15:19:26 -08:00
Marcin Serwin
1e7c7c69c5
wayland: handle 0 extra buttons in message box
...
When no extra buttons are passed to zenity with `--question --switch`
arguments it fails to show anything, however, SDL3 still reports
success. To handle this case, we pass an additional "OK" button.
2024-12-07 15:19:26 -08:00
Sam Lantinga
09428688b9
Added a reminder to sign the source archives when creating a release
2024-12-07 11:50:42 -08:00
Salman Alshamrani
972c6d0b82
Add SetTextInputProperties to video device API and fix iOS handling
2024-12-07 11:43:35 -08:00
Salman Alshamrani
5d09656afa
Refactor iOS text input activation to better work with hardware keyboards
2024-12-07 11:43:35 -08:00
Salman Alshamrani
72895a6994
Remove unused hardwareKeyboard variable
2024-12-07 11:43:35 -08:00
SDL Wiki Bot
f64e9a52dc
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-07 04:33:05 +00:00
Sam Lantinga
ddb1e66d90
Updated the release checklist documentation
2024-12-06 20:18:30 -08:00
Sam Lantinga
caf0348b26
Enable ApplePressAndHoldEnabled
...
Fixes https://github.com/libsdl-org/SDL/issues/3622
2024-12-06 17:33:10 -08:00
Sam Lantinga
900627f7fc
Enable the SDL_HINT_MOUSE_DOUBLE_CLICK_TIME and SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS hints on macOS
...
Fixes https://github.com/libsdl-org/SDL/issues/4000
2024-12-06 17:07:16 -08:00
Sam Lantinga
6d1dac1404
Removed unused math code from the Visual Studio projects
2024-12-06 16:28:23 -08:00
SDL Wiki Bot
d25cdc0fef
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-07 00:20:38 +00:00
Sam Lantinga
df48af22d4
Removed unused math code from the Xcode project
2024-12-06 16:20:13 -08:00
Sam Lantinga
08de6656fc
Document the pixel layout of YUV format surfaces
...
Fixes https://github.com/libsdl-org/SDL/issues/10530
2024-12-06 16:14:05 -08:00
SDL Wiki Bot
2ac62d8c67
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-06 22:17:01 +00:00
Sam Lantinga
846eb9a886
Added SDL_RenderTextureAffine() to the exported API
2024-12-06 14:16:16 -08:00
SDL Wiki Bot
7278399366
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-06 22:15:20 +00:00
expikr
d0f1910918
add SDL_RenderTextureAffine
2024-12-06 14:14:47 -08:00
SDL Wiki Bot
2c4fc2e549
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-06 21:46:49 +00:00
Sam Lantinga
8d8578785c
SDL_asyncio.h is a public header and should be included in the framework
2024-12-06 13:46:31 -08:00
Evan Hemsley
fa5f84fb6e
GPU: Add SetGPUAllowedFramesInFlight ( #11599 )
2024-12-06 11:56:20 -08:00
Ryan C. Gordon
47429227ab
examples: Handle newlines in README.txt better.
2024-12-06 13:25:06 -05:00
Ryan C. Gordon
0f228de48a
examples: Add some metadata to the generated webpages.
2024-12-06 13:08:26 -05:00
Sam Lantinga
ffb9b30e84
The metal renderer doesn't actually support RGB texture formats
...
Fixes https://github.com/libsdl-org/SDL/issues/11576
2024-12-06 09:47:50 -08:00
Nicolas Allemand
1a5b0796b4
examples: fix canvas size for small screens
2024-12-06 06:58:10 -08:00
Ozkan Sezer
d1b8fcd692
work around type redefinition errors in SDL_immdevice.h
2024-12-06 17:51:00 +03:00
Lucas Murray
9b82d46259
GPU: Use correct logging category
2024-12-06 07:53:37 -05:00
Lucas Murray
5229b520af
GPU: Log D3D12 driver version
2024-12-05 21:49:42 -08:00
Ryan C. Gordon
b79e3ac830
examples: Let the browser handle README.txt word wrapping.
...
Now it's just inserts BR tags (not P tags atm) to separate paragraphs.
2024-12-06 00:13:30 -05:00
Ryan C. Gordon
90efb63e52
examples: Improve webpage generation in various ways, add thumbnails, etc.
2024-12-05 23:58:23 -05:00
Ryan C. Gordon
e50dc7265b
examples: Fix some window titles in the demos.
2024-12-05 23:58:23 -05:00
Semphris
7ddda4fe18
Add system theme support for Emscripten
2024-12-05 20:01:56 -08:00
Sam Lantinga
3060105cfa
Don't filter out controllers when launched by Steam under Proton
...
Fixes https://github.com/libsdl-org/SDL/issues/11579
2024-12-05 19:50:15 -08:00
Frank Praznik
2e5208f353
kmsdrm: Fix Vulkan type redefinition errors from commit 24ed947cc3
2024-12-05 19:52:19 -05:00
SDL Wiki Bot
c49f4ceeb2
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-06 00:49:29 +00:00
Sam Lantinga
23828b62d4
Added SDL_IsMainThread() and SDL_RunOnMainThread()
2024-12-05 13:53:51 -08:00
Sam Lantinga
bc4185c685
Document that video and input functions should be called on the main thread.
...
This is a hard requirement on Apple platforms and while most other platforms don't have a concept of main thread, all video and input functions should be called on the same thread.
2024-12-05 13:53:51 -08:00
Sam Lantinga
fffa6c7a2b
Add missing include of fcntl.h
...
Fixes https://github.com/libsdl-org/SDL/issues/11590
2024-12-05 13:45:17 -08:00
Sam Lantinga
235e5c6a6c
Fixed crash if a device doesn't have a USB product or manufacturer string
...
This happens with the Razer Huntsman V3 Pro Tenkeyless keyboard
2024-12-05 10:42:02 -08:00
SDL Wiki Bot
9f8157f42c
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-05 08:29:19 +00:00
Nicolas Allemand
a0b8b57afe
examples: add empty placeholder image
2024-12-05 00:29:03 -08:00
Ryan C. Gordon
951ca96dc9
asyncio: Added more category documentation.
2024-12-04 23:08:36 -05:00
Nicolas Allemand
58f8e259d1
examples: fixup URLs for project subfolder
2024-12-04 19:37:50 -05:00
Nicolas Allemand
56da4e81d8
examples: added homepage + categories pages + added CSS (similar to wiki)
2024-12-04 19:37:50 -05:00
Ryan C. Gordon
9784e10a75
audio: Let emscripten update device->sample_frames at device open time.
...
Fixes #11435 .
2024-12-04 19:16:28 -05:00
Ozkan Sezer
5bfece34f9
ran gendynapi.pl after PR/11170.
2024-12-05 02:28:50 +03:00
Sam Lantinga
045e31178f
Added SDL_dialog.c to the Xcode project
2024-12-04 15:12:44 -08:00
SDL Wiki Bot
a74693c9a5
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-04 23:10:49 +00:00
Semphris
a4852f3a10
SDL_ShowFileDialogWithProperties with more options
2024-12-04 15:10:15 -08:00
Lucas Murray
dc5a2ddfd0
GPU: Forward D3D12 validation warnings to the SDL log
2024-12-04 14:34:43 -08:00
Lucas Murray
efb59bd0bf
GPU: Fix validation warning in D3D12 blit code
2024-12-04 12:35:36 -08:00
Caleb Cornett
45869d6177
GPU: Vulkan requires drawIndirectFirstInstance feature ( #11583 )
2024-12-04 15:05:35 -05:00
Caleb Cornett
d8eb68a6c5
GPU: Clean up D3D12 blit shader compilation
2024-12-04 14:56:36 -05:00
Frank Praznik
24ed947cc3
kmsdrm: Fix an LTO type mismatch warning
...
Include SDL_kmsdrmopengles.h before SDL_kmsdrmvulkan.h, as the Vulkan header can pull in Wayland headers, which pull in EGL headers with EGL types defined as Wayland types, which causes warnings when building with strict-aliasing and LTO.
2024-12-04 12:34:02 -05:00
Frank Praznik
31128b6cdd
kmsdrm: Clean up GLES function definitions
...
Several functions were redundantly declared in both in the general subsystem header and the GLES header, and some signatures didn't match in both locations.
Move them all to the GLES header, as the definitions are in the GLES source file.
2024-12-04 12:34:02 -05:00
numzero
123306b18c
X11: support _NET_WM_SYNC_REQUEST
2024-12-04 11:59:46 -05:00
expikr
d320d7143d
Fix rawmouse wrong timestamp ( #11553 )
...
Currently, the rawinput thread incorrectly spreads the timestamps over idle time if the poll interval is less than 100ms, and abruptly switches to lumping all accumulated inputs to happen simultaneously if it exceeds 100ms.
This means that any game which implements retroactive event handling based on timestamps will jarringly snap between the two polar opposite extremes of incorrect behaviour.
This PR replaces the arbitrary 100ms threshold with logic based on measuring the idle start and end time.
If the thread idled for more than 125000 nanoseconds, it is considered to have not had any input in its queue before it entered idle, and the events are spread over the interval between thread wake-up and pump finish, with the final input aligned to the pump finish time.
If the thread idled for less than 125000 nanoseconds, it is considered to have events entered at some point between last pump finish and thread entering sleep, and the events are spread over the full pump-to-pump interval.
2024-12-03 20:40:34 -08:00
Ozkan Sezer
830b132cd4
SDL_asyncio_liburing.c: replace __kernel_time64_t use with SDL's Sint64
2024-12-03 23:39:11 -05:00
Ozkan Sezer
4ac78706bf
SDL_asyncio_liburing.c: replace size_t casts on pointers with intptr_t
2024-12-03 23:39:11 -05:00
SDL Wiki Bot
2ad5836d02
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-04 00:12:42 +00:00
SDL Wiki Bot
31d09909b6
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-03 23:04:47 +00:00
Sam Lantinga
1377cdb3f2
Fix the Indonesian language code on Android
2024-12-03 15:04:29 -08:00
Ryan C. Gordon
46f43c2e6e
asyncio: Remove SDL_AsyncIOTask from the public API.
2024-12-03 17:32:20 -05:00
Ryan C. Gordon
4745aa3324
asyncio: Windows IoRing support, other tweaks and fixes.
2024-12-03 17:32:20 -05:00
Ryan C. Gordon
3ca629ceb5
asyncio: Allow file closes to request a flush/fsyncdata.
2024-12-03 17:32:20 -05:00
Ryan C. Gordon
022a6a9f97
asyncio: Added Linux io_uring support.
2024-12-03 17:32:20 -05:00
Ryan C. Gordon
e79ce2a200
asyncio: Added async i/o APIs.
2024-12-03 17:32:20 -05:00
Eduard Gushchin
7293c18314
Fixed an inaccuracy in the return parameter information in the SDL_ConvertPixels function
2024-12-03 11:32:04 -08:00
Eduard Gushchin
401187eb6c
Removed extra sa in SDL_ConvertSurfaceAndColorspace
2024-12-03 09:38:56 -08:00
Nicolas Allemand
b7a31ead08
added "gpu" to the list of possible values of SDL_HINT_RENDER_DRIVER in SDL_hints.h
2024-12-03 09:06:40 -08:00
Eduard Gushchin
9fb8661684
Fixed an inaccuracy in the return parameter information in the SDL_SurfaceHasAlternateImages function
2024-12-03 08:41:30 -08:00
Sam Lantinga
6aab5a089d
Fixed potential buffer overflow
2024-12-03 08:33:51 -08:00
Ryan C. Gordon
65c9a58f5e
audio: Make sure a few bitflag checks convert to bools correctly.
...
This might just be defensive coding, but better safe than sorry on this.
2024-12-03 11:04:52 -05:00
Anonymous Maarten
ec2ef5f9b5
dynapi: order headers for reproducible behavior
2024-12-02 18:25:48 +01:00
Frank Praznik
2762644e96
video: Don't error when setting an unbounded max window size while a minimum is set
...
If the maximum size was changed to 0 (unbounded) while a minimum was set, the sanity check ensuring that the max size isn't less than the minimum size would incorrectly cause the operation to error out.
2024-12-02 09:55:19 -05:00
SDL Wiki Bot
068d9cc7d6
Sync SDL3 wiki -> header
...
[ci skip]
2024-12-02 00:37:15 +00:00
Ryan C. Gordon
2f59a1ce44
SDL_audio.h: Fixed a documentation typo (thanks, @JBetz!).
2024-12-01 19:36:03 -05:00
Ryan C. Gordon
acf0f09320
SDL_migration.cocci: Fixed up some SDL3 symbols that had changed.
2024-11-30 20:08:38 -05:00
SDL Wiki Bot
3a1d76d298
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-29 22:32:15 +00:00
Ryan C. Gordon
ce573b01f8
audio: Added SDL_IsAudioDevicePhysical and SDL_IsAudioDevicePlayback.
...
Fixes #11529 .
2024-11-29 17:31:37 -05:00
Ryan C. Gordon
d53241a299
docs/README-main-functions.md: reformatted Best Practices section.
2024-11-28 00:19:55 -05:00
SDL Wiki Bot
5cd188bdbc
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-28 05:17:28 +00:00
anakin004
7099de4ae8
Update README-main-functions.md
2024-11-28 00:16:55 -05:00
Ryan C. Gordon
bf9fa38920
SDL_audio.h: Fixed two typos.
2024-11-28 00:12:03 -05:00
Ryan C. Gordon
f5ad66ef4b
audio: Allow channel maps to specify -1 to mute a channel.
...
Fixes #11373 .
2024-11-28 00:00:30 -05:00
SDL Wiki Bot
3303e9843f
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-28 04:42:44 +00:00
Ryan C. Gordon
f852038384
filesystem: Added SDL_GetCurrentDirectory().
...
Fixes #11531 .
2024-11-27 23:42:11 -05:00
Ryan C. Gordon
16113374ff
cmake: Enable POSIX fsops code for PS2 and PSP.
2024-11-27 23:42:11 -05:00
SDL Wiki Bot
c0f1fe8e7f
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-28 04:36:33 +00:00
Ryan C. Gordon
f022501d52
fnsince.pl: Deal with post-3.1.3 releases before 3.2.0.
2024-11-27 23:18:38 -05:00
Ivan Epifanov
b8233aff8e
Vita: implement mousewheel and buttons 4/5
2024-11-27 08:23:16 -08:00
SDL Wiki Bot
b8bbd29ce9
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-27 06:11:04 +00:00
Frank Praznik
bbc9c75618
x11: Fix memory leaks in clipboard event handler
...
XGetWindowProperty and XGetAtomName return data which must be freed by the client, and was being leaked.
2024-11-26 10:54:59 -05:00
Caleb Cornett
5c8bed3780
GPU: Fix D3D12 tearing query
2024-11-25 22:33:48 -05:00
SDL Wiki Bot
03d15c031b
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-25 22:44:00 +00:00
expikr and Sam Lantinga
d55e6dfc5e
hint for which system cursor to use as default
...
Co-Authored-By: Sam Lantinga <slouken@libsdl.org >
2024-11-25 13:08:37 -08:00
SDL Wiki Bot
3c13bae64f
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-25 19:07:53 +00:00
Susko3
e0e61775b8
Add missing SDL_WindowFlags to SDL_test_common.c
...
This fixes some flags not printing in testwm.c
2024-11-25 10:56:16 -08:00
Sam Lantinga
6fab61b69d
hidapi: check each usage on a device before ignoring it completely
2024-11-25 10:49:05 -08:00
SDL Wiki Bot
e9fdcf6c60
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-25 17:20:21 +00:00
Ryan C. Gordon
1720fc77fe
examples: Added input/02-joystick-events
2024-11-24 22:49:07 -05:00
Ryan C. Gordon
a07a88c1b4
examples: added input/01-joystick-polling
2024-11-24 22:49:06 -05:00
Sam Lantinga
c508396e33
Avoid usage of CreateEventEx in WASAPI code
...
This also uses FALSE as parameters consistently for CreateEvent()
2024-11-24 17:49:17 -08:00
Starbuck5
7a3f5ef129
Speed up full-surface fills
2024-11-24 17:44:00 -08:00
Ryan C. Gordon
10e2ce9ba4
examples: Added audio/04-multiple-streams
2024-11-24 15:05:44 -05:00
Anonymous Maarten
88926f2b73
emscripten: send drag and drop events
2024-11-24 13:22:46 -05:00
SDL Wiki Bot
e14d939ead
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-24 17:41:07 +00:00
Kai Pastor
bbe843fd80
Full configuration of SDL_INSTALL_CMAKEDIR_ROOT
...
Let users override also the final `SDL3` subdir for the configuration installation destination.
2024-11-24 02:06:27 +01:00
Clownacy
79f6f766d4
Avoid usage of CreateEventEx in D3D12 GPU backend
...
Unavailable in Windows XP.
2024-11-24 01:02:06 +00:00
Benjamin Jurk
fdafa266d8
(doc): make cmake build parallel on linux
2024-11-23 12:15:59 +01:00
Ryan C. Gordon
61ba8010d3
examples: Emscripten builds should allow memory growth.
...
Otherwise you either need to preallocate a bunch or run out of memory fast.
examples/demo/04-bytepusher runs out of memory at startup without this.
2024-11-23 00:01:18 -05:00
Ryan C. Gordon
212f0dcdb1
examples: Fix output name of demos.
...
Otherwise, build-web-examples.pl will fail.
2024-11-22 17:29:43 -05:00
Ozkan Sezer
41b0d36a6c
fix MSVC projects after commit 51637495
2024-11-23 01:22:12 +03:00
Ryan C. Gordon
f9ddb0bdea
examples/demo/04-bytepusher: No need to check NULL before destroying things.
2024-11-22 17:12:14 -05:00
Ozkan Sezer
7bf3cae02e
examples: fix cmake after commit 51637495
2024-11-23 00:56:40 +03:00
Ryan C. Gordon
51637495e4
examples: Rename "game" to "demo".
2024-11-22 15:56:09 -05:00
Maia
566f3dc138
Add BytePusher example
2024-11-22 15:54:45 -05:00
SDL Wiki Bot
b02285d495
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-22 20:53:04 +00:00
Maia
97ddc9adf2
Fix outdated references to SDL symbols in docs. Fixes #11503
2024-11-22 15:52:31 -05:00
Ryan C. Gordon
465881d560
android: patched to compile.
2024-11-22 15:01:09 -05:00
Ryan C. Gordon
c135386f58
events: Add render category to SDL_EventCategory.
2024-11-22 15:01:09 -05:00
Ryan C. Gordon
615c935d11
events: Added SDL_RenderEvent.
...
Fixes #11465 .
2024-11-22 15:01:09 -05:00
Anonymous Maarten
848fd1eab4
ci: don't do 'brew install pkg-config' anymore II
...
Assume it is installed by default
2024-11-22 20:52:57 +01:00
Anonymous Maarten
0007451222
ci: don't do 'brew install pkg-config' anymore
...
Assume it is installed by default
2024-11-22 20:46:03 +01:00
Wouter Wijsman
3a2b595c4f
PSP: Add locale support
2024-11-22 08:37:14 -08:00
SDL Wiki Bot
e94ba6e700
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-22 03:38:20 +00:00
SDL Wiki Bot
631c30527b
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-22 03:22:50 +00:00
Ryan C. Gordon
2e70944c44
gpu: Added an initial FAQ to the category documentation.
...
Fixes #11478 .
2024-11-21 19:57:14 -05:00
Frank Praznik
df73cae2b0
cocoa: Clear the pending flags on non-spaces fullscreen transitions
...
Transitions to or from a non-spaces fullscreen state are synchronous, so clear both the enter and leave pending flags when changing the state.
2024-11-21 11:47:21 -05:00
Eduard Gushchin
a4006e654e
Fixed typo in the name of the SDL_GetAppMetadataProperty function in the description of the SDL_SetAppMetadataProperty function
2024-11-21 05:53:06 -08:00
Sam Lantinga
5ee4d176f1
Added support for the Razer Wolverine V3 Pro
2024-11-21 05:51:57 -08:00
Ryan C. Gordon
a0591ec4a3
README-documentation-rules.md: Mention not listing types in param/returns docs.
2024-11-20 23:59:24 -05:00
SDL Wiki Bot
fef001cb48
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-21 04:53:43 +00:00
Ryan C. Gordon
e770b4e266
dialog: Clean up filter param documentation.
...
The apostrophe was incorrect, but the type is auto linked in the wiki anyhow,
so don't write it out ourselves.
2024-11-20 23:52:49 -05:00
SDL Wiki Bot
795ceae520
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-21 04:50:57 +00:00
Ryan C. Gordon
ecae3789ab
SDL_dialog.h: Remove verbose docs on callback param from several functions.
...
In the wiki, one can click on SDL_DialogFileCallback for these details, or
grep for the symbol in the headers to find the information.
Fixes #11504 .
2024-11-20 23:46:26 -05:00
Marcin Serwin
587384756f
render: use nearest pixel scaling for debug text
...
The debug text font is less legible when scaled linearly.
2024-11-20 18:06:53 -08:00
Ryan C. Gordon
2b744c7df3
cocoa: Refuse to SDL_Init(SDL_INIT_VIDEO) from background thread.
...
Fixes #11437 .
Reference PR #11502 .
2024-11-20 20:22:36 -05:00
Sam Lantinga
932bb968d7
Fixed infinite recursion when the microphone is unavailable
2024-11-20 16:07:43 -08:00
Sam Lantinga
1413848f41
Fixed crash if a window ends up without a display
2024-11-20 13:27:43 -08:00
Sam Lantinga
35e6c92c3c
Added the ROG Ally X to the list of Xbox controllers
...
This prevents Steam from opening the DirectInput versions of this controller that are added by installing Zenless Zone Zero.
2024-11-20 12:09:30 -08:00
Anonymous Maarten
4fb955c80b
cmake: fix sdlcpu.cmake for C89 compilers
2024-11-20 05:35:50 +01:00
Frank Praznik
aa352837d5
cocoa: Don't sync on a pending fullscreen event if the window is miniaturized
...
The fullscreen event will be processed after deminiaturization is complete. Fixes a delay when restoring a miniaturized window that will return to fullscreen.
2024-11-19 16:53:31 -05:00
Frank Praznik
18b7a2315c
cocoa: Restore fullscreen state on the window regaining key status
...
Ensure that fullscreen state is restored if a non-minimized fullscreen window regains key status. This can happen if a fullscreen window was requested to minimize on loss of key status, but the minimization didn't actually occur.
2024-11-19 12:10:31 -05:00
Frank Praznik
014196d98d
cocoa: Fix minimizing fullscreen windows on Sequoia
...
Sequoia seems to require that the window briefly be made key when minimizing it after coming out of fullscreen.
2024-11-19 12:10:31 -05:00
Sam Lantinga
7a074f582e
Steam Controller handling improvements
...
* Only handle the controller interfaces on a Steam Controller and wireless dongle
* Wait until we get the connected status when initializing a wireless dongle
2024-11-18 21:36:23 -08:00
SDL Wiki Bot
d2dc0fa920
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-19 02:19:43 +00:00
Sam Lantinga
0c53d9a1ee
Implemented SendEffect for Steam Controllers
2024-11-18 18:26:07 -08:00
Sam Lantinga
d8f8cf3e99
Added SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED
2024-11-18 14:50:37 -08:00
Sam Lantinga
184da780f5
Fixed a crash when unplugging a Steam Controller dongle
2024-11-18 12:13:42 -08:00
Frank Praznik
70fe38bcb2
wayland: Rename some display related variables to better reflect their purpose
...
Use the 'logical' prefix for the logical width and height, and clarify that the physical dimensions reflect the width/height in millimeters.
2024-11-18 11:39:27 -05:00
Sam Lantinga
e027b85cc4
Validate that pixel formats have the correct attributes
...
Also added a test to save and load as BMP format to make sure pixel transformations are working correctly.
Fixes https://github.com/libsdl-org/SDL/issues/11483
2024-11-17 11:58:57 -08:00
Anonymous Maarten
bd57cfdb55
ci: pin MSVC ARM Windows SDK version to 10.0.22621.0
2024-11-17 19:39:28 +01:00
Ozkan Sezer
0f9e551d71
joystick/gdk/SDL_gameinputjoystick.c: fix build errors due to -Wformat
2024-11-17 00:45:02 +03:00
Sam Lantinga
af6ce629c4
Make sure pairing remains enabled for the entire time dongle pairing is active
2024-11-16 13:42:12 -08:00
Sam Lantinga
2b10a040ff
Fixed rare case of wireless Steam Controller not being detected at startup
2024-11-16 13:10:02 -08:00
SDL Wiki Bot
572cc7af63
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-16 04:44:23 +00:00
ChillerDragon
7d7ee43ddb
stdinc: document SDL_strnlen and SDL_strlen
...
See https://github.com/libsdl-org/sdlwiki/issues/635
2024-11-15 23:43:51 -05:00
expikr and Sam Lantinga
e9f7a1b359
fix relative system scale function on Windows
...
source: https://web.archive.org/web/20161202223814/https://ihme.org/~orbik/random_stuff/donewmouseaccel.png
Co-Authored-By: Sam Lantinga <slouken@libsdl.org >
2024-11-15 16:00:19 -08:00
expikr
25390d6c21
fix relative warp emulation broken by #11460
2024-11-15 15:58:09 -08:00
Cameron Gutman
e0166256ff
joystick: Fix connection type for Steam Controller and Xbox 360 dongles
2024-11-15 17:54:14 -06:00
Sam Lantinga
8657fa8b3b
Improved reliability of the Steam Controller driver
2024-11-15 15:55:13 -08:00
expikr and Sam Lantinga
f8468d580d
add brace for contitional
...
Co-authored-by: Sam Lantinga <slouken@libsdl.org >
2024-11-15 10:20:17 -08:00
expikr
eaef956a9a
fix errenous delta when warping
...
The following changes do not alter any logic:
- rename x/ydelta fields to x/y_accu to better reflect what it actually is about
- coalesce the logic for modifying internal state to one spot, branch based on whether the input was a move or a warp
The following changes alter the logic:
- put the x/y_accu addition under the relative branch only, warps should not add to the accumulation buffer by any definition
- (MAIN FIX) when the destination window desires relative mode, warp events should be dropped if SDL_MOUSE_RELATIVE_WARP_MOTION is false, or have x/yrel set to zero if true
2024-11-15 10:20:17 -08:00
Sam Lantinga
b54f6044a5
Removed Linux Steam Controller support
...
The HIDAPI driver has all the functionality we need on Linux
2024-11-15 08:53:40 -08:00
Sam Lantinga
b43b333d25
Moved the GPU renderer to the bottom of the list
...
We've gotten the feedback we wanted from having it first, so we'll move the other renderers back up for the widest compatibility across devices and platforms.
Fixes https://github.com/libsdl-org/SDL/issues/11468
2024-11-15 08:32:49 -08:00
ChillerDragon
7f14eb33c6
snake: improve comment
2024-11-14 22:40:07 -08:00
Sam Lantinga
b71151a697
Added support for pairing controllers to the Steam Controller dongle
2024-11-14 20:04:31 -08:00
Ryan C. Gordon
e4778d53d3
testautomation_video: Another Emscripten test to be skipped.
2024-11-14 19:34:25 -05:00
Ryan C. Gordon
d48d4c8c48
testautomation_video: Don't test window position on Emscripten.
...
This _might_ fix GitHub Actions. We'll know once I push this! :)
2024-11-14 19:00:10 -05:00
Sam Lantinga
f0b61c69e7
Fixed duplicate controllers showing up on the Steam Controller wireless dongle
2024-11-14 14:19:16 -08:00
Sam Lantinga
fe3566ca46
Ignore Steam Controllers in the Linux driver if HIDAPI is handling them
2024-11-14 11:20:52 -08:00
Sam Lantinga
7959b08a4d
Fixed spacing
2024-11-14 09:25:57 -08:00
Ryan C. Gordon
6ca8269b96
docs/README-raspberrypi.md: Corrected NEON information (thanks, @cmitu!).
2024-11-14 12:11:29 -05:00
Sam Lantinga
0f9505256d
Steam Controller support defaults off on mobile platforms
...
These platforms require prompting for Bluetooth permissions, so don't enable this by default.
2024-11-14 09:05:16 -08:00
Sam Lantinga
140aba9e5d
Enable Steam Controller support by default
...
It now handles both wired and wireless controllers and Steam will set SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES for Steam Controllers if it's handling them.
2024-11-14 08:18:03 -08:00
Cameron Gutman
68c2cf84f6
hidapi: Add support for the Steam Controller wireless dongle
2024-11-14 06:57:22 -08:00
Cameron Gutman
1a311bc638
hidapi: Add support for Steam controllers connected via USB
2024-11-14 06:57:22 -08:00
Cameron Gutman
e67ae274a5
hidapi: Fix bus type in HIDAPI_IGNORE_DEVICE() on Linux
...
This bug prevented the Steam Controller's keyboard and mouse
interfaces from being properly ignored by the HIDAPI joystick
driver on Linux.
2024-11-13 22:06:37 -06:00
SDL Wiki Bot
7c5a2cd462
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-14 01:12:18 +00:00
Ryan C. Gordon
95c8a1cf7c
iostream: Update docs about return values and SDL_GetIOStatus().
...
Fixes #11395 .
2024-11-13 20:11:18 -05:00
Ryan C. Gordon
7007b4762b
events: Fix a compiler warning.
...
Fixes #11410 .
2024-11-13 20:03:21 -05:00
Ryan C. Gordon
6049ca4fb1
docs/README-raspberrypi.md: Initial updates.
...
This document needs a _lot_ of modernization! This was just some initial
improvements, and a warning that the rest is probably obsolete.
Fixes #11444 .
2024-11-13 19:55:25 -05:00
SDL Wiki Bot
c021c75737
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-14 00:30:41 +00:00
Ryan C. Gordon
d20936b544
camera: Add some category docs about camera device warmup delays.
...
Fixes #11454 .
2024-11-13 19:29:14 -05:00
SDL Wiki Bot
3877bf55a3
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-13 20:44:45 +00:00
SDL Wiki Bot
c26dda10e0
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-13 20:38:45 +00:00
Sam Lantinga
9a4ae4b9ed
Fixed crash if SDL_GetVideoDisplayForWindow() returns NULL
2024-11-13 10:45:01 -08:00
SDL Wiki Bot
20cd4290d7
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-13 04:49:12 +00:00
SDL Wiki Bot
dcf6dd19c3
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-13 04:41:26 +00:00
SDL Wiki Bot
6c99a4b783
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-13 04:29:53 +00:00
cosmonaut
a85f0b49f4
GPU: Remove D3D11 shaders from testgpu_spinning_cube
2024-11-12 17:32:25 -08:00
cosmonaut
5a74aadac9
GPU: Null check shader inputs in CreateGPUGraphicsPipeline
2024-11-12 14:31:13 -08:00
Ryan C. Gordon
32cc92dceb
pipewire: i/o callbacks should avoid higher-level iteration during device open.
...
Sometimes these callbacks will fire while we're still waiting on state to
settle down in PIPEWIRE_OpenDevice, which means we're holding the device lock,
but then the i/o callback will fire from a background thread and also try to
grab the device lock, but can't, because PIPEWIRE_OpenDevice is holding it and
waiting for this i/o callback to finish...hence, a deadlock.
So now, if the device is still opening, output callbacks will write silence
and input callbacks will just flush the buffer, without calling the main
iterate function, and thus avoid obtaining the lock.
2024-11-12 15:18:41 -05:00
Evan Hemsley
119b4fa5f5
GPU: Remove D3D11 backend and allow D3D12 to ingest DXBC ( #11456 )
2024-11-12 10:55:21 -08:00
Fancy2209
fc12cc6dfd
ci: add linux-powerpc to test matrix
2024-11-10 14:20:18 +00:00
Kai Pastor and Anonymous Maarten
559223ff9d
cmake: don't use uninitialized SDL_VERSION and use REVISION.txt
...
Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com >
2024-11-09 17:03:25 +00:00
Andrei Alexeyev
332fd824f0
GPU Vulkan: release submitted command buffer after defrag ( #11430 )
2024-11-08 09:40:26 -08:00
L zard
1ed1bc1d5d
testautomation keyboard: use space instead of a
2024-11-08 07:01:50 -08:00
Zack Middleton
8a2cac7aaa
Fix SDL_PRIs64 to use standard PRId64
...
PRIs64 doesn't exist in C standards.
2024-11-08 12:37:14 +03:00
Sam Lantinga
54ff1f35bd
Fixed audio dropouts when plenty of audio is queued on Android
2024-11-07 19:29:51 -08:00
Sam Lantinga
37b49c98dc
Fixed setting up surround sound on NVIDIA Shield TV
2024-11-07 19:05:29 -08:00
SDL Wiki Bot
dbe82e685d
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-08 01:55:37 +00:00
Semphris
3e2ef64c98
Add SDL_SaveFile and SDL_SaveFile_IO functions
2024-11-07 17:55:02 -08:00
SDL Wiki Bot
b0140fb1b4
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-08 00:35:43 +00:00
Sam Lantinga
97dac37373
Added SDL_HINT_ANDROID_LOW_LATENCY_AUDIO
2024-11-07 16:34:34 -08:00
Sam Lantinga
6836ef8fd2
Added logging for low latency audio state
2024-11-07 16:31:35 -08:00
Sam Lantinga
908bd84c5e
Fixed reopening a controller on Android
2024-11-07 15:36:32 -08:00
Sam Lantinga
1ea4edddec
Fixed Java exception if mConnection is null
2024-11-07 11:54:09 -08:00
capehill
588e32ea5a
test: Change LoadContext() return value type from int to bool
...
It should be then consistent with SDL_SetError().
2024-11-05 14:22:57 -08:00
Sam Lantinga
ecfd143a26
testcontroller: update the controller name when it's opened as a gamepad
2024-11-05 11:43:28 -08:00
Sam Lantinga
908b42f2b9
Fixed 8BitDo M30 mapping to match fighting game conventions and the layout in XInput mode
2024-11-05 11:43:28 -08:00
Sam Lantinga
028194286c
Added mappings for the various firmware versions of the 8BitDo SN30 Pro controller
...
Fixes https://github.com/libsdl-org/SDL/issues/9460
2024-11-05 11:43:28 -08:00
Sam Lantinga
0ef7a1d901
Show the guid of gamepads that are opened
2024-11-05 11:43:28 -08:00
Sam Lantinga
ed943318e2
Support multiple joystick buttons bound to the same gamepad button
2024-11-05 11:43:28 -08:00
Sam Lantinga
27b828754a
Use HIDAPI to provide better names for DirectInput controllers
...
Fixes https://github.com/libsdl-org/SDL/issues/10207
2024-11-05 11:43:28 -08:00
Sam Lantinga
5a7b75607a
Added the OpenVR license to openvr_capi.h
...
License taken from https://github.com/ValveSoftware/openvr/blob/master/LICENSE
2024-11-04 13:32:59 -08:00
Sam Lantinga
c1246e31a4
Added support for the PowerA OPS v1 and v3 Pro wireless controllers
2024-11-04 12:05:57 -08:00
Sam Lantinga
d3b882b4f9
Added support for the PowerA Fusion Pro 4 and Fusion Pro Wireless controllers
2024-11-04 10:48:50 -08:00
SDL Wiki Bot
fb2145f731
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-04 05:04:44 +00:00
Petar Popovic
96729e745a
SDL_GetClosestFullscreenDisplayMode(): Rename parameter mode to closest
...
Also: Check, if the parameter is NULL inside the function.
2024-11-03 21:03:44 -08:00
Sam Lantinga
683991ab71
Get the full display bounds if the window doesn't fit in the usable bounds.
2024-11-03 20:58:18 -08:00
Sam Lantinga
6823e3f005
Fixed gaps in scaled 9-grid texture rendering
2024-11-03 20:47:45 -08:00
Frank Praznik
458f616c53
wayland: Send a display removed event when a display is disconnected
...
An event would be dispatched if a display was dynamically added after initialization, but not if one was removed.
2024-11-03 12:43:47 -05:00
Petar Popovic
73e0e8cf5b
SDL_GetDisplayForPoint(), SDL_GetDisplayForRect(): Check argument for NULL.
2024-11-03 07:55:07 -08:00
Sam Lantinga
8026866994
wayland: fixed memory leak at shutdown
2024-11-02 22:56:03 -07:00
SDL Wiki Bot
cacfdc8cfa
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-03 05:23:05 +00:00
Sam Lantinga
7031b240df
Added SDL_PROP_WINDOW_WAYLAND_VIEWPORT_POINTER
2024-11-02 22:22:29 -07:00
Anonymous Maarten
c56a3f60fe
xcode+cmake: use SDL3.framework folder as IMPORTED_LOCATION
...
[ci skip]
2024-11-02 22:22:35 +01:00
Ryan C. Gordon
615d2dcd5b
.wikiheader-options: Treat SDL int types (Uint64, etc) as API prefixes.
...
This makes any reference to them in the docs link to their wiki pages.
2024-11-01 23:47:32 -04:00
Anonymous Maarten
e001a309be
create-release.py: use head of git ref as default commit
2024-11-02 04:20:32 +01:00
Sam Lantinga
27f69c772c
Updated the release checklist
...
This will help me remember to create the archives _after_ tagging the release.
2024-11-01 19:40:47 -07:00
Sam Lantinga
87dade4421
Set SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER for the GPU renderer
...
Fixes https://github.com/libsdl-org/SDL/issues/11393
2024-11-01 18:38:42 -07:00
SDL Wiki Bot
0508f100e2
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-01 22:50:16 +00:00
Sam Lantinga
927d297161
Updated to version 3.1.7 for development
2024-11-01 15:49:31 -07:00
Sam Lantinga
78cc5c1734
Updated to version 3.1.6 for the preview release
2024-11-01 14:27:01 -07:00
SDL Wiki Bot
19af3a2b34
Sync SDL3 wiki -> header
...
[ci skip]
2024-11-01 19:42:29 +00:00
Wouter Wijsman
e31e3caece
PSP: Fix building examples in parallel
2024-11-01 09:55:20 -07:00
Sam Lantinga
c5f12b135d
Fixed the D-pad on wireless Xbox 360 controllers
2024-11-01 09:02:55 -07:00
Wouter Wijsman
780578cd36
PSP: Allow building tests in parallel
2024-11-01 08:57:09 -04:00
Sam Lantinga
8b48b70c6e
Fixed return value setting state on combined Joy-Con controllers
2024-10-31 20:37:23 -07:00
Sam Lantinga
77a0411dde
Minor cleanup
2024-10-31 15:44:41 -07:00
SDL Wiki Bot
68cc173d92
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-30 20:47:55 +00:00
expikr
7c968f1510
Update SDL_hints.h
2024-10-30 12:01:51 -07:00
expikr
e2857fc5a2
Update SDL_mouse.c
2024-10-30 12:01:51 -07:00
Maia
5699ba799e
Add return to CHECK_VULKAN_ERROR_AND_RETURN macro
2024-10-30 11:52:42 -07:00
M. P. Halpin
6c10446a6c
Add version info when building CI/CD for apple platforms
2024-10-30 09:07:30 -07:00
expikr
d6b60bcc53
typo in player spawnpos, mov drawcall out of loop
2024-10-30 11:22:29 -04:00
Sam Lantinga
09495059df
Fixed the PS5 controller face buttons on Amazon Fire TV, Android 11
2024-10-30 05:23:00 -07:00
Sam Lantinga
c099d0525e
sort_controllers.py: fixed parsing SDL_PRIVATE_GAMEPAD_DEFINITIONS
2024-10-30 05:21:59 -07:00
M. P. Halpin
24bdbb8bf4
Supress Metal warning when compiling against macOS 10.11-10.13
2024-10-29 20:03:18 -07:00
Sam Lantinga
2a05b63580
Mark generate.py as executable
2024-10-29 16:47:26 -07:00
Sam Lantinga
51628034d9
Don't offset the view if there's no text input rect
...
Otherwise this will shift the entire view upwards, which probably isn't what you want.
2024-10-29 16:42:16 -07:00
Sam Lantinga
c8a04eec06
Autorelease keys should go down when pressed.
2024-10-29 16:24:40 -07:00
Anonymous Maarten
f543faf837
Allow in-tree build
2024-10-30 00:04:17 +01:00
SDL Wiki Bot
6647345be0
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-29 21:43:56 +00:00
Evan Hemsley and Caleb Cornett
b4dff42dcd
GPU: Add SDL_CancelGPUCommandBuffer ( #11316 )
...
---------
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com >
2024-10-29 14:43:22 -07:00
Susko3
94d110edd5
Specify C source file in example VC projects
2024-10-29 14:40:32 -07:00
Susko3
415abf2ea2
Rename variables for readability
2024-10-29 14:40:32 -07:00
Sam Lantinga
bdf16628fb
Added 03-infinite-monkeys example game
...
This isn't really a game, more of an exercise of that age old question...
2024-10-29 13:08:59 -07:00
Sam Lantinga
2b92dc9baa
Minor updates to woodeneye-008.c from template.c
2024-10-29 13:08:59 -07:00
Sam Lantinga
a93ec0c679
Added Visual Studio project for 02-woodeneye-008
2024-10-29 13:08:59 -07:00
Sam Lantinga
9a77ee2008
Added instructions for creating Visual Studio projects for examples
2024-10-29 13:08:59 -07:00
cosmonaut
014b473bcc
GPU D3D12: Fix depth texture sampling
2024-10-29 12:05:35 -07:00
cosmonaut
ff14a1781f
GPU D3D12: Fix indirect buffers not being refcounted
2024-10-29 10:34:54 -07:00
dv-senna
149ecffd6f
SDL_vulkan.h: undefine VK_DEFINE_HANDLER and VK_DEFINE_NON_DISPATCHABLE_HANDLE
...
Allows including vulkan.hpp in user code in C++ before SDL_vulkan.h w/o errors.
Fixes: https://github.com/libsdl-org/SDL/issues/11328 .
2024-10-29 20:30:10 +03:00
d-musique and D.musique
35e53f76a9
metal: check success of device creation ( #11367 )
...
When macOS runs under a virtual environment, it is possible that
MTLCreateSystemDefaultDevice() does not succeed.
Not checking this failure results in a crash down the road.
This change allows to skip GPU renderer and use an adequate fallback.
Co-authored-by: D.musique <d-musique@users.noreply.github.com >
2024-10-29 12:35:13 -04:00
Caleb Cornett
feb10434a1
Order by subsystem
2024-10-29 08:50:50 -07:00
Caleb Cornett
b2f216f9e2
Add GPU to iOS build config
2024-10-29 08:50:50 -07:00
Caleb Cornett
54836050c9
metal: Add availability checks
2024-10-29 08:13:51 -07:00
Frank Praznik
8f9a562969
wayland: Remove vestigial struct member
2024-10-29 10:51:18 -04:00
Susko3
152bcce85f
Add examples to SDL.sln ( #11255 )
2024-10-29 07:36:38 -07:00
expikr
1e7c186461
Splitcreen FPS example with multiple mouse and keyboard ( #11317 )
2024-10-29 07:30:10 -07:00
Ethan Lee
5c5235fb51
ci: Add Steam Linux Runtime (Sniper) task
2024-10-28 17:07:31 -04:00
Frank Praznik
36c209080c
wayland: Refactor some shell surface related names
2024-10-28 14:30:08 -04:00
Frank Praznik
2b7dc55364
wayland: Check the WM capabilities before sending a minimize event
...
Wayland gives no feedback to windows regarding whether a minimize request was successful, so we would universally send the minimize event and assume that the request succeeded.
Check the window manager capabilities, if available, for whether window minimization is supported, and don't send the minimized event in the case that it is unsupported.
2024-10-28 14:30:08 -04:00
Frank Praznik
1abbd13414
wayland: Throttle interactive user resize events
...
Excessive resize events generated during interactive window resizing can cause applications to lag, severely in some cases. Throttle interactive resize events to once per frame callback interval.
2024-10-28 14:30:08 -04:00
SDL Wiki Bot
e0d019c941
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-28 07:00:30 +00:00
Petar Popovic
cb0c7c9680
SDL_CreateDirectory(): directory tree creation for absolute paths for non-Windows platforms
2024-10-28 01:56:48 -04:00
Petar Popovic
a10578acbd
SDL_SYS_RenamePath(): Fix error message.
2024-10-27 16:54:13 -07:00
SDL Wiki Bot
3922bcec95
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-27 21:42:48 +00:00
Petar Popovic
04a478b6a9
SDL_Enumerate[Storage]Directory() comments: Use enum constant names instead of integers.
2024-10-27 14:41:33 -07:00
Glenn Watson
5c3d42aade
Update README-linux.md for openSUSE Tumbleweed dependencies
2024-10-27 08:01:13 -07:00
Petar Popovic
8468c372b2
SDL_EnumerateDirectory(): (posix) Fix return value when directory is invalid
2024-10-25 22:52:56 -07:00
Roman Frołow
97b924f985
typo: maxOS -> macOS
2024-10-26 01:59:44 +02:00
Sam Lantinga
a851c5b648
create-release.py uses python3
2024-10-25 15:08:57 -07:00
Sam Lantinga
47411d8007
build-release.py uses python3
2024-10-25 14:31:49 -07:00
Dan Ginsburg
4f160d69a6
Closes #10318 - implement Android prerotation in the Vulkan renderer
2024-10-25 14:21:29 -07:00
Ozkan Sezer
93471cf78d
video/openvr: minor clean-up:
...
- make all of function pointers static
- make EGLint context_attribs[] static
- comment out unused function pointer ov_wglGetCurrentContext
- remove unused SDL_DisplayMode openvr_dm_default
- move SDL_VideoDisplay openvr_vd_default to OPENVR_VideoInit()
context and eliminate its C99 initializers
- replace atoi() calls with SDL_atoi()
- replace atof() calls with SDL_atof()
2024-10-25 23:20:24 +03:00
Anonymous Maarten
8bf1a84200
ci: add include headers of build directory to ci artifacts
...
[sdl-ci-artifacts]
2024-10-25 17:47:26 +02:00
Anonymous Maarten
590e1196d0
snake: check allocated memory before use
2024-10-25 17:47:26 +02:00
Anonymous Maarten
20e01c6fbe
android: add (disabled) android.permission.INTERNET to AndroidManifest.xml
...
It's required for SDL3_net
2024-10-25 17:47:26 +02:00
Sam Lantinga
850158f83f
testcontroller: fixed incorrect usage of memcpy()
2024-10-24 18:12:01 -07:00
Ryan C. Gordon
344546b4ea
cocoa: Make sure GL context destruction happens on the main thread.
...
Fixes #10900 .
2024-10-24 16:27:58 -04:00
SDL Wiki Bot
dcd4ddb043
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-24 18:38:45 +00:00
Ryan C. Gordon
8d3bec99a7
audio: Make SDL_GetAudioStreamProperties() thread safe.
2024-10-24 14:37:23 -04:00
Ryan C. Gordon
10e52e1899
docs: Added more '\threadsafety` tags.
...
Reference Issue #7140 .
2024-10-24 14:37:23 -04:00
Frank Praznik
731853077a
Send drop complete events when the drop leaves the window on Cocoa, Wayland, and X11
...
This is already done on win32, however, other platforms were left in a state of limbo if a drop operation began, then never completed due to the drop leaving the window.
2024-10-24 13:36:24 -04:00
Petar Popovic
db4e2ccbac
Allow redefinition of only one macro SDL_SINT64_C SDL_UINT64_C
2024-10-24 07:37:44 -07:00
Son Phan Trung
c0bad724a7
README-ios.md: Add info about UIApplicationSupportsIndirectInputEvents on iOS 17
2024-10-24 07:36:45 -07:00
Ryan C. Gordon
4ea26a7771
emscripten: scale mousewheel X coordinates correctly, not just Y coordinates.
...
Fixes #10454 .
2024-10-23 23:35:02 -04:00
Susko3
d0cf2c19d1
Allow defining custom SDL_SINT64_C and SDL_UINT64_C macros ( #11315 )
2024-10-23 17:03:13 -07:00
Ryan C. Gordon
7108291d0b
video: Change SDL_GLattr to SDL_GLAttr.
2024-10-23 18:50:52 -04:00
Ryan C. Gordon
c0e9205a92
video: Change capitalization on various OpenGL attribute typedefs.
2024-10-23 18:50:52 -04:00
Ryan C. Gordon
3c506630c3
video: Turn several OpenGL attribute enums into integer typedefs.
...
Fixes #11308 .
2024-10-23 18:50:52 -04:00
SDL Wiki Bot
a04fda211c
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-23 21:01:26 +00:00
SDL Wiki Bot
4e33440c04
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-23 20:59:19 +00:00
Anonymous Maarten
e8b69b03fe
cmake: fail configuring when no X11 or wayland could be found ( #11310 )
...
It's still possible to build SDL by configuring with -DSDL_NO_UNIX_DESKTOP_SANITY_CHECK=ON
2024-10-23 20:19:40 +00:00
Petar Popovic
540db0d164
Bumped version of macro 'main' to 3.1.3
2024-10-23 16:16:07 -04:00
SDL Wiki Bot
370521363a
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-23 19:57:33 +00:00
Frank Praznik
924f719b97
wayland: Get the window content scale from the backend
...
The window content scale may change independently of the display it is on if scaling or accessibility features are involved, so query it directly from the backend instead of inferring it.
2024-10-23 15:49:26 -04:00
SDL Wiki Bot
299587fa64
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-23 19:31:40 +00:00
Petar Popovic
5e855d82e3
Manually bump versions of non-function identifiers introduced after 3.1.3 to 3.2.0
2024-10-23 11:17:46 -07:00
kyle-sylvestre
22bc430bbb
Set error using function hresult
2024-10-23 10:53:46 -07:00
Sam Lantinga
6eca02a0e7
evdev: correctly handle composite devices
...
These can be both mouse and keyboard and should be initialized and exposed to the application as both.
2024-10-23 10:52:50 -07:00
Sam Lantinga
ba1412cb9f
evdev: fixed devices not being removed on disconnect
2024-10-23 10:52:00 -07:00
Sam Lantinga
370c0426ce
testspriteminimal: only quit when escape is pressed
2024-10-23 10:51:14 -07:00
SDL Wiki Bot
acfc223e15
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-23 16:37:46 +00:00
Evan Hemsley
423337796c
GPU Vulkan: Use dedicated allocation for download buffers ( #11298 )
2024-10-23 09:37:06 -07:00
SDL Wiki Bot
24b376ef18
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-23 16:30:58 +00:00
Ryan C. Gordon
1c1706a00b
fnsince: update \since policy for documentation.
...
Everything in SDL3 up to the ABI lock is reported as available since 3.1.3.
Everything else will be reported as since 3.2.0 (what will be the first
official release).
Also ran a Perl script over the headers to change everything to 3.1.3 that
wasn't an API function, since fnsince.pl can't manage those. If there's a
macro or datatype that has snuck in that needs to be 3.2.0 instead, we'll
have to manually fix it up, but it shouldn't be a big deal in any case.
Reference PR #11304 .
2024-10-23 12:22:43 -04:00
Michael Palomas
21c91d5535
examples now using SDL_ALPHA_OPAQUE(_FLOAT) for opaque alpha value
2024-10-23 07:28:33 -07:00
SDL Wiki Bot
63ef5a2369
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-23 05:42:03 +00:00
Petar Popovic
fd530d029f
Fixed typo in SDL_clipboard.h
2024-10-22 22:41:30 -07:00
SDL Wiki Bot
7b6416add0
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-23 05:41:03 +00:00
Petar Popovic
af1c165352
Set version of new identifiers after 3.1.3 release to 3.1.6
2024-10-22 22:40:07 -07:00
Sam Lantinga
45584ad73e
Simplify get_channel_name() so it's easier for people to read and understand
2024-10-22 18:19:30 -07:00
Sam Lantinga
c134dd6e5e
Fixed typo in the channel layout documentation
2024-10-22 17:46:57 -07:00
Ryan C. Gordon
4a8eadf167
include: Fixed typo in SDL_CopyFile's documentation.
...
Fixes https://github.com/libsdl-org/sdlwiki/issues/623
2024-10-22 20:12:04 -04:00
SDL Wiki Bot
d9e6fe0b7a
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-22 20:03:14 +00:00
Ryan C. Gordon
f5c27a3a2c
render: Corrected docs for SDL_SetRenderVSync().
2024-10-22 16:01:58 -04:00
Ivan Epifanov
1f8b9a320c
VITA: fix SDL_ShowMessageBox by using different memory type
2024-10-22 12:19:33 -07:00
SDL Wiki Bot
a42c9ec5f7
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-22 17:49:11 +00:00
Ryan C. Gordon
2318961b6f
docs: Add \threadsafety to some low-hanging fruit across a few headers.
...
Reference Issue #7140 .
2024-10-22 13:48:35 -04:00
Ryan C. Gordon
eed11ad6d6
docs: Fixed example code for SDL_qsort_r() and SDL_bsearch_r().
2024-10-22 13:48:35 -04:00
Anonymous Maarten
0bec18245d
android: fix android.content.Context:getCacheDir JNI prototype
2024-10-22 18:03:34 +02:00
Ryan C. Gordon
e9b5f6749e
wikiheaders: add (disabled) code to check for missing \threadsafety tags.
...
Reference Issue #7140 .
2024-10-22 10:48:19 -04:00
Ryan C. Gordon
19a1175c02
include: Updated docs on SDL_TouchFingerEvent.
...
Fixes #4159 .
2024-10-22 10:41:31 -04:00
Ryan C. Gordon
e61f0678ee
x11: Remove the "safety net" error handler.
...
This is an X11 error catcher that lived for the entire life of the program,
which causes problems in itself, but it also tries to make calls into Xlib,
which would cause further panics.
It's goal was to reset video modes if the app was going down, but it often
failed to do so, and caused potentially avoidable crashes instead.
Fixes #7975 .
2024-10-22 10:41:30 -04:00
anton-kl
f9bffa31b6
docs: fix window flags in README-migration.md
...
Use correct SDL macro instead of invalid "flags" string.
Also add a comment about preferred approach.
2024-10-22 00:17:06 -07:00
Ryan C. Gordon
b0982e8982
docs: Updated README-emscripten.md.
...
This now mentions the main callbacks as a possible option, and removes the
part about prebuilt libraries. The latter can return when Emscripten packages
SDL3.
Fixes #11080 .
2024-10-21 23:38:40 -04:00
Sam Lantinga
c56af0d975
Removed unused code
2024-10-21 17:26:14 -07:00
Sam Lantinga
35be8bb7f9
Fixed warning C4456: declaration of 'e' hides previous local declaration
...
This also fixes incorrect interpretation of OPENVR_SetupJoystckBasedOnLoadedActionManifest() return value.
2024-10-21 15:53:47 -07:00
Emmanuele Bassi
8119568805
x11: Remove text-scaling-factor setting checks
...
The text-scaling-factor setting is not useful, now that we watch the
Xft/DPI and Gdk/WindowScalingFactor XSETTINGS keys; on the contrary, it
is problematic in mixed environments with both the KDE and GNOME
portals, as they end up stepping on each other's toes, and we end up
with the wrong scaling factor value.
Fixes: https://github.com/libsdl-org/SDL/issues/11142
2024-10-21 15:26:22 -07:00
Sam Lantinga
1c51b8dc33
Only set the OpenGL flag if the OpenVR driver is active
2024-10-21 15:22:56 -07:00
Sam Lantinga
82b3325978
Fixed memory leaks if Windows initialization fails
2024-10-21 15:22:56 -07:00
Sam Lantinga
d199586683
Fixed memory leaks if OpenVR initialization fails
2024-10-21 15:22:56 -07:00
Sam Lantinga
7b492553c4
Allow the OpenVR driver to be enabled on Windows
2024-10-21 15:22:56 -07:00
Sam Lantinga
0aea14cf45
Added logging for additional events
2024-10-21 14:23:29 -07:00
Sam Lantinga
3d47877bb4
Added SDL_EVENT_RENDER_DEVICE_LOST
...
This is sent when the device is lost and can't be recovered.
Also fixed the vulkan renderer so it returns errors appropriately and will log and break if debug mode is enabled.
2024-10-21 13:28:40 -07:00
SDL Wiki Bot
54e52d055f
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-21 18:06:39 +00:00
Jordan Christiansen
9c848e08e4
docs: Explain events for already plugged in controllers ( #11286 )
2024-10-21 11:06:05 -07:00
Sam Lantinga
26567df878
Don't treat mouse buttons as focus clicks if the window has mouse capture
...
This fixes the following sequence:
* Press mouse button down
* Alt-tab away from the window
* Alt-tab back to the window
* Release mouse button
Fixes https://github.com/libsdl-org/SDL/issues/7747
2024-10-21 09:46:07 -07:00
Ryan C. Gordon
ef758d05c1
render: GetRenderViewportSize shouldn't use scale, just logical presentation.
...
Fixes #11076 .
2024-10-21 11:17:16 -04:00
Sam Lantinga
92520c1d9b
Improved D3D12 handling of unrecoverable device loss
2024-10-21 00:38:42 -07:00
Sam Lantinga
315842cf71
Fixed crashes handling D3D11/12 device lost in testsprite
...
You can test this using "dxcap -forcetdr"
2024-10-21 00:29:18 -07:00
Sam Lantinga
e2254b1045
Added color scale info for the GPU renderer TODO item
2024-10-20 18:38:02 -07:00
Petar Popovic
4b54e32231
Tweak android path functions comment tag \sa
2024-10-20 16:38:07 -07:00
mausimus
a6536a9298
RI_KEY_BREAK indicates key is up
2024-10-20 10:26:07 -07:00
Petar Popovic
679dd4b181
SDL_RequestAndroidPermission() comment: Add link to android permissions website
2024-10-20 10:13:03 -04:00
SDL Wiki Bot
eb1451536e
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-20 14:12:45 +00:00
Petar Popovic
5819d4b360
SDL_CreateRenderer() comment: Remove mention of flags
2024-10-20 10:12:14 -04:00
rhett-lee
e0321ca5b6
SDL3: SDL_render_gl(render name: opengl) dose not support transparent on Linux/X11 (Bug #11273 ) ( #11274 )
...
SDL3: SDL_render_gl(render name: opengl) dose not support transparent on Linux/X11:
Create SDL window with SDL_WINDOW_TRANSPARENT flag;
Create "opengl" renderer for the window;
The window can't shown with errors:
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 130 (MIT-SHM)
Minor opcode of failed request: 3 (X_ShmPutImage)
Bug reason:
SDL_x11window.c:490 : bool X11_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID create_props)
SDL_x11window.c:566 : vinfo = X11_GL_GetVisual(_this, display, screen, transparent);[XVisualInfo *vinfo]
the X11_GL_GetVisual function returns a vinfo dose not support transparent.
Fix:
SDL_x11opengl.c:637 : XVisualInfo *X11_GL_GetVisual(SDL_VideoDevice *_this, Display *display, int screen, bool transparent)
X11_GL_GetVisual should returns a vinfo support transparent when transparent is true.
2024-10-19 20:21:50 -07:00
Sam Lantinga
dcbb2f11a8
Clamp the texture alpha and color modulation values to 0-255
2024-10-19 20:18:57 -07:00
Frank Praznik
541ba33714
Fix SDL_GetClosestFullscreenDisplayMode documentation
...
It returns false on failure, not NULL.
2024-10-19 16:01:08 -04:00
Cameron Cawley
40070d899d
Refactor Blit_RGB555_ARGB1555 to be more generic
2024-10-19 11:11:22 -07:00
Ozkan Sezer
3d2c8c510d
add GLES3 headers from Khronos for OpenVR video driver.
2024-10-19 10:23:55 -07:00
SDL Wiki Bot
2668558c5c
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-19 17:21:09 +00:00
Sam Lantinga
153f90a725
Revert "Use the correct return type for SDL_GetAndroidJNIEnv()"
...
This reverts commit 2d3fa03d53 .
Different JDK implementations define JNIEnv differently for C++, so we can't provide the definition here.
Fixes:
/usr/lib/jvm/temurin-11-jdk-amd64/include/jni.h:195:17: error: conflicting declaration ‘typedef struct JNIEnv_ JNIEnv’
/home/runner/work/sdlwiki/sdlwiki/.github/../external/SDL3/include/SDL3/SDL_system.h:266:24: note: previous declaration as ‘typedef struct _JNIEnv JNIEnv’
2024-10-19 10:20:50 -07:00
Sam Lantinga
ffb1d9e4b4
Removed Blit2101010toN and BlitNto2101010
...
10-bit RGB formats are typically used with the PQ colorspace, which is handled by SDL_Blit_Slow.
Fixes https://github.com/libsdl-org/SDL/issues/11271
2024-10-19 10:07:53 -07:00
华仔
5c1ccaefae
Fixed VULKAN_UpdateViewport judgment.
2024-10-19 09:51:12 -07:00
Frank Praznik
4c2d0c422b
wayland: Remove kde_output_order_v1 support
...
This protocol is unstable and not intended for clients, and SDL now sorts the display list into a stable order and selects a primary display suitable for games on its own, so it isn't necessary.
Reverts e71e16950a
2024-10-19 11:16:30 -04:00
SDL Wiki Bot
5f874b60a8
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-19 14:49:21 +00:00
Anonymous Maarten
1647d36aec
docs: document copying shared SDL3 a bit more + document sanitizer/libc incompatibility
2024-10-19 14:48:51 +00:00
Ryan C. Gordon
b6a6a4a7f8
audio: fix incorrect dynCall in Emscripten audio.
...
This only seemed to cause problems with `-s ASYNCIFY` on the build command
line, but it was incorrect in general.
Fixes #11258 .
2024-10-18 23:53:40 -04:00
Sam Lantinga
07bb8f1c4c
openvr: added APIENTRY for OpenGL functions (thanks @cnlohr!)
2024-10-18 16:40:36 -07:00
Sam Lantinga
b40ad5428b
Fixed assertion at quit when the debug text was the last texture used.
2024-10-18 14:51:40 -07:00
Maia
a48fa675be
Fix formatting
2024-10-18 13:45:04 -07:00
Sam Lantinga
1d23d2c3c2
Renamed SDL_SANDBOX_UNKNOWN to SDL_SANDBOX_UNKNOWN_CONTAINER
2024-10-18 12:45:07 -07:00
Frank Praznik
a7da3ad59b
x11: Support sorting displays via the priority hint
...
Store the connector name for displays and use it for sorting them according to priority, if the hint is set.
2024-10-18 13:09:08 -04:00
Frank Praznik
0faf9dc4a4
kmsdrm: Support sorting displays via the priority hint
...
Use the connector name for displays and sort them according to priority, if the hint is set.
2024-10-18 13:09:08 -04:00
Ozkan Sezer
a6e5ab437f
video/openvr: Avoid type redefinition errors.
...
Also, let SDL handle stdint.h and stdbool.h.
2024-10-18 19:21:32 +03:00
SDL Wiki Bot
2654d5d48b
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-18 02:34:29 +00:00
Sam Lantinga
e81e917c5e
Added an OpenVR video driver (thanks @cnlohr!)
2024-10-17 19:38:04 -07:00
Ozkan Sezer
569691797d
windows/SDL_systhread.c: fix permissions
2024-10-18 05:00:04 +03:00
Sasha Szpakowski
186c6e5c9d
windows: fix race condition with exception-based thread naming.
2024-10-17 18:42:01 -07:00
Sam Lantinga
faa404a652
If we get a newline character, treat it as SDLK_RETURN
...
Fixes https://github.com/libsdl-org/SDL/issues/10679
2024-10-17 18:18:38 -07:00
Sam Lantinga
a432abf4cc
Make sure that we quit if we get a terminating event
...
This covers the case where the application didn't handle the quit or terminating event, we still need the main loop to finish.
2024-10-17 17:19:49 -07:00
Sam Lantinga
c5e1ae4580
Only free debug_char_texture_atlas if it has been allocated
...
Fixes https://github.com/libsdl-org/SDL/issues/11254
2024-10-17 17:19:49 -07:00
Sam Lantinga
00f4cb308b
Fixed crash if the Vulkan renderer changes swapchain image count
2024-10-17 17:19:49 -07:00
Sam Lantinga
41366f73b2
Don't block in Android USB device open
...
We might be waiting a long time for a permissions dialog, so let that complete asynchronously. While that's happening, we'll remove the device from the device list so that when we get permission the application sees the device as newly available and can open it again.
Fixes https://github.com/libsdl-org/SDL/issues/6347
2024-10-17 12:02:24 -07:00
Sam Lantinga
60c3eaf5ee
Use SDL_GetAndroidJNIEnv() in hid.cpp
2024-10-17 12:02:24 -07:00
Sam Lantinga
2d3fa03d53
Use the correct return type for SDL_GetAndroidJNIEnv()
...
This prevents application code from having to cast to JNIEnv everywhere.
2024-10-17 12:02:24 -07:00
Sam Lantinga
3d852da806
Requesting Bluetooth permission on Android is now asynchronous
...
This fixes an ANR at startup if gamepad input comes in while prompting for Bluetooth permissions.
Fixes https://github.com/libsdl-org/SDL/issues/6347
2024-10-17 12:02:24 -07:00
Sam Lantinga
be3d961b47
Treat clicking the right pad as a thumbstick click on a Steam Controller
2024-10-17 12:02:24 -07:00
Ivan Epifanov
6da4d94abf
VITA: implement camera subsystem
2024-10-17 10:24:17 -07:00
Ivan Epifanov
f79f21217b
VITA: fix yuv texture update
2024-10-17 07:53:26 -07:00
Ozkan Sezer
4612db21a3
SDL_utils.c: restrict gethostname() usage to non-windows
...
Reference issue: https://github.com/libsdl-org/SDL/issues/11228 .
2024-10-17 12:47:02 +03:00
Daniel Ludwig
9a5420118a
Define SDL_DIALOG_DUMMY in SDL_build_config_xbox.h
2024-10-17 12:45:37 +03:00
Sam Lantinga
dd955332a2
Removed SDL_build_config_emscripten.h
...
The Emscripten build uses cmake, so we don't need the standalone config header.
Fixes https://github.com/libsdl-org/SDL/issues/11236
2024-10-16 18:16:46 -07:00
Anonymous Maarten
5492be23a1
ci: test Apple x64 on macos-13 runner
...
GitHub will remove macos-12 by December 3rd, 2024.
2024-10-17 02:28:20 +02:00
SDL Wiki Bot
c48fbbb067
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-16 23:48:38 +00:00
Sam Lantinga
c41b2bb855
SDL_ShouldIgnoreGamepad() should take product IDs rather than a guid.
...
This lets us early out when scanning for new hardware more quickly.
2024-10-16 16:47:29 -07:00
Sam Lantinga
8a30def5f2
Only use Steam Virtual Gamepads if we're running under Steam
...
Fixes https://github.com/libsdl-org/SDL/issues/11214
Fixes https://github.com/libsdl-org/SDL/issues/11215
2024-10-16 16:47:29 -07:00
Sam Lantinga
28504f5791
Steam virtual gamepad info isn't available in the macOS sandbox
2024-10-16 16:47:29 -07:00
Sam Lantinga
d6981da5a4
Added SDL_GetSandbox()
...
This adds support for detecting whether you're running in a sandbox on macOS
2024-10-16 16:47:29 -07:00
Sam Lantinga
d7b1ba1bfc
Added support for the Steam Virtual Gamepad on macOS Sequoia
2024-10-16 16:47:29 -07:00
Ozkan Sezer
3ebfdb04be
SDL_stdinc.h: provide a prototype for strdup for __clang_analyzer__ case
...
Because strdup is not ANSI but POSIX, and its prototype might be hidden..
... and re-enable clang-tidy in CI for LoongArch64.
Fixes: https://github.com/libsdl-org/SDL/issues/11219 .
2024-10-16 21:50:40 +03:00
Maia
d9df87f19f
Fix syntax of trailing doc comments
2024-10-16 11:28:00 -07:00
Sam Lantinga
9cf388f260
Re-added HAVE_FDATASYNC and HAVE_GETHOSTNAME for platforms that have them.
2024-10-16 11:25:57 -07:00
Petar Popovic
6897385623
Add void to run_colorspace_test() function prototype
2024-10-16 11:16:42 -07:00
Anonymous Maarten
69433ee075
doc: explain build-scripts/create-release.py in the release checklist
2024-10-16 18:43:15 +02:00
Ozkan Sezer
18410c03ea
cmake: fix checks for fdatasync() and gethostname()
2024-10-16 19:40:51 +03:00
Sam Lantinga
a027ec59ca
Make the name of the Steam Deck Controller consistent.
...
It will be named "Steam Deck Controller" regardless of whether you're running under Steam.
2024-10-16 08:23:29 -07:00
Sylvain
09e3af58b5
Fixed bug #10954 : software renderer: examples/renderer/10-geometry missing a triangle
...
typo when changing return code from int to bool
2024-10-16 16:48:05 +02:00
Ivan Epifanov
860e38a3a2
VITA: fix shader color format
2024-10-16 07:43:14 -07:00
Sam Lantinga
ed1ec236c1
Removed fdatasync and gethostname definitions from platforms that don't have them
...
As verified by CMake builds in CI
2024-10-16 07:39:30 -07:00
Sam Lantinga
cbbad4051b
Treat a button press location as an implicit mouse move
...
This fixes having the incorrect location for mouse button presses on Steam Deck under gamescope. This works around a bug where the mouse motion appears to come at the next button press, and comes from the xwayland-pointer device instead of the xwayland-relative-pointer device which is delivering mouse button events.
2024-10-15 22:30:38 -07:00
Kyle Sylvestre
e5fa929245
Report win32 last error string windows_file_open ( #11224 )
2024-10-15 19:47:06 -07:00
SDL Wiki Bot
b4554a8a75
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-15 22:37:00 +00:00
Sam Lantinga
97f1da73da
Rename GPU properties for consistency
2024-10-15 15:36:26 -07:00
Caleb Cornett
9af5ffcfbe
Improve support for private platforms ( #11220 )
2024-10-15 18:02:07 -04:00
Frank Praznik
66d09a1cda
wayland: Adjust primary display selection priority
...
Portrait displays are typically used as secondaries and almost certainly not what a user wants a game or movie initially becoming full screen on if a landscape display is available. Increase the priority of selecting a landscape display over a portrait display.
2024-10-15 15:59:31 -04:00
Ozkan Sezer
638b50b69b
CI, LoongArch64: disable clang-tidy
...
Reference issue: https://github.com/libsdl-org/SDL/issues/11219 .
2024-10-15 21:05:20 +03:00
SDL Wiki Bot
dede2ab86f
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-15 17:53:13 +00:00
Frank Praznik
553fc5fe0e
wayland: Expose displays in a deterministic order, and attempt to better handle selecting a primary display.
...
Wayland can expose displays in any arbitrary order, and doesn't have the native concept of a primary display. However, there are games that presume that the first listed display is the primary, which can lead to problems if that output isn't necessarily the ideal one, as they may use that display to build a resolution list or as the default fullscreen output. This sorts displays by position, then attempts to find the primary display, first by querying the explicit ordering hint, then the GNOME DBus property, then tries to determine the 'best' display according to the criteria that is generally ideal for games and media playback.
The makes the list of displays deterministic, as long as the desktop configuration remains static, with a reasonably appropriate one prioritized as primary, even if there is no explicit way to retrieve the primary display. In the case where a user has a particularly esoteric physical display configuration, the new hint enables explicitly overriding the sorting and selection logic, allowing the entire display order to be customized, if necessary.
2024-10-15 13:52:35 -04:00
Anonymous Maarten
075ae7db7d
ci: update LoongArch toolchain to 2023.08.08
2024-10-15 19:10:39 +02:00
Anonymous Maarten
4162bddca7
cmake: fix configuration with -DCMAKE_DISABLE_FIND_PACKAGE_PkgConfig=ON
2024-10-15 19:09:54 +02:00
Caleb Cornett
cdaaabb978
GPU: Fix Metal sampler address mode order
2024-10-15 10:46:04 -04:00
Ivan Epifanov
104dabb9de
PSVITA: enable posix fsops
2024-10-15 09:04:07 -04:00
Sam Lantinga
afee27a530
Make sure stdio handles are in blocking mode
...
Standard I/O doesn't work well with non-blocking handles, so make sure any pipes are in blocking mode before launching child processes.
Fixes https://github.com/libsdl-org/SDL/issues/10998
2024-10-14 22:10:49 -07:00
Sam Lantinga
bb764e3106
Added support for full range BT.709 YUV conversion
...
Also added simple colorspace testing to testyuv.
2024-10-14 20:36:46 -07:00
SDL Wiki Bot
ce49465b13
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-15 03:30:54 +00:00
Sam Lantinga
72bae5167e
Updated documentation
...
Fixes https://github.com/libsdl-org/sdlwiki/issues/616
2024-10-14 20:30:22 -07:00
Ryan C. Gordon
e254c99b38
examples/game/01-snake: Update game logic in AppIterate, don't use a timer.
...
Reference Issue #11210 .
2024-10-14 23:17:23 -04:00
Zack Middleton
edb28e79b5
Make SDL_LoadBMP() use true instead of 1
2024-10-14 20:07:03 -07:00
Zack Middleton
f212cb5f92
Don't overwrite the SDL_IOFromConstMem() error in testshape
2024-10-14 20:07:03 -07:00
Zack Middleton
51dc978785
Don't overwrite the SDL_IOFromFile() error in SDL_LoadFile()
2024-10-14 20:07:03 -07:00
Zack Middleton
fb43dc3097
Set error for NULL SDL_IOStream in SDL_LoadWAV_IO()
2024-10-14 20:07:03 -07:00
cosmonaut
00bb81de76
GPU: Allow size queries on depth formats
2024-10-14 14:28:21 -07:00
Anonymous Maarten
817fa9a975
releases: don't add static library to MinGW binary release
2024-10-14 21:30:48 +02:00
Anonymous Maarten
45dfdfbb7b
Add parametrized build script
...
[ci skip]
2024-10-14 21:30:48 +02:00
cosmonaut
57f2577c65
GPU Vulkan: Fix depth-only framebuffer leak
2024-10-14 10:19:07 -07:00
Sam Lantinga
46835650db
Added config.xcconfig to the Xcode build
2024-10-14 09:25:23 -07:00
Ozkan Sezer
9fac4b9f5f
SDL_windowsmodes.c: Fix MSVC builds against SDKs older than 10.0.17134.0
...
workaround the missing DISPLAYCONFIG_DEVICE_INFO_GET_SDR_WHITE_LEVEL enum value
and DISPLAYCONFIG_SDR_WHITE_LEVEL struct.
Fixes: https://github.com/libsdl-org/SDL/issues/11193
Closes: https://github.com/libsdl-org/SDL/pull/11205
2024-10-14 09:04:25 -07:00
SDL Wiki Bot
b865708039
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-14 16:02:54 +00:00
Sam Lantinga
0b6ad8bf62
Improved the documentation for SDL_SetWindowShape()
...
Fixes https://github.com/libsdl-org/SDL/issues/11199
2024-10-14 09:02:04 -07:00
Sam Lantinga
f9d490045b
Fixed uikit crash when GLES is disabled
...
Fixes https://github.com/libsdl-org/SDL/issues/11208
2024-10-14 08:58:02 -07:00
SDL Wiki Bot
3733b1d5d8
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-14 06:46:10 +00:00
Ryan C. Gordon
c20918b0fb
render: Add SDL_RenderDebugText().
...
Fixes #11201 .
2024-10-14 02:45:33 -04:00
Ryan C. Gordon
44bc19b592
test: remove testaudio-art.txt (this info is in test/LICENSE.txt now).
2024-10-14 01:52:18 -04:00
Sam Lantinga
1cc85c912b
Check return value of SDL_small_alloc()
...
Fixes https://github.com/libsdl-org/SDL/issues/8959
2024-10-13 14:07:26 -07:00
Sam Lantinga
d7be7fc168
Fixed Cohen-Sutherland out code computation for float line intersection
...
Fixes https://github.com/libsdl-org/SDL/issues/10866
2024-10-13 13:04:59 -07:00
SDL Wiki Bot
db78c0f563
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-13 19:15:18 +00:00
Sam Lantinga
a8ca024495
Added SDL_GetDefaultLogOutputFunction()
...
Fixes https://github.com/libsdl-org/SDL/issues/10603
Closes https://github.com/libsdl-org/SDL/pull/11106
2024-10-13 12:14:46 -07:00
Sam Lantinga
b766c824bd
Don't overwrite the SDL_IOFromFile() error in SDL_LoadBMP()
...
Fixes https://github.com/libsdl-org/SDL/issues/11188
2024-10-13 09:37:44 -07:00
SDL Wiki Bot
aed1f76248
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-13 16:27:10 +00:00
Sam Lantinga
a567786762
Added SDL_SetErrorV()
2024-10-13 09:26:25 -07:00
Sam Lantinga
d5e02474ac
Fixed SDL_oldnames.h to use the correct new names
2024-10-13 09:06:46 -07:00
capehill
1a1e2e9892
Set size parameter in SDL_GetClipboardData()
...
Update size value in case where platform uses GetClipboardText().
This should fix clipboard_testClipboardDataFunctions on those platforms.
2024-10-13 08:59:50 -07:00
Evan Hemsley
82598e5ca9
GPU Vulkan: Fix frame counter timing ( #11189 )
2024-10-12 22:02:22 -07:00
Anonymous Maarten
b641c2a0db
Refactor gendynapi.py with the final goal to make it re-usable
2024-10-13 02:52:56 +02:00
Anonymous Maarten
173c168ff4
Default functions are already declared by the first SDL_dynapi_procs.h include
2024-10-13 02:52:56 +02:00
SDL Wiki Bot
fd9f2ae5b5
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-13 00:14:05 +00:00
Maia
01c9c1d0eb
Document main callbacks API thread safety
2024-10-12 20:13:30 -04:00
Cameron Cawley
fd9e57b71e
3DS: Support simple message boxes
2024-10-12 16:07:52 -07:00
Cameron Cawley
2bef8852fb
testdrawchessboard: Allow using the standard render API
2024-10-12 16:07:16 -07:00
Rusty Moyher
7556c44796
SDL3: Fixed Cocoa_GL_CreateContext() not returning a context on success ( #11181 )
2024-10-12 14:01:21 -07:00
Cameron Cawley
94c8c170eb
3DS: Only bundle resources with tests that need them
2024-10-12 13:59:00 -07:00
Cameron Cawley
fec006a4f9
Allow for more fine tuning of Duff's device routines
2024-10-12 11:16:46 -07:00
Cameron Cawley
aebb64efa1
Remove leftover ARM SIMD code
2024-10-12 11:13:37 -07:00
Daniel Gibson
9a81892447
Old env vars as fallback for SDL_VIDEO_DRIVER + SDL_AUDIO_DRIVER #11115
...
especially SDL_VIDEODRIVER is commonly used to use the native Wayland
backend, so I think it's a good idea to keep supporting the old name
instead of forcing users to find out that they now have to add an
underscore..
Not sure how popular SDL_AUDIODRIVER is, but with all the audio backends
that exist on Linux alone I'm sure some people use it to work around
sound issues.
Note: Doing this in the SDL_hints implementation instead of the
call-sites of SDL_GetHint(SDL_HINT_VIDEO_DRIVER) etc ensures that
1. Hint priorities work (env var overriding hint set by application with normal
priority, but not when application used SDL_HINT_OVERRIDE)
2. SDL_ResetHint() (called by user code) respects the fallback
environment variable
2024-10-12 08:47:02 -07:00
Cameron Cawley
3e57d996fe
Reduce the size of the SDL_blit_0 alpha code
2024-10-12 08:29:11 -07:00
Semphris
05c53b5ab0
Add macro guards for OpenGL <=1.3 function prototypes
...
- `#define SDL_OPENGL_1_NO_PROTOTYPES` to hide function prototypes
- `#define SDL_OPENGL_1_FUNCTION_TYPEDEFS` to add PFNGL*PROC function types
2024-10-12 11:21:07 -04:00
SDL Wiki Bot
365dba6de8
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-12 15:08:54 +00:00
Zack Middleton
4898cbb6cf
SDL_migration.cocci: Fix renaming SDL_bool
2024-10-12 00:47:04 -07:00
rhett-lee
22566506d0
SDL3: opengles2 render not support window with transparent flag on Linux/X11 ( #11167 )
2024-10-11 21:59:56 -07:00
Sam Lantinga
c6c195ff88
Always use WaitForSingleObjectEx() as a fallback in SDL_SYS_DelayNS()
...
That logic isn't specific to the Visual Studio build environment. Also switched it to use CreateEvent(), which works back to Windows XP.
2024-10-11 21:18:31 -07:00
Sam Lantinga
c5904d8710
Improved implementation of SDL_DelayPrecise() (thanks @nightmareci!)
...
Fixes https://github.com/libsdl-org/SDL/issues/10592
2024-10-11 21:18:31 -07:00
Sam Lantinga
25251a9405
Fixed warning C4723: potential divide by 0
2024-10-11 19:31:22 -07:00
Daniel Gibson
33366b0a4e
Fix SDL_MAIN_USE_CALLBACKS with Android, introduce SDL_MAIN_EXPORTED
...
My simplification of the conditions for including SDL_main_impl.h
had one problem: I forgot that SDL_main_impl.h must be included
even on Android when SDL_MAIN_USE_CALLBACKS is used, because then a
SDL_main() function that makes sure the callbacks get called is needed,
and that function is implemented in SDL_main_impl.h
But OTOH, even when SDL_MAIN_USE_CALLBACKS is used, SDL_main_impl.h
should not implement a standard `int main(...)` function on Android
(because there the SDL-using native code is compiled as a library and
the entry point is in SDLActivity.java, which calls SDL_main()
in said library).
So the check for platforms that don't have *any* native main function
but just SDL_main() called from the outside should be handled in
SDL_main_impl.h, so both the normal and the callback case can avoid
generating a standard main() in the same way.
To do this, SDL_MAIN_EXPORTED is defined for platforms like Android,
where the real entry point (main() function) is outside of the code
that uses SDL, so
- SDL_main() must be visibly exported with SDL_DECLSPEC, so the outside
code can call it
- SDL_main_impl.h must not implement a "real" main() function
Another small change based on this is defining SDLMAIN_DECLSPEC
at a more general place.
If another platform like Android (where the entry point is somewhere
else entirely, possibly implemented in a different programming language)
turns up, defining SDL_MAIN_NEEDED (so the users main() is renamed
to SDL_main()) and SDL_MAIN_EXPORTED should be all that's needed on the
SDL_main.h side - and if not then at least the implementation is
cleaner and clearer now, IMHO.
fixes #11162
2024-10-11 18:54:29 -07:00
Andrei Rafael Brongel
86ef790a23
explicit cast to int in SDL_bits
2024-10-11 18:52:06 -07:00
Sam Lantinga
3cd7e22e8b
Fixed converting full range YUV to RGB
...
Updated from https://kdashg.github.io/misc/colors/from-coeffs.html
I'm not sure where the other formulas came from, but they weren't mathematically correct and resulted in slightly incorrect colors.
2024-10-11 18:12:05 -07:00
Petar Popovic
3086b25c4e
Set hint SDL_HINT_MAC_SCROLL_MOMENTUM version to SDL 3.1.4.
2024-10-11 17:33:52 -07:00
SDL Wiki Bot
b676413657
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-11 20:51:42 +00:00
expikr
48ff3efdb9
Clarify README-highdpi.md ( #10083 )
2024-10-11 13:50:37 -07:00
SDL Wiki Bot
e31c68427a
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-10 23:35:37 +00:00
Evan Hemsley and Sam Lantinga
6ea4a66451
GPU: Add SDL_CalculateGPUTextureFormatSize ( #11146 )
...
---------
Co-authored-by: Sam Lantinga <slouken@libsdl.org >
2024-10-10 16:34:38 -07:00
Petar Popovic
6d85127560
Rename hint string literal SDL_HINT_MAC_SCROLL_MOMENTUM
2024-10-10 16:16:36 -07:00
Caleb Cornett
3db10a6b2c
GPU: ASTC block size fixes ( #11157 )
2024-10-10 15:40:21 -07:00
Ryan C. Gordon
90a3a2359b
thread: Rewrote generic Condition Variables.
...
This replaces the internal mutex with a semaphore, so we're only using a
single synchronization primitive to implement this, and cleans up some logic
around wait timeouts.
This now matches the logic of the originally cited work, from BeOS.
Fixes #3639 .
(I think.)
2024-10-10 15:03:53 -04:00
Ozkan Sezer
41dfe2c246
test/testautomation_stdlib.c: fix gcc warning on 32 bit
...
test/testautomation_stdlib.c:361: warning: integer constant is too large for 'long' type
2024-10-10 21:10:24 +03:00
Sam Lantinga
73b995fbad
Don't assume OpenGL on Android
...
This prevents Vulkan from initializing by default.
Fixes https://github.com/libsdl-org/SDL/issues/10279
2024-10-10 10:53:31 -07:00
SDL Wiki Bot
8aaaeb7560
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-10 17:02:43 +00:00
SDL Wiki Bot
2a9cb68b91
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-10 16:43:29 +00:00
Ryan C. Gordon
0babb284dd
fnsince.pl: Make fixes now that we've reached ABI lock.
...
Turns out history is messy, thank god for Perl. :)
Fixes #11156 .
2024-10-10 12:41:46 -04:00
Frank Praznik
40ff6a2785
test: Fix mouse focus test on X11
...
X11 seems to need a slight delay before warping the pointer to ensure that the window is actually fully visible on the desktop, or the pointer enter event may not be sent.
This also disables the warp focus test on XWayland, as warping the mouse cursor when outside the window on any Wayland desktop usually just doesn't work.
2024-10-10 11:37:45 -04:00
SDL Wiki Bot
e4b1a9f382
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-10 15:24:38 +00:00
Ozkan Sezer
7ff819141d
libm/e_exp.c: fix gcc warning on 32 bit:
...
src/libm/e_exp.c:105: warning: integer constant is too large for 'long' type
2024-10-10 18:23:20 +03:00
SDL Wiki Bot
ac6b9e2d19
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-10 15:06:56 +00:00
Sam Lantinga
8262072d91
Fixed possible memset(NULL) call in testautomation's SDL_aligned_alloc() check
...
Fixes https://github.com/libsdl-org/SDL/issues/11144
2024-10-10 08:06:18 -07:00
Sam Lantinga
4b7c5f561b
Fixed warning: ‘new_item.probe_len’ may be used uninitialized in this function
2024-10-10 08:06:18 -07:00
Sam Lantinga
c8f5f6d47a
Added SDL_DelayPrecise()
...
SDL_DelayNS() now passes through to the high precision OS delay function, and SDL_DelayPrecise() tries to busy wait to get as close as possible to the desired wait time.
Fixes https://github.com/libsdl-org/SDL/issues/11141
2024-10-10 08:06:18 -07:00
Sam Lantinga
28a70a5b71
Use the correct version for the \since field
2024-10-10 08:06:18 -07:00
Anthony
bf351b0b0e
Add more configChanges to Android Manifest ( #11145 )
...
The addition of layoutDirection is required to prevent the forced restart due to a locale change. Also adding grammaticalGender, fontWeightAdjustment & fontScale for good measure.
2024-10-10 07:53:34 -07:00
David Gow
9c322386bf
gpu: vulkan: Fix an uninitialised structure in SDL_BlitGPUTexture()
...
The SDL_GPUColorTargetInfo structure needs to be zeroed, as otherwise we
can end up trying to create a resolve_texture which doesn't exist,
causing a rather difficult-to-debug segfault when calling
SDL_BlitGPUTexture() with a load op of SDL_GPU_LOADOP_CLEAR.
2024-10-10 07:16:02 -07:00
Evan Hemsley
da5a1585cd
GPU: Avoid calling SDL_GetWindowSizeInPixels when possible ( #11139 )
2024-10-09 18:59:07 -07:00
SDL Wiki Bot
4707bb730e
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-10 00:32:39 +00:00
Sam Lantinga
9023a199dd
Fixed crash in RLE colorkey blitting
...
Fixes Maelstrom running over sdl2-compat with SDL3
2024-10-09 12:11:21 -07:00
Sam Lantinga
f946f87f30
Don't rely on event.buttonMask being set in touchesEnded
...
Fixes https://github.com/libsdl-org/SDL/issues/11131
2024-10-09 11:35:39 -07:00
Sam Lantinga
ee9b6204cf
Updated to version 3.1.5 for development
...
We should bump the version immediately before and after release so the release version corresponds to a fixed snapshot of code.
2024-10-09 11:02:01 -07:00
SDL Wiki Bot
02f3a96476
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-09 16:49:57 +00:00
Sam Lantinga
f8eac30276
Added SDL_StepBackUTF8()
2024-10-09 09:49:10 -07:00
Sam Lantinga
1f08a03794
Switched drag-n-drop logging to trace level
...
The logging is extremely verbose and covers the entire data exchange process, which is more suited to the trace level.
2024-10-09 07:35:21 -07:00
Daniel Ludwig
5b6342a00d
Default SDL_HINT_JOYSTICK_GAMEINPUT to "1" on GDK platforms
2024-10-09 07:30:13 -07:00
Daniel Ludwig
ed87e7e434
test: enable GameInput driver on GDK platforms
...
By default, it's the only driver available on Xbox, but disabled.
2024-10-09 07:30:13 -07:00
Daniel Ludwig
acb18e05b5
GPU: fix swapchain buffer size not set on Xbox
2024-10-09 07:30:13 -07:00
Sam Lantinga
ff834f7733
Removed the restrict keyword
...
It doesn't compile with older Visual Studio and I verified on godbolt.org that the way it was used here doesn't impact code generation at all.
2024-10-08 20:48:13 -07:00
Delta
8e6ead2f7b
[GPU] Added ASTC texture format support ( #11116 )
2024-10-08 18:45:04 -04:00
Ryan C. Gordon
02434cd293
emscripten: Fixes for data addresses above 2gb
...
This includes both wasm64 and wasm32 when addressing more than 2gb of memory.
Fixes : #9052
(Manually cherry-picked from 3deb07ea395373204462130c1e062bc1f71fe060.)
2024-10-08 17:41:18 -04:00
Sam Lantinga
c34790f9f1
Fixed spacing
2024-10-08 11:49:08 -07:00
Daniel Gibson
312ecc4a52
SDL_main.h: Remove dead code for hypothetical C++ platforms
...
If WinRT returns after all, or a similarly bad platforms turns up,
the code can still be found in the git history.
But keep in mind that it then will have to be added *before* the
#if ( defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_NEEDED) ...
case for platforms that support plain C to work correctly
2024-10-08 11:47:33 -07:00
Daniel Gibson
823b218051
Simplify code to include SDL_main_impl.h in SDL_main.h
...
Basically all platforms where SDL_main.h renames main() to SDL_main()
use the platform-specific main() (or WinMain() or whatever)
implementations in SDL_main_impl.h - and that renaming is enabled with:
#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE) \
|| defined(SDL_MAIN_USE_CALLBACKS)
#define main SDL_main
#endif
The only exception is Android, where main() *is* renamed, but
SDL_main_impl.h isn't used, because SDL_main() is called from Java.
So I think it's cleaner and less error-prone (for adding additional
platforms that need SDL_main() in the future), to use the same check
for including SDL_main_impl.h as is used for `#define main SDL_main`
and only list the exceptions (currently Android) there explicitly.
If new platforms like Android turn up, they can easily be added there
by inserting "|| defined(SDL_PLATFORM_WEIRDPLATFORM)" right next
to the Android check.
See also https://github.com/libsdl-org/SDL/issues/11068#issuecomment-2399907535
2024-10-08 11:47:33 -07:00
Ryan C. Gordon
cba77834f2
init: Log '<unspecified>' not '(null)' if the app name isn't set.
...
Reference PR #11103 .
2024-10-08 14:30:55 -04:00
Simon McVittie
fb8244d6d9
init: Also log the SDL revision here
...
This includes the version number, unless the developer is doing
something strange with git tags.
Signed-off-by: Simon McVittie <smcv@collabora.com >
2024-10-08 14:29:02 -04:00
Simon McVittie
c24f7d2453
Log app ID as SYSTEM/INFO during initialization
...
This is not shown by default, but will be shown when using
SDL_LOGGING=system=info or higher, where it will hopefully nudge app
authors towards initializing this information.
Signed-off-by: Simon McVittie <smcv@collabora.com >
2024-10-08 14:29:02 -04:00
Sam Lantinga
e7ee92e822
Switched drag-n-drop logging to trace level
...
The logging is extremely verbose and covers the entire data exchange process, which is more suited to the trace level.
2024-10-08 10:56:27 -07:00
SDL Wiki Bot
d9f8474dd7
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-08 17:38:17 +00:00
SDL Wiki Bot
95aaaa3232
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-08 17:06:41 +00:00
Frank Praznik
158ba93d61
Update some window function documentation
...
Updates some documentation to correspond with changes made since it was originally written, clarifies some function behavior, and includes some assorted typo fixes.
2024-10-08 13:05:20 -04:00
Sam Lantinga
300daf308a
Replace SDL_TRUE/FALSE with true/false in the coccinelle script
2024-10-08 09:55:50 -07:00
Anonymous Maarten
95ab38ba15
ci: actions/cache might return a boolean as string
...
https://github.com/actions/cache/issues/1466
2024-10-08 18:53:29 +02:00
SDL Wiki Bot
7acfdfd3e7
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-08 16:50:41 +00:00
SDL Wiki Bot
326ab439d7
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-08 15:09:24 +00:00
Sam Lantinga
fb07ab91c6
Improved SDL_main documentation and remove extern "C" comment.
...
It turns out that this is incorrect and any C linkage is already taken care of by SDL when redefining SDL_main.
Fixes https://github.com/libsdl-org/SDL/issues/11068
2024-10-08 08:07:54 -07:00
SDL Wiki Bot
03fa9ff0b0
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-08 13:59:10 +00:00
Sam Lantinga
2000ccb541
Allow linear interpolation of the font textures
...
With the recent changes to logical presentation, this is necessary for the font to look good when scaled.
Fixes https://github.com/libsdl-org/SDL/issues/11123
2024-10-07 21:43:57 -07:00
Sam Lantinga
f6fa617139
Define SDL_DIALOG_DUMMY in SDL_build_config.h as needed
2024-10-07 19:52:50 -07:00
Sam Lantinga
4627283eca
Allow building both Cocoa and dummy dialog implementations
...
This allows us to remove platformFilters from the Xcode project, which is not supported in Xcode 12.
2024-10-07 18:01:39 -07:00
Sam Lantinga
c8526532de
Changed objectVersion to 54 so Xcode 12 can load the projects (thanks @Wohlstand!)
2024-10-07 18:01:39 -07:00
Frank Praznik
2fd12b2e8a
keyboard: Note that enabling text input can also enable an IME
...
An active IME can potentially eat key events, particularly dead keys and parts of a compose sequence, so note this behavior in the documentation.
2024-10-07 19:21:34 -04:00
Sam Lantinga
81b48de3f5
Fixed VID/PID list parsing of SDL_HINT_GAMECONTROLLER_SENSOR_FUSION
...
Fixes https://github.com/libsdl-org/SDL/issues/11118
2024-10-07 16:14:57 -07:00
Sam Lantinga
5db64300b8
Fixed SDL_GetStringInteger() for values starting with '0' and '1' (thanks @DanielGibson!)
2024-10-07 15:53:38 -07:00
Sam Lantinga
7da728a642
Added support for wired XBox controllers on macOS 15.0 Sequoia
...
Fixes https://github.com/libsdl-org/SDL/issues/11002
2024-10-07 15:44:42 -07:00
Ryan C. Gordon
659f2f4b04
examples: add basic app metadata to all existing examples.
2024-10-07 17:41:15 -04:00
Ryan C. Gordon
aa534c3ac3
core: Fixed incorrect comment in core/windows/SDL_windows.h.
2024-10-07 16:55:30 -04:00
Simon McVittie
ee7f61fd9a
snake: Add extended app metadata
...
All of these are optional, but nice-to-have, and we have reasonable
values available for all of them.
Signed-off-by: Simon McVittie <smcv@collabora.com >
2024-10-07 16:47:36 -04:00
Simon McVittie
ca82405d5a
snake: Add basic app metadata
...
All SDL3 applications and games should ideally have this.
Signed-off-by: Simon McVittie <smcv@collabora.com >
2024-10-07 16:47:36 -04:00
rabbit-ecl
6ae5666acf
Check for VK_SUBOPTIMAL_KHR also in vkQueuePresentKHR ( #11113 )
...
This is already handled for vkAcquireNextImageKHR.
2024-10-07 13:01:10 -07:00
Sam Lantinga
06bd214af6
Fixed warnings building on Android
2024-10-07 11:11:27 -07:00
Green Sky
596fcfa6c4
fix microphone permission and feature flags being spread out
2024-10-07 10:10:18 -07:00
Naman Dixit
54e622c2e6
Use the printf vararg verification macros when compiling with clang
2024-10-06 22:19:52 -07:00
Ryan C. Gordon
fca05fa754
examples: Use SDL_Log() instead of message boxes for errors.
...
Fixes #11094 .
2024-10-06 22:38:04 -04:00
Ryan C. Gordon
9f170286ba
test: Replace README with LICENSE.txt
...
Fixes #11097 .
2024-10-06 19:05:18 -04:00
SDL Wiki Bot
d0ef58b442
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-06 23:03:29 +00:00
SDL Wiki Bot
cbb9a16367
Sync SDL3 wiki -> header
...
'[ci skip]'
2024-10-06 22:58:06 +00:00
Sam Lantinga
65539bc4f7
Make sure trackpad state is updated when button presses are delivered
...
Fixes https://github.com/libsdl-org/SDL/issues/11085
2024-10-06 14:28:06 -07:00
Sam Lantinga
03b259893a
Fixed return value of SDL_AddGamepadMapping()
...
Fixes https://github.com/libsdl-org/SDL/issues/11095
2024-10-06 14:20:30 -07:00
Jan Sedivy
bf54eddba9
macOS: Clarify when macOS hints need to be set
2024-10-06 12:36:42 -07:00
Jan Sedivy
c2b98e21ba
macOS: Add hint for smooth SDL_EVENT_MOUSE_WHEEL values
2024-10-06 12:36:42 -07:00
Frank Praznik
2fa8acb084
x11: Refresh the global cursor coordinates when confining the pointer
...
XGrabPointer can warp the cursor into the window when confining, so set the flag to refresh the global coordinates when queried.
2024-10-06 14:48:24 -04:00
SDL Wiki Bot
e59078ac6f
Sync SDL3 wiki -> header
2024-10-06 18:31:17 +00:00
Ryan C. Gordon
9e74ada7b8
gpu: fixed formatting in docs.
2024-10-06 14:30:07 -04:00
Sam Lantinga
c358bf3f9b
Removed test program list, it's better to just look at the code.
...
Fixes https://github.com/libsdl-org/SDL/issues/9399
2024-10-06 11:28:29 -07:00
Sam Lantinga
f8dd73fdb9
Fixed build
2024-10-06 08:42:00 -07:00
Sam Lantinga
0f47d3a77b
Fixed use after free (thanks @meyraud705!)
...
Fixes https://github.com/libsdl-org/SDL/issues/11090
2024-10-06 08:34:35 -07:00
capehill
e159bcf5de
test: Make blit_testExampleApplicationRender work on big endian
...
Changed image data pixel format to BGRA32.
2024-10-06 08:27:58 -07:00
Frank Praznik
c9ffa3f9e1
Remove vestiges of the TAKE_FOCUS window event
...
The event was removed, so remove the rename define and update the coccinelle script.
2024-10-06 10:02:53 -04:00
Sam Lantinga
596ef1ba2e
Moved the SDL_ttf IME demo to showfont in the SDL_ttf project
2024-10-06 00:24:01 -07:00
David Fort
e00b1fdd67
clipboard: include mime types in SDL_ClipboarUpdate
...
This patch modifies the clipboard handling so that when we receive an external
clipboard update, the suppported mime types are included in the SDL_ClipboarUpdate
event. The patch also introduces the owner field that allows to know if the update
is because we own the clipboard (internal update) or if it was an external update.
2024-10-05 18:19:10 -07:00
bubbleguuum
2880b40e33
fix pipewire prototype
2024-10-05 18:16:12 -07:00
Petar Popovic
b6ab7d28f6
Replaced \r\n with \n in SDL root files
2024-10-05 18:15:02 -07:00
Sam Lantinga
b8e72b0969
Note that creating a renderer will fail if the preferred renderer isn't available.
...
Fixes https://github.com/libsdl-org/SDL/issues/11077
2024-10-05 09:55:26 -07:00
zshoals
1ca45c5891
Fix typo: DiretMedia->DirectMedia
2024-10-05 00:08:01 -04:00
Sam Lantinga
8db3b47482
Just use normal stdio for the child process
...
Make sure we flush all output so it's seen by the parent as it happens.
2024-10-04 14:13:52 -07:00
Ryan C. Gordon
8c3f88b495
docs: Wrote CategoryVulkan.
2024-10-04 16:55:50 -04:00
SDL Wiki Bot
369b93771b
Sync SDL3 wiki -> header
2024-10-04 20:38:03 +00:00
SDL Wiki Bot
deeffaa8d6
Sync SDL3 wiki -> header
2024-10-04 20:36:26 +00:00
Ryan C. Gordon
84ecf7fd3e
docs: Add CategorySurface text.
2024-10-04 16:35:49 -04:00