100 Commits
Author SHA1 Message Date
Ryan C. Gordon 7a56d55a54 Sync SDL3 wiki -> headers. 2026-11-29 20:28:02 -05:00
Ryan C. Gordon 2c52c10441 webgpu: Several wikiheaders fixes for the new WebGPU work. 2026-11-29 20:27:01 -05:00
Ryan C. Gordon f9d0f07eca webgpu: Restore reverted code from cdf5299706. 2026-11-29 20:21:27 -05:00
Ryan C. Gordon a19af5051c Revert "Sync SDL3 wiki -> header"
This reverts commit b21ee37bbb.
2026-11-29 20:20:34 -05:00
Ryan C. Gordon e623812beb Revert "gpu: Make WebGPU device creation fail if Asyncify isn't linked & add Asyncify to requirements (#16853)"
This reverts commit cdf5299706.
2026-11-29 16:59:04 -05:00
Ryan C. Gordon 20541fb3a2 Revert "Sync SDL3 wiki -> header"
This reverts commit ac226f443d.
2026-11-29 16:58:51 -05:00
Ryan C. Gordon f198c2b9fc opengl/opengles: Forgot to actually delete the FBO destroying textures. 2026-11-27 19:05:36 -05:00
Ryan C. Gordon 255c9fe80a opengles: Rework render targets.
Now this keeps one FBO for each SDL_TEXTUREACCESS_TARGET texture, and doesn't
reuse it. We check if the FBO is "complete" once, at creation time, and
setting a render target merely has to bind the right FBO and never look back.

This simplifies the code and removes a guaranteed pipeline stall when setting
a new render target.

(This code merged over from the GLES2 renderer, from changes made in
56e0d052f18938e8d9c6cfe11d87d118afc1990d.)

Fixes #16839.
2026-11-27 19:01:22 -05:00
Ryan C. Gordon 5db07ab904 opengl: Rework render targets.
Now this keeps one FBO for each SDL_TEXTUREACCESS_TARGET texture, and doesn't
reuse it. We check if the FBO is "complete" once, at creation time, and
setting a render target merely has to bind the right FBO and never look back.

This simplifies the code and removes a guaranteed pipeline stall when setting
a new render target.

(This code merged over from the GLES2 renderer, from changes made in
56e0d052f18938e8d9c6cfe11d87d118afc1990d.)

Reference Issue #16839.
2026-11-27 18:25:14 -05:00
Ryan C. Gordon a01f51916e .github: Added an issue template.
This shows some helpful tips about how to submit good bugs and has a checkbox
saying something like "I promise this isn't just a wall of LLM-generated text."
2026-11-25 00:20:54 -05:00
Ryan C. Gordon 1036672b91 README-linux: Update openSUSE package list.
Fixes #16172.
2026-11-24 15:52:12 -05:00
Ryan C. Gordon 5cd603e41a ohaudio: Reduce latency.
Fixes #16801.
2026-11-23 12:50:49 -05:00
Ryan C. Gordon e8a12ed5e3 docs: Add some thread safety notes to SDL_GL_CreateContext().
Reference Issue #16787.
2026-11-23 12:31:08 -05:00
Ryan C. Gordon 5e7b0bd9f1 docs: Several corrections and improvements to OpenGL-related API documentaton.
Fixes #16787.
2026-11-21 09:06:43 -05:00
Ryan C. Gordon f2262b8c5f filesystem: Added SDL_GetCachePath().
Fixes #13986.

[sdl-ci-filter *]
2026-11-19 17:00:56 -05:00
Ryan C. Gordon 52b0891ffd windows: Simplify SDL_SYS_GetPrefPath(). 2026-11-19 17:00:56 -05:00
Ryan C. Gordon 53051e57f4 unix: Cleaned up SDL_SYS_GetPrefPath(). 2026-11-19 17:00:56 -05:00
Ryan C. Gordon 5b0e7fe758 haiku: Use actual system APIs for SDL_SYS_GetPrefPath() instead of hardcoding. 2026-11-19 17:00:56 -05:00
Ryan C. Gordon 667744d2ab ohaudio: Fixed backwards parameter.
These got swapped earlier, and either this one was missed or the HarmonyOS
port was merged after that change.
2026-11-19 15:30:40 -05:00
Ryan C. Gordon 19558770e8 egl: Support EGL_EXT_swap_tearing_hint for late-swap tearing, etc.
Also removed FIXME about supporting EGL_EXT_swap_control_tear; that extension
was abandoned without being approved.

Fixes #16716.
2026-11-19 10:29:42 -05:00
Ryan C. Gordon abc13099a9 README-linux.md: Added notes on building an x86-32 binary on an x86-64 system.
Fixes #14774.
2026-11-18 20:01:34 -05:00
Ryan C. Gordon 543e3e13a3 docs: fix where GPU API docs said "first_vertex" but meant "first_offset".
Fixes #15475.
2026-11-18 15:05:46 -05:00
Ryan C. Gordon 293acc51a1 gpu: Vulkan on HarmonyOS needs same swapchain transform tweak as Android.
Fixes #16670.
2026-11-18 14:56:27 -05:00
Ryan C. Gordon 4deba70e89 PreseedOpenHarmonyCache.cmake: HarmonyOS/OpenHarmony has poll(). 2026-11-18 12:05:04 -05:00
Ryan C. Gordon 739e8bb04d x11: Visual color masks are unsigned long long, don't assign them to an int.
(Strictly speaking, these are Uint64 on most things we care about, but the
goal here is to remove the sign conversion, which can cause problems depending
on your Visual and CPU, not to get into color formats we've never supported
and probably aren't widespread anyhow.)

Fixes #16513.
2026-11-15 15:26:54 -05:00
Ryan C. Gordon 207261e19d x11: Make variables inline, put duplicate code in macro, in X11_CreateWindow. 2026-11-15 15:26:36 -05:00
Ryan C. Gordon fff3d3516e thread: Added SDL_GetCurrentThreadName().
Fixes #15919.
2026-11-12 14:35:18 -05:00
Ryan C. Gordon 10d6488786 audio: Adjust some device-opening hints.
- They now work when the app specifies a NULL spec (verses a spec with zero'd
  fields).
- They now favor the hint, falling back to the device's default settings
  (before they would fall back to `DEFAULT_AUDIO_*` defines, but it's better
  to default to what the hardware natively offers, and if the device doesn't
  specify a default, they'll be set to those defines earlier anyhow). This
  uses `device->default_spec` instead of `device->spec` so if something opens
  the device at a low-quality, it doesn't force all future default opens to
  conform to it.
- Hint docs now explain this.

Fixes #16652.
2026-11-05 16:05:16 -05:00
Ryan C. Gordon b1eb76ec27 emscripten: wasm64 fixes (thanks, jsm174!).
Fixes #16635.
2026-11-02 12:45:35 -05:00
Ryan C. Gordon 3582beeb69 dinput: Fix rumble in DirectInput, and reduce allocations in Effect creation.
Fixes #16613.
2026-10-31 11:05:04 -04:00
Ryan C. Gordon e0232c5b9d cocoa: Attempt to convert incoming clipboard UTF-16 strings to UTF-8.
Do this only if the app didn't ask for a specific encoding.

Fixes #16438.
2026-10-29 16:31:39 -04:00
Ryan C. Gordon a45cd584df ci: Steam Linux Runtime 3.0 is no longer set to allow_failure=True.
(It was failing due to forces beyond SDL's control, but has since been fixed.)

Fixes #16285.
2026-10-28 17:54:06 -04:00
Ryan C. Gordon 3ba0cef695 filesystem: OpenHarmony support in posix SDL_SYS_CreateDirectory.
This probably needs the same magic as Android, so it's now updated for that.
2026-10-28 14:25:21 -04:00
Ryan C. Gordon b6d049a173 audio: Add PostOpenDevice method to backend.
Runs after a successful OpenDevice call, _without the device lock held_.

The immediate need is that the JACK backend calls jack_activate() during
device open, which blocks until stuff happens on an internal, JACK-controlled
thread. But several things this thread might do will obtain the SDL audio
device lock, which is being held until after jack_activate returns. So now we
do everything _but_ activate during OpenDevice(), and activate starts
everything flowing during PostOpenDevice() now.

Other backends (PipeWire, PulseAudio, etc) might have similar problems with
other workarounds in place, but might benefit from PostOpenDevice in the same
way.

Fixes #16551.
2026-10-28 13:24:10 -04:00
Ryan C. Gordon 0810d31a55 Add another USB vendor/product ID for a PDP Afterglow controller.
Fixes #16585.
2026-10-28 11:48:23 -04:00
Ryan C. Gordon 7d28e14a02 opengles2: Remove the program cache limit.
This doesn't make _that_ many programs, and it would be extremely expensive
if an app was causing a cache eviction per-frame.

Fixes #16598.
2026-10-28 11:38:34 -04:00
Ryan C. Gordon b80368fee8 video: Add a "VideoPreQuit" method, move Windows hotplug shutdown to it.
This prevents the thread from adding devices after the rest of the video
subsystem has gone down. Now the thread is gone before that.

Fixes #16437.
2026-10-27 09:37:18 -04:00
Ryan C. Gordon 660c4acf17 camera/pipewire: Don't block forever in WaitDevice if no signal arrives.
Fixes #10842.
2026-10-25 18:30:53 -04:00
Ryan C. Gordon dac33b4369 audio: SDL_AUDIO_FRAMESIZE "returns" an unsigned int.
Otherwise, this macro would always trigger a `-Wsign-conversion` warning,
since it multiplies an unsigned int by a signed int.

Fixes #16539.
2026-10-25 16:04:49 -04:00
Ryan C. Gordon 8be6db493e SDL_keyboard.h: add notes about threading vs SDL_GetKeyboardState.
Fixes #16562.
2026-10-25 15:18:01 -04:00
Ryan C. Gordon 507179ee74 misc: Added SDL_EncodeURL.
Fixes #16254.
2026-10-13 22:16:04 -04:00
Ryan C. Gordon ab5541ec5d audio: Make sure to set device->spec before actually opening the device.
This was a regression introduced in 36fed09edb.

(slouken actually caught this one, but I'm committing the fix.)
2026-10-13 12:35:52 -04:00
Ryan C. Gordon 8e5388c72f testrwlock: Redesign to fix some flaws.
- Now the writer increments a global variable, and readers report on its
  current value, which shows not just what order things lock, but also that
  serialization is happening appropriately.
- Readers will, once we hit the timeout, sleep and never try to grab the lock,
  so even if normal operation results in complete starvation (launch with
  `--nbthreads 1000`, etc), the writer will be able to obtain the lock
  shortly after the time limit and everything will shut down in orderly
  fashion.
- Other minor cleanups and tweaks.

Fixes #15346.
2026-10-12 19:41:01 -04:00
Ryan C. Gordon 69dd29eec2 kmsdrm: If async page flip fails, try again without the async flag.
Fixes #16174.
2026-10-12 15:50:28 -04:00
Ryan C. Gordon 408709ad5e wikiheaders: disable Undocumented.md page by default.
Fixes #16478.
2026-10-12 14:16:25 -04:00
Ryan C. Gordon 9e3f213b94 audio: FIXME removal: internal callback where userdata wasn't first parameter. 2026-10-11 10:19:37 -04:00
Ryan C. Gordon c409c327f9 camera: FIXME removal: internal callback where userdata wasn't first parameter. 2026-10-11 10:19:37 -04:00
Ryan C. Gordon 52ef28aeba stdlib: Fail if we can't create a mutex in SDL_CreateEnvironment().
Even single-threaded platforms will successfully create a (no-op) mutex now.
2026-10-11 10:19:36 -04:00
Ryan C. Gordon 6b7096c97e hashtable: Prefix externally-defined macros with "SDL_", remove an underscore.
Before you would get `MyHashtable_Find()`. Now it's `MyHashtableFind()`, which
fits SDL coding style better.
2026-10-09 11:34:45 -04:00
Ryan C. Gordon c314de7ce9 ci: Add HarmonyOS/OpenHarmony builds to Github Actions.
This builds SDL with CMake, like a normal library, and a small app with
"hvigor", which is HarmonyOS's equivalent to Android's gradle, to test the
parts that CMake doesn't touch.

This is added to the non-priority builds.

[sdl-ci-filter *]
2026-10-08 14:49:35 -04:00
Ryan C. Gordon b4c0634fef main: Call SDL_AppQuit() if SDL_EVENT_TERMINATING fires.
We had logic to do this, but due to the nature of iOS, we never actually
called it because the process terminated before we could. This was likely
true on Android, HarmonyOS, and Emscripten, too, so this adds a new interface
that various platforms can use as appropriate when the event fires.

The generic implementation just attempts to set apprc to success, which will
result in normal process termination, including calling SDL_AppQuit(), which
matched current behavior, but to be fair, all the platforms that use the
generic backend shouldn't ever fire this event.

When calling SDL_AppQuit() due to SDL_EVENT_TERMINATING, the other backends
leave the SDL_AppResult as SDL_APP_CONTINUE (assuming SDL_AppEvent() didn't
respond to SDL_EVENT_TERMINATING by returning a terminating result), so that
SDL_AppQuit() has a signal that they have arrived at termination in an unusual
way, instead of the app explicitly requesting it.

Fixes #16457.
2026-10-08 11:20:27 -04:00
Ryan C. Gordon 57f22e6e43 stdlib: Fix copy/paste error in StepUTF8().
Fixes #16464.
2026-10-08 11:10:08 -04:00
Ryan C. Gordon d365d1795a testgles2: HarmonyOS has GLES2 support, enable this test app there. 2026-10-08 10:58:50 -04:00
Ryan C. Gordon 6c518525ac audio: Added notes about the risks of SDL_LockAudioStream vs the device lock.
Fixes #16362.
2026-10-07 09:37:40 -04:00
Ryan C. Gordon e5335f9a20 migration: Fixes and additions to SDL_migration.cocci and README-migration.md. 2026-10-05 15:00:22 -04:00
Ryan C. Gordon 008dd4195b docs: Corrections and improvements to Locale documentation. 2026-10-05 15:00:21 -04:00
Ryan C. Gordon 9780425540 events: Send pen device type with each event.
It's the only thing you would need to query with an external function, and the
pen ID could be invalid by the time you run the event queue, so it's easier to
just include it with the events.

Fixes #16316.
2026-10-01 15:03:47 -04:00
Ryan C. Gordon a19bac6521 docs: Don't put SDL_main_impl.h in the "Main" wiki documentation category.
Nothing in here has public API documentation (intentionally), and since it's
in the same category as SDL_main.h, it would overwrite its function-order list,
causing the "Main" section to be dropped from the Quick Reference pages.
2026-09-26 00:15:53 -04:00
Ryan C. Gordon a9bd41592d wikiheaders: Sort headers before processing.
Otherwise, you might get SDL_main_impl.h after SDL_main.h, which destroys its
entry in the quick reference. (Fix for that coming in a later commit.)
2026-09-26 00:14:11 -04:00
Ryan C. Gordon 6264f1805a audio: Add some formal debug logging to device open/close attempts. 2026-09-21 14:55:26 -04:00
Ryan C. Gordon 36fed09edb audio: Don't force minimum device spec.
Now we allow physical devices to reopen at a higher spec if necessary.

Added test/testdynaudioreopen.c to stress test this change.

Fixes #14558.
2026-09-21 14:55:26 -04:00
Ryan C. Gordon 0ccb0bf626 audio: Added SDL_GetAudioDeviceProperties() and a unique-id property for it.
In addition to adding properties to audio devices, the new property,
`SDL_PROP_AUDIO_DEVICE_UNIQUE_ID_STRING`, allows a best-effort option to find
the same specific audio device used on a previous run of a program, even in an
imperfect way. Most backends don't support this, but CoreAudio on macOS and
IMMDevice on Windows can.

coreaudio: Rework device enumeration queries, acquire unique_id.

- No longer keeps multiple AudioObjectPropertyAddress objects, just change the
  selector for each query.
- Move string retrieval for AudioObjectProperties off to a separate function.
- Query for unique_id.
- If a device name is blank, don't reject the device, try to come up with a
  name of some sort (either the unique_id or "Unnamed audio device").

windows: Add unique audio device identifiers to IMMDevice support.

This uses the new "StableId" property on Windows 11 if available, and the
device id (IMMDevice::GetId()) otherwise.

Microsoft claims that GetId() remains valid between reboots and even
disconnecting and reconnecting the audio device (although I am dubious that is
universally true when plugging into a different USB port, etc), but driver and
OS updates might change the identifier. StableId goes further, promising that
software updates won't change it, either.

This adds support to our WASAPI and DirectSound backends, if you're on at
least Windows Vista. Windows XP will not offer a unique ID for devices.

Fixes #16258.
2026-09-21 10:16:37 -04:00
Ryan C. Gordon e5ff717495 audio: comment updates. 2026-09-21 10:16:37 -04:00
Ryan C. Gordon a24429c192 harmonyos: Port SDL3 to HarmonyOS/OpenHarmony.
This is my port of SDL3 to HarmonyOS/OpenHarmony. It has been tested on real
hardware from Huawei, and commercial games are being prepped to ship with it
already.

There is _heavy_ documentation in docs/README-harmonyos.md, including how to
set up a development environment and project, build, and debug, for the
completely uninitiated.

This work was sponsored by Outfit7: https://outfit7.com/

Fixes #9837.
2026-09-15 12:33:00 -04:00
Ryan C. Gordon 570f72297b docs: Fix default behavior description for SDL_PROP_APP_METADATA_NAME_STRING.
Fixes #16317.

(cherry picked from commit ddba673cdd)
2026-09-14 16:13:01 -04:00
Ryan C. Gordon b290793b78 stdinc: On Windows, uppercase the system environment table's var names.
Fixes #15086.
2026-09-13 10:47:29 -07:00
Ryan C. Gordon 68655e9772 kmsdrm: Instead of demanding ARGB8888, try to find a supported surface format.
Fixes #16136.
2026-09-10 23:47:24 -04:00
Ryan C. Gordon d66e2d0cbd cocoa: Added SDL_HINT_MAC_USE_GCMOUSE.
Reference Issue #16241.
2026-09-10 09:51:10 -04:00
Ryan C. Gordon ea74d3b018 metal: Clear bogus pointer if we fail to get a new drawable.
Reference Issue #16232.
2026-09-04 15:55:40 -04:00
Ryan C. Gordon a29eba40a4 kmsdrm: atomic path FIXME cleanup, must call CreateSurfaces.
This was a pending question from the atomic merge. Not only does this function
need to be called, it needs to be called in the SwapWindow* functions first,
like the legacy (non-atomic) path does.

Reference Issue #16136.
2026-09-02 10:35:37 -04:00
Ryan C. Gordon 22e42e6e1e aaudio: Make input preset into a hint, don't set it by default.
Fixes #16130.
Reference Issue #13402.
2026-09-01 14:03:24 -04:00
Ryan C. Gordon fd28dc9d56 PULL_REQUEST_TEMPLATE.md: "Zlib" should not be capitalized. 2026-08-31 13:27:23 -04:00
Ryan C. Gordon 83ab835bfd AGENTS.md: Updated text with latest policy revisions.
Reference Issue #15350.
2026-08-31 13:27:23 -04:00
Ryan C. Gordon c71abd0860 bmp: Correctly load RLE-encoded bitmaps with irregular widths.
(Such as a 4-bpp image--two pixels per byte--with an odd number of pixels.)

Fixes #16210.
2026-08-28 21:23:59 -04:00
Ryan C. Gordon af9dbb65f6 alsa: Manage device index, not just card ID.
Otherwise multiple devices on one card won't open correctly.

Fixes #16205.
2026-08-27 14:23:09 -04:00
Ryan C. Gordon 774a3a0ab1 joystick: Fixed \since version for new sensor APIs. 2026-08-27 11:06:05 -04:00
Ryan C. Gordon 4f3d7017b0 joystick: Expose sensor data at the SDL_Joystick level.
Previously this was only available through the gamepad API, but this state has
always actually lived on the lower-level joystick objects, so there's no sense
in not offering a public API for that level, as well.

Closes #16202.
2026-08-27 10:18:03 -04:00
Ryan C. Gordon 4f477c807c cocoa: Run the CFRunLoop for 20ms during SDL_Quit().
This lets the OS remove windows that were destroyed in cases where we aren't
terminating the process right after calling SDL_Quit(). Otherwise, they'll
stay on the screen, unresponsive.

Apparently there is some animation state that needs to complete, and that is
handled via the runloop.

Fixes #10081.
2026-08-27 00:23:20 -04:00
Ryan C. Gordon 618890f8fa emscripten: Don't fall back to simulating vsync if settings are still pending.
Fixes #16146.
Closes #16151.
2026-08-27 00:19:56 -04:00
Ryan C. Gordon 0932b559e8 wikisync: Testing wikiheaders bridge, disregard. 2026-08-23 16:29:53 -04:00
Ryan C. Gordon 8e22e4f916 wikiheaders: Report full path when dying for a doubly-defined section.
(cherry picked from commit 1d4b0337ac)
2026-08-20 15:26:25 -04:00
Ryan C. Gordon e4c41d393b events: Note that SDL_PenProximityEvent::pen_state was added for 3.4.16. 2026-08-18 21:01:53 -04:00
Ryan C. Gordon c5491474de pen: If a pen leaves proximity, force all its pressed buttons to released.
Some platforms do this for us, but just in case there is a badly-behaved one,
this will help keep application state correct.

Reference Issue #16125.
2026-08-18 16:08:21 -04:00
Ryan C. Gordon 3bdb7d00d5 pen: Report SDL_PenInputFlags in SDL_PenProximityEvent.
Fixes #16125.
2026-08-18 16:07:51 -04:00
Ryan C. Gordon 0fb1177405 Manually sync wiki -> headers.
Trying to coerce SDLWikiBot to stop eating changes.
2026-08-11 09:41:55 -04:00
Ryan C. Gordon f17fc121aa cocoa: SDL_GetClipboardData() needs to conform the mimetype.
Fixes #16077.
2026-08-03 11:52:13 -04:00
Ryan C. Gordon 958c4cbf0d cocoa: Use macOS 26.x mouse workaround for all windows, not just fullscreen.
This is a temporary workaround until we understand the issue better.

Reference Issue #15967.
2026-08-03 02:19:24 -04:00
Ryan C. Gordon 5ff9c119fc audio: Fixed linked list when logical devs move to a new default physical dev. 2026-07-19 21:49:31 -04:00
Ryan C. Gordon df7b937361 android: Fix pen creating phantom mouse events in relative mode.
This mostly just unifies code that was handling this case elsewhere already.

Fixes #15620.
2026-07-17 12:59:26 -04:00
Ryan C. Gordon 758dab45af properties: Fixed a typo in a comment.
(cherry picked from commit 5b5713b955)
2026-07-13 18:39:23 -04:00
Ryan C. Gordon c9ebec4687 iostream: Create properties on-demand instead of upfront.
It's possible that IOStreams might get created and thrown away a lot, perhaps
at any point in an app's lifetime, so it makes sense to avoid doing the work
of maintaining a properties group for each, if the app hasn't requested it,
since this requires a bunch of allocations and locks.

It's not necessarily worth doing this for other SDL objects, like SDL_Window,
since there are likely to only be a few of them, and likely created at startup
and living for the entire lifespan of the app.

Fixes #14436.
2026-07-13 15:33:08 -07:00
Ryan C. Gordon daf519ae05 assert: make disabled asserts work with bitfield conditions.
We don't care _what_ the `sizeof` results are, we just want it to vaporize
the condition's code out of the build. So we check it with a `? 1 : 0`, so it
always boils down to a `sizeof (int)`, no matter what data type the condition
actually is.

This works with bitfields, pointers, anything that can be "truthy." If it
isn't truthy, it would fail when assertions are enabled anyhow.

Fixes #15990.
2026-07-13 18:17:33 -04:00
Ryan C. Gordon d629eb3bf0 vita: Treat the d-pad as a hat switch at the SDL_Joystick level.
Reference Issue #14830.

[sdl-ci-filter *]
2026-07-11 20:33:10 -07:00
Ryan C. Gordon 52ae8796a8 psp: Treat the d-pad as a hat switch at the SDL_Joystick level.
Reference Issue #14830.
2026-07-11 20:33:10 -07:00
Ryan C. Gordon 8c7508decd ps2: Treat the d-pad as a hat switch at the SDL_Joystick level.
Reference Issue #14830.
2026-07-11 20:33:10 -07:00
Ryan C. Gordon fb3afd33e4 n3ds: Treat the d-pad as a hat switch at the SDL_Joystick level.
Reference Issue #14830.
2026-07-11 20:33:10 -07:00
Ryan C. Gordon 82141a2439 api: Added SDL_GetNumProperties().
Fixes #14761.
2026-07-11 15:11:30 -04:00
Ryan C. Gordon e7be7d844a vulkan: Make SDL_Vulkan_GetInstanceExtensions more robust.
Now it handles NULL `count` params at the higher level, and doesn't explode if
a backend doesn't implement it.
2026-07-09 17:28:07 -04:00
Ryan C. Gordon eb04627741 stdinc: SDL_SetMemoryFunctions now handles NULL function pointers better.
Now it does _not_ call SDL_SetError(), since that would allocate memory with
the system in a weird state, and setting all four functions to NULL will
restore the original memory functions, as a shortcut vs having to query
SDL_GetOriginalMemoryFunctions() first.

Fixes #15914.
2026-07-01 18:00:09 -04:00
Ryan C. Gordon 774728b6ff audio: Pass the id, not the obj, to SDL_AudioDeviceDisconnected_OnMainThread.
If a device has disconnected, and the app has quit the audio subsystem before
the queued main thread function has run, the pointer will be bogus by the time
the run occurs. So now it looks up the object from its device ID, and if the
lookup returns NULL, it returns immediately and everything works out.

Reference Issue #14856.

(which might be fixed by this or not.)
2026-06-30 16:19:49 -04:00