From d9a5ed75b969af481a3da882ca87def205499513 Mon Sep 17 00:00:00 2001
From: Caleb Cornett <[EMAIL REDACTED]>
Date: Sun, 25 Aug 2024 20:44:25 -0500
Subject: [PATCH] GDK: Xbox should have input focus by default
---
src/video/windows/SDL_windowswindow.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index e515e97a39052..7d929f5a0dd5f 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -523,6 +523,7 @@ static int SetupWindowData(SDL_VideoDevice *_this, SDL_Window *window, HWND hwnd
#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
window->flags |= SDL_WINDOW_INPUT_FOCUS;
+ SDL_SetKeyboardFocus(window);
#else
if (GetFocus() == hwnd) {
window->flags |= SDL_WINDOW_INPUT_FOCUS;