The default varies between OpenGL and OpenGL ES, so try to force it to what
the app actually requested with SDL_GL_FRAMEBUFFER_SRGB_CAPABLE.
Fixes#14898.
(cherry picked from commit 083c6b8872)
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.
(cherry picked from commit 267e681a0b)
This controller has 3 interfaces, one for the Xbox gamepad protocol, and two HID interfaces. We should only handle the Xbox interface in the Xbox driver.
(cherry picked from commit 9f8c70713a)
Removed obsolete documentation that shows this usage and macros that attempt it.
Also allow SDL_FUNCTION to be redefined by the application.
Fixes https://github.com/libsdl-org/SDL/issues/15004
(cherry picked from commit 6feb0e1333)
In SDL_audio.c:OpenPhysicalAudioDevice, an attempt is made to SDL_CreateThread
if ProvidesOwnCallbackThread is false, but SDL_CreateThreadWithPropertiesRuntime
is not implemented for Emscripten, so this always fails. I'm not sure if/when
this ever worked, but it simply cannot work in its current state.
(cherry picked from commit 8ee7dc2f9f)
The patterns we were using don't match the official patterns, which fill up as
many lights as players instead of just using the nth player LED. Above 4,
there are some special patterns, as documented on Nintendo's Singaporean site:
https://www.nintendo.com/sg/support/qa/detail/33822
(cherry picked from commit 017d950b6b)
This hint is documented to not just turn off fullscreen windows going into a
new Fullscreen Space, but also to make the green button on a resizeable
window's title bar do a maximize/zoom instead of make the window fullscreen.
Previously, this only did the former and not the latter (or perhaps it worked
and the defaults changed in a newer macOS, we aren't sure).
Fixes#7470.
(cherry picked from commit 50f3adec77)
This also delays pen proximity out events to make sure that the pen is really gone before delivering them. On Android, you get a HOVER_EXIT event when the pen contacts the surface, which we don't want to treat as the pen leaving proximity.
(cherry picked from commit bddf6d3e2a)
In this case, it's available via both libusb and hidraw, but the hidraw device isn't usable. If a device needs to be opened via libusb, don't expose it via hidraw enumeration.
(cherry picked from commit f60231759d)
On Windows there is a separate HIDAPI device for each slot. On Linux and macOS, there is a single HIDAPI device and the slot is included in the report.
(cherry picked from commit cdffbdfeaf)
We still need the task to go through the IoRing, even though the flush
operation we use to get it there will always fail on a read-only file. So
check for this specific case and don't report failure.
Fixes#14878.
(cherry picked from commit 4df13e8806)