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
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.
Some devices with broken drivers hang when their name is queried, so added a workaround for applications that don't need input device details. The long term fix is to move the hotplug detection into a separate thread.
We only want to change cursor display scale if the application or the user opts in by setting a hint. Otherwise cursors could change size unexpectedly when upgrading to SDL 3.4.0.
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.
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.
Some caveats:
- the fake pen will leave proximity only when relative mode is disabled
- unsure if detecting proximity is even possible from raw mouse input
Fixes#12324.
This changes the default for SDL_GL_FRAMEBUFFER_SRGB_CAPABLE to -1 (for
"don't care"). Minor ABI break, but technically this never worked correctly.
Fixes#13055.
When running on 32-bit Windows, DefWindowProc resolves to a function in ntdll.dll, but after the window is created the actual window proc is a function in user32.dll. We solve this by using our own custom default window proc and looking for that instead.
Fixes https://github.com/libsdl-org/SDL/issues/1442
This makes sure that anything that hooks window creation to set up window proc hooks will call DefWindowProc instead of infinitely recursing when we set up our window proc afterwards.
Fixes https://github.com/libsdl-org/SDL/issues/10529
Adds support for animated cursors on Cocoa, Wayland, Win32, and X11.
testcursor can take a semicolon separated list of filenames and load an animated cursor from them.