From 27e79b93ec9fd2baa77955be0b75d73df590cfd0 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Tue, 24 Dec 2013 21:08:11 -0500 Subject: [PATCH] WinRT: bug fix: game-controller/joystick button-down events weren't getting sent --- src/video/winrt/SDL_winrtvideo.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/video/winrt/SDL_winrtvideo.cpp b/src/video/winrt/SDL_winrtvideo.cpp index 97358a966..180528373 100644 --- a/src/video/winrt/SDL_winrtvideo.cpp +++ b/src/video/winrt/SDL_winrtvideo.cpp @@ -301,6 +301,12 @@ WINRT_CreateWindow(_THIS, SDL_Window * window) */ window->w = _this->displays[0].current_mode.w; window->h = _this->displays[0].current_mode.h; + + /* For now, treat WinRT apps as if they always have focus. + TODO, WinRT: try tracking keyboard and mouse focus state with respect to snapped apps + */ + SDL_SetMouseFocus(window); + SDL_SetKeyboardFocus(window); /* Make sure the WinRT app's IFramworkView can post events on behalf of SDL: