DSV creation was missing a TEXTURE2DARRAY branch for array, cube, and
cube-array depth textures. It fell through to TEXTURE2D, so
FirstArraySlice was never set and all layers' DSVs targeted layer 0.
This caused incorrect rendering when using depth textures with multiple
layers, such as cubemap shadow maps.
Previously it would have reported success but not returned a valid string, and
didn't check for the (probably extremely unlikely) case of overflowing our
locale list array.
SDL_GetGrabbedWindow() can be called when the video system is uninitialized, and, since there is no window parameter, _this must be checked for validity to avoid a segfault.
It SDL_SYS_EnumerateDirectory was changing the path string and passing it to
the callback, causing chaos in the glob handler, which expected the original
string to pass through.
Fixes#15057.
This reverts commit 63c0650321.
This reverts a revert; leaving this in main, where we'll examine it in 3.6.0.
This remains reverted in release-3.4.x
Reference Issue #15058.
Avoids a null dereference of currentRegion->vulkanTexture->container in DefragmentMemory:
} else if (!currentRegion->isBuffer && !currentRegion->vulkanTexture->markedForDestroy) {
...
¤tRegion->vulkanTexture->container->header.info
... (among others)
by not "VULKAN_Submit"ting (and thus adding it to the defrag pool) before setting the container.
Although rare (defrag almost never ran), this crash happened in a real-world application.
Getting device names can hang for a long time on certain devices, so make sure this is done on a separate thread to avoid blocking initialization and the main loop.
Fixes https://github.com/libsdl-org/SDL/issues/12913
Rumble can often take a long time, and it is theoretically safe to simultaneously read and write hidapi devices on all platforms.
Fixes https://github.com/libsdl-org/SDL/issues/9441
FS.mkdir() will throw a javascript exception if the scratch directory already
exists, so catch/ignore that.
Wrap the rest of the scratch i/o in a try/catch block; the event will only
send if everything works out.
Wrap some calls from Javascript to the C runtime's free() in an
EMSCRIPTEN_KEEPALIVE function, so that the compiler doesn't optimize the
function out and crash at runtime.
Fixes#14999.