mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-29 04:21:03 +08:00
GDK: Xbox should have input focus by default
This commit is contained in:
@@ -523,6 +523,7 @@ static int SetupWindowData(SDL_VideoDevice *_this, SDL_Window *window, HWND hwnd
|
|||||||
|
|
||||||
#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
|
#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
|
||||||
window->flags |= SDL_WINDOW_INPUT_FOCUS;
|
window->flags |= SDL_WINDOW_INPUT_FOCUS;
|
||||||
|
SDL_SetKeyboardFocus(window);
|
||||||
#else
|
#else
|
||||||
if (GetFocus() == hwnd) {
|
if (GetFocus() == hwnd) {
|
||||||
window->flags |= SDL_WINDOW_INPUT_FOCUS;
|
window->flags |= SDL_WINDOW_INPUT_FOCUS;
|
||||||
|
|||||||
Reference in New Issue
Block a user