Commit Graph

20950 Commits

Author SHA1 Message Date
Sam Lantinga
fdcd548612 Added SDL_PROP_WINDOW_CREATE_WINDOWSCENE_POINTER
This lets applications choose which scene their windows are being created in. For example one window might be video output in a scene with a session role of UIWindowSceneSessionRoleExternalDisplayNonInteractive, and video controls in a scene with a session role of UIWindowSceneSessionRoleApplication.
2025-11-26 12:37:58 -08:00
Sam Lantinga
54b15532d3 Set window controller interaction on all windows
We should update all windows, not just the ones in the active scene
2025-11-26 11:50:54 -08:00
Anonymous Maarten
eda8d1d842 JNI_Unload must return the JNI version needed by the native library 2025-11-26 14:04:02 +01:00
Ryan C. Gordon
21f93e127b wikiheaders: generalize some previously-SDL-specific things
Now other projects can use it with their headers, if they provide an options
file with specifics and are willing to follow some SDLish header conventions.

This shouldn't affect SDL satellite projects, etc, since they literally use
the SDL symbols, like `SDLCALL` and such, which are the defaults in the script
if a .wikiheaders-options file doesn't override them.
2025-11-25 23:14:31 -05:00
Anonymous Maarten
1edb850639 Add script to generate macOS and iOS tbds 2025-11-26 01:03:41 +01:00
Sam Lantinga
52a4366e54 x11: don't grab the pointer while buttons are pressed
Grabbing the mouse interrupts touch events in progress, so if someone
enables relative mode while a button is pressed, wait for the button to
be released before grabbing the mouse.
2025-11-25 14:34:58 -08:00
Sam Lantinga
7e5f3330ff Added libxi and libxfixes to the Arch Linux package recommendations 2025-11-25 14:34:58 -08:00
Ryan C. Gordon
9b348ef6e8 android: Better parsing of command line arguments.
Reference Issue #14510.
2025-11-25 15:29:48 -05:00
Ryan C. Gordon
da863ff5f9 uikit: Don't copy argv; the original lives the whole time we need it.
Reference Issue #14510.
2025-11-25 15:29:31 -05:00
Antti Ala-Fossi
29f3844b01 Fix assert in SDL_BeginGPURenderPass 2025-11-25 10:46:53 -08:00
Sam Lantinga
74653b3cd5 Send the normal sensor data for the right Joy-Con controller in combined mode 2025-11-25 10:38:42 -08:00
Sam Lantinga
24fe3c48a0 Fixed events for windows that have had their window proc hooked at creation time 2025-11-24 19:29:13 -08:00
Sam Lantinga
55a566a6b4 Steam expects the gyro data to come before the accelerometer data 2025-11-24 18:04:46 -08:00
Anonymous Maarten
e221905195 Fix check_stdlib_usage.py libc call matching
It now matches libc usage inside statements,
and skips libc-like usage in strings or as struct members.
2025-11-25 01:07:10 +01:00
Sam Lantinga
9896dc18e7 Fixed setting SDL_PROP_DISPLAY_WINDOWS_HMONITOR_POINTER for the initial display 2025-11-24 13:38:21 -08:00
Sam Lantinga
8fa93d64ab Reset the window icon when returning from fullscreen mode
Fixes https://github.com/libsdl-org/SDL/issues/14522
2025-11-24 13:28:36 -08:00
Sam Lantinga
56269cd010 Support PNG icons in the SDL test code 2025-11-24 13:16:16 -08:00
Ryan C. Gordon
4e79d2ad64 blit: Check MSVC's _M_ARM64 define in addition to __aarch64__.
Reference Issue #14519.
2025-11-24 23:56:04 +03:00
Sam Lantinga
6534345d9a Only process events for the window being created at creation time
Fixes https://github.com/libsdl-org/SDL/issues/14524
2025-11-24 12:47:31 -08:00
Ryan C. Gordon
7f0d0d0046 blit: Check MSVC's _M_ARM64 define in addition to __aarch64__.
Reference Issue #14519.
2025-11-24 13:37:10 -05:00
eafton
f7ded3db5e Add fribidi and libthai packages to README-linux.md 2025-11-24 09:18:06 -08:00
Sam Lantinga
ebd3aa5289 testgpu_spinning_cube: fixed error handling if texture creation fails 2025-11-24 08:31:38 -08:00
Sam Lantinga
ba919832e4 testgpu_spinning_cube: removed duplicate calls to clear and present 2025-11-24 08:24:43 -08:00
Ryan C. Gordon
1fdc7975cb visualc: Fixed corrupted SDL.vcxproj.filters file.
Fixes #14526.
2025-11-24 10:34:08 -05:00
Ryan C. Gordon
15f98b2a61 blit: Change ifdefs on NEON functions that use an aarch64-specific opcode.
Fixes #14519.
2025-11-24 10:32:30 -05:00
Ryan C. Gordon
17ab859907 main: Unify command line handling between standard Windows and GDK targets.
Reference Issue #14510.
2025-11-24 10:04:09 -05:00
Ryan C. Gordon
ff44bad9bd main: Restored lost call to SDL_SetMainReady() in Windows SDL_RunApp(). 2025-11-24 01:39:34 -05:00
Ethan Lee
54ef731534 video: Explicitly call DestroyWindowTexture when destroying a window.
This prevents some recursion issues with hashtables, as described in #14499.
2025-11-24 01:25:19 -05:00
Ryan C. Gordon
a37d3f96f4 main: SDL_RunApp now explicitly handles NULL argv in all implementations.
It'll usually replace it with `{ "SDL_app", NULL }`, but things like Win32
can query the OS for the original command line arguments.

This allows apps/scripting languages that provide their own entry points to
use SDL_RunApp and not have to worry about how to compose an argv array on
things like Windows, when SDL was going to do it for them anyhow.

Most things won't experience any change with this commit, including apps that
that want extra control but originate in a standard main()-style entry point
and can just pass the existing argc/argv through to SDL_RunApp.

Windows isn't addressed here, since a previous commit already updated it.
GDK has a different fix here, but we'll unify that in a later commit.

Closes #12676.
2025-11-23 23:38:41 -05:00
Anonymous Maarten
ce5e46c37d Add SDL_(Get|Set)iSurfaceClipRect automation test
Co-authored-by: Sam Lantinga <slouken@libsdl.org>
(cherry picked from commit a65111bd2d)
2025-11-24 00:02:36 +01:00
Ryan C. Gordon
7d5ec38953 main: Restore MINGW32_FORCEALIGN to SDL_RunApp on Windows. 2025-11-23 17:05:31 -05:00
Sam Lantinga
c0a2ae2a4a opengles2: fixed swapped colors when using indexed textures 2025-11-23 11:38:35 -08:00
Ryan C. Gordon
7388054fa2 main: Restore public domain comment in Windows code.
This, strictly speaking, doesn't _need_ to be public domain any more, since
SDL3 no longer inserts this code into apps via a static SDL_main library; it's
just part of the normal zlib-licensed SDL library and called into through a
well-defined entry point at startup, now.

But removing a public domain notice isn't the done thing, so we'll leave it in.

(To a related point: even if others have rewritten good portions of this code,
they're doing it under the assumption that this specific file has a public
domain license.)
2025-11-23 13:41:08 -05:00
Carl Åstholm
d0e70c37ab main: Rewrite the Windows implementation of SDL_RunApp()
This new implementation only parses the command line into an argv when
the provided argv is NULL. This lets programs that don't want to/can't
include `SDL_main.h` to do their own custom argument processing before
explicitly calling `SDL_RunApp()` without having SDL clobber the argv.

If the user includes `SDL_main.h` as normal, the behavior remains the
same as before (because `SDL_main_impl.h` passes a NULL argv).

In addition, this new implementation performs fewer allocations and no
longer leaks on failure.
2025-11-23 13:40:13 -05:00
Sam Lantinga
f0d958d850 Validate parameters to SDL_ReadStorageFile() and SDL_WriteStorageFile() 2025-11-22 18:41:30 -08:00
luckyxxl
6a1218c1cc Fix missing whitespace in surface extension missing error messages 2025-11-22 08:00:45 -08:00
Sam Lantinga
1fc093491a vulkan gpu: set the sample count for depth prepass
Fixes https://github.com/libsdl-org/SDL/issues/14500
2025-11-22 07:53:16 -08:00
SDL Wiki Bot
fed80a0d41 Sync SDL3 wiki -> header
[ci skip]
2025-11-21 18:57:12 +00:00
Esme
b984846dd0 windows: Add property mapping displayID to HMONITOR. (#14494) 2025-11-21 10:55:49 -08:00
Sam Lantinga
67728a5450 Allow resizing test applications on iPadOS 2025-11-21 09:31:10 -08:00
William Horvath
4b0514f087 Make use of GetQueueStatus' result in the Windows raw input loop.
Instead of only using it for the side effect of making MsgWaitForMultipleObjects block on the next call.

This has the added benefit of avoiding an extra MsgWaitForMultipleObjects call if there was actually new raw input in the queue already.
2025-11-21 08:28:09 -08:00
Ryan C. Gordon
029746a3d4 README-emscripten: Added some initial notes about customizing index.html.
Fixes #14485.
2025-11-21 10:25:34 -05:00
Ryan C. Gordon
62a7ac507a README-emscripten: updated notes on audio.
This still had a bunch of text that wasn't updated for SDL3's ability to deal
with pre-user-interaction pages. Same idea, but changed text that suggested
you have to wait to open the audio device.
2025-11-21 10:12:53 -05:00
SDL Wiki Bot
faf1e770dd Sync SDL3 wiki -> header
[ci skip]
2025-11-21 14:41:25 +00:00
Ryan C. Gordon
22df7c66ed wikiheaders: Treat docs/INTRO-* files the same way as the README files.
Closes #14261.
2025-11-21 09:36:56 -05:00
SDL Wiki Bot
d9230f4796 Sync SDL3 wiki -> header
[ci skip]
2025-11-21 13:14:42 +00:00
Ryan C. Gordon
0f76744828 pen: Updated documentation to meet current expectations and realities. 2025-11-21 08:13:16 -05:00
Ryan C. Gordon
3dee60d65f pen: Only allow one pen on Emscripten.
Same deal as the current Windows code: this "fixes" proximity but limits you
to a single pen device. But this is probably okay for most reasonable use
cases.
2025-11-21 08:13:16 -05:00
Ryan C. Gordon
06583ce421 pen: Only allow one pen on Windows.
This "fixes" proximity but limits you to a single pen device. But this is
probably okay for most reasonable use cases.
2025-11-21 08:13:16 -05:00
Ryan C. Gordon
99d7dad7e6 pen: Dramatic improvements to proximity information.
Now everything will attempt to track pens through proximity changes (instead
of removing the pen entirely). testpen.c has been updated to reflect this.

Some platforms and devices are better at this than others, but this seems like
a significant usability improvement across the board.

Fixes #12992.
2025-11-21 08:13:16 -05:00