We get audio artifacts if we don't work at the higher precision, but
this is painful on CPUs that have to use a software fallback for this,
so for now (that is, until we have a better solution), get better output
on amd64 chips, where the cost is less painful.
I don't know if we ever actually hit this in practice, but if this isn't
replacing the whole buffer, it needs to slide the end of the existing padding
over to the start before adding in the new data.
Linking with SDL dynamically allows end users to update SDL with bug fixes and new controller support and is recommended. This change makes it so SDL is dynamic by default and developers can build SDL themselves with a static option if that's something they need.
On Windows the main thread can be enumerating DirectInput devices while the Windows.Gaming.Input thread is calling back with a new controller available, and in this case HIDAPI_IsDevicePresent() returned false since the controller initialization hadn't completed yet, creating a duplicate controller.
Fixes https://github.com/libsdl-org/SDL/issues/7304
Use the delta of the target refresh rate and the refresh rate of the mode to select the closest matching display mode, as the actual closest mode may have a slightly lower rate than the target by a small fraction of a hz (e.g 59.98 vs 60.0).
Desktops can move windows, even exclusive fullscreen windows, from one display to another. To handle this, windows now hold two fullscreen modes: the desired mode, which is considered mutable only to the application, and the current mode. When a fullscreen request is made, the current mode is initially set to the desired mode for the initial fullscreen transition. If an exclusive fullscreen window is moved to a new display, the new display is checked to see if it has a mode compatible with the desired mode. If it does, the compatible mode is used so the windows will have the same properties on the new display. If no compatible mode is found, the window becomes desktop fullscreen. This occurs whenever the window is moved to ensure that an attempt will always be made to use the application's requested mode, if possible.
Exiting and reentering fullscreen results in the desired mode being restored on the display specified by it.