Support SDL_EVENT_DROP_TEXT in Windows
src/video/windows/SDL_windowsvideo.c + .h
Connect to COM WIN_CoInitialize + OLE OleInitialize in WIN_VideoInit
Disconnect from COM WIN_CoUninitialize + OLE OleUninitialize in WIN_VideoQuit
src/video/windows/SDL_windowswindow.c + .h
Create / Destroy IDropTarget or use fallback WM_DROPFILES
depending on OleInitialize success in WIN_VideoInit
Handle text/uri-list, text/plain;charset=utf-8, CF_UNICODE_TEXT, CF_TEXT, CF_HDROP
Call terminating WIN_AcceptDragAndDrop from WIN_DestroyWindow ( CleanupVideoData )
We want to keep mouse timestamps consistently using the same interval, and it's helpful to know when multiple keyboard events come in at the same time.
This avoids lots of build issues with the various D3D12 headers out there (MinGW, old Windows SDKs, etc) and also opens the door for WSL2 libd3d12.so support.
Note that the build system has not been changed; technically _all_ platforms now have d3d12.h but we should only enable the backend when it's actually expected to work.
It's possible to get message times out of order when processing the Windows message queue, so this passes those times through unchanged, while still detecting when the message tick wraps.
This patch fixes two issues with pausing and resuming the Android
activity when an external graphics context[1] is used:
1. When pausing, don't wait for the EGL context to be backed up if a
context wasn't created in the first place.
2. When resuming, don't recreate the EGL surface unless one was
requested by the user when originally creating the window.
[1] SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT_BOOLEAN
When the native window or surface backing the SDL window changes, e.g.,
when the activity is resumed, we should also update the corresponding
window pointer properties (SDL_PROP_WINDOW_ANDROID_{WINDOW,SURFACE}
_POINTER) so that they remain in sync.
This prevents continuing a rumble after the first one fails, and fixes a long standing crash issue if rumble is started immediately before the controller is disconnected.
Thanks to @AntTheAlchemist for the key bug report that showed what was happening here.
Fixes https://github.com/libsdl-org/SDL/issues/10422
The AAudio driver implemented pause/resume by dangerously locking the audio devices. If there was an audio hotplug event or a background thread tried to interact with the audio system, this could cause deadlocks.
0500b30c550900001472000001000000 is the ID when the controller is connected via Bluetooth and 0300b30c550900001472000011010000 is for USB mode.
Tested by setting "SDL_GAMECONTROLLERCONFIG" in some games.
Removed duplicate hints SDL_HINT_APP_NAME, SDL_HINT_APP_ID, and
SDL_HINT_AUDIO_DEVICE_APP_NAME.
Wired up a few things to use the metadata; more to come!
Fixes https://github.com/libsdl-org/SDL/issues/4703
If someone calls SDL_Quit(), then runs an SDL function that implicitly initializes TLS or logging, and then calls SDL_Quit() again, we want to make sure we run through the quit process again. Each of the Init/Quit calls are protected against being called multiple times.