CMake's SDL_build_config.h force disables HAVE_STDIO_H when buiding
winrt in non-libc mode.
Becase CreateFileEx is not available in UWP mode, use CreateFile2
instead.
This usually manifests as a clicking sound, because it often produces
a value outside the range -1.0f to 1.0f based on whatever random data
is past the buffer, which later stages of audio conversion will clamp
to a maximum value for the audio format. Since this tends to be a single
bad sample generated at the end of the resampled buffer, it sounds like
a repeating click in streamed data.
I'd like a more efficient means to clamp this value to not overflow the
buffer, but this puts out the immediate fire.
This happens in the KMSDRM driver, once after video init, setting a blank default cursor, and once when creating a window when the KMSDRM mouse is initialized.
Also fixed a memory leak freeing the default cursor at shutdown
testcontroller expects to be able to call SDL_GetGamepadStringForButton() and find that name in the binding string
We can revisit this later if it becomes important to use new names in bindings. @smcv
The sequence order of the four paddles is not obvious, with SDL and Xbox
controllers swapping the order of P2 and P3 relative to each other.
If we group them into left and right, then it becomes more obvious.
Signed-off-by: Simon McVittie <smcv@collabora.com>
The ability to pass a pathlib.Path to open() was new in Python 3.6,
and the oldest branch of the Steam Runtime only has Python 3.5 available.
Even without considering retrocomputing, using the Path.open method is
more consistent with how we read the input 2 lines earlier.
Signed-off-by: Simon McVittie <smcv@collabora.com>
According to #8088 it has no value as an automated test, and by
default it takes long enough to hit the default test timeout.
Resolves: #8088
Signed-off-by: Simon McVittie <smcv@collabora.com>
The current status is stored in the SDL_rwops 'status' field to be able to determine whether a 0 return value is caused by end of file, an error, or a non-blocking source not being ready.
The functions to read sized datatypes now return SDL_bool so you can detect read errors.
Fixes https://github.com/libsdl-org/SDL/issues/6729
I don't know of any specific issue with this, but third party PS4 controllers have had issues with reports that are specific to Sony hardware, so this is a speculative change to prevent issues with future controllers.
If it turns out that these reports are valid and useful for third party controllers, we can back this change out.
We should always report touchpad and battery status if they are available. We just want to make sure we don't enable enhanced reports unless the application wants that behavior.