|
@@ -92,12 +92,6 @@ typedef void (NTAPI *RtlGetVersion_t)(NT_OSVERSIONINFOW *);
|
|
|
|
|
|
// #define HIGHDPI_DEBUG
|
|
|
|
|
|
-// Fake window to help with DirectInput events.
|
|
|
-HWND SDL_HelperWindow = NULL;
|
|
|
-static const TCHAR *SDL_HelperWindowClassName = TEXT("SDLHelperWindowInputCatcher");
|
|
|
-static const TCHAR *SDL_HelperWindowName = TEXT("SDLHelperWindowInputMsgWindow");
|
|
|
-static ATOM SDL_HelperWindowClass = 0;
|
|
|
-
|
|
|
/* For borderless Windows, still want the following flag:
|
|
|
- WS_MINIMIZEBOX: window will respond to Windows minimize commands sent to all windows, such as windows key + m, shaking title bar, etc.
|
|
|
Additionally, non-fullscreen windows can add:
|
|
@@ -1510,72 +1504,6 @@ void WIN_DestroyWindow(SDL_VideoDevice *_this, SDL_Window *window)
|
|
|
CleanupWindowData(_this, window);
|
|
|
}
|
|
|
|
|
|
-/*
|
|
|
- * Creates a HelperWindow used for DirectInput.
|
|
|
- */
|
|
|
-bool SDL_HelperWindowCreate(void)
|
|
|
-{
|
|
|
- HINSTANCE hInstance = GetModuleHandle(NULL);
|
|
|
- WNDCLASS wce;
|
|
|
-
|
|
|
- // Make sure window isn't created twice.
|
|
|
- if (SDL_HelperWindow != NULL) {
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
- // Create the class.
|
|
|
- SDL_zero(wce);
|
|
|
- wce.lpfnWndProc = DefWindowProc;
|
|
|
- wce.lpszClassName = SDL_HelperWindowClassName;
|
|
|
- wce.hInstance = hInstance;
|
|
|
-
|
|
|
- // Register the class.
|
|
|
- SDL_HelperWindowClass = RegisterClass(&wce);
|
|
|
- if (SDL_HelperWindowClass == 0 && GetLastError() != ERROR_CLASS_ALREADY_EXISTS) {
|
|
|
- return WIN_SetError("Unable to create Helper Window Class");
|
|
|
- }
|
|
|
-
|
|
|
- // Create the window.
|
|
|
- SDL_HelperWindow = CreateWindowEx(0, SDL_HelperWindowClassName,
|
|
|
- SDL_HelperWindowName,
|
|
|
- WS_OVERLAPPED, CW_USEDEFAULT,
|
|
|
- CW_USEDEFAULT, CW_USEDEFAULT,
|
|
|
- CW_USEDEFAULT, HWND_MESSAGE, NULL,
|
|
|
- hInstance, NULL);
|
|
|
- if (!SDL_HelperWindow) {
|
|
|
- UnregisterClass(SDL_HelperWindowClassName, hInstance);
|
|
|
- return WIN_SetError("Unable to create Helper Window");
|
|
|
- }
|
|
|
-
|
|
|
- return true;
|
|
|
-}
|
|
|
-
|
|
|
-/*
|
|
|
- * Destroys the HelperWindow previously created with SDL_HelperWindowCreate.
|
|
|
- */
|
|
|
-void SDL_HelperWindowDestroy(void)
|
|
|
-{
|
|
|
- HINSTANCE hInstance = GetModuleHandle(NULL);
|
|
|
-
|
|
|
- // Destroy the window.
|
|
|
- if (SDL_HelperWindow != NULL) {
|
|
|
- if (DestroyWindow(SDL_HelperWindow) == 0) {
|
|
|
- WIN_SetError("Unable to destroy Helper Window");
|
|
|
- return;
|
|
|
- }
|
|
|
- SDL_HelperWindow = NULL;
|
|
|
- }
|
|
|
-
|
|
|
- // Unregister the class.
|
|
|
- if (SDL_HelperWindowClass != 0) {
|
|
|
- if ((UnregisterClass(SDL_HelperWindowClassName, hInstance)) == 0) {
|
|
|
- WIN_SetError("Unable to destroy Helper Window Class");
|
|
|
- return;
|
|
|
- }
|
|
|
- SDL_HelperWindowClass = 0;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
|
|
|
void WIN_OnWindowEnter(SDL_VideoDevice *_this, SDL_Window *window)
|
|
|
{
|