From 71cd53acfea3955f90150056f46d259802bb4242 Mon Sep 17 00:00:00 2001 From: def Date: Wed, 26 Aug 2020 15:15:06 +0200 Subject: [PATCH] Try to fix input in Steam version on Windows (fixes #2645) --- src/engine/client/backend_sdl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/engine/client/backend_sdl.cpp b/src/engine/client/backend_sdl.cpp index 735e07735..190f11835 100644 --- a/src/engine/client/backend_sdl.cpp +++ b/src/engine/client/backend_sdl.cpp @@ -3800,7 +3800,7 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt } // set flags - int SdlFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_HIDDEN; + int SdlFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_INPUT_FOCUS | SDL_WINDOW_MOUSE_FOCUS; if(Flags&IGraphicsBackend::INITFLAG_HIGHDPI) SdlFlags |= SDL_WINDOW_ALLOW_HIGHDPI; #if defined(SDL_VIDEO_DRIVER_X11) @@ -3968,7 +3968,6 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt WaitForIdle(); CmdBuffer.Reset(); - SDL_ShowWindow(m_pWindow); if(SetWindowScreen(g_Config.m_GfxScreen)) { // query the current displaymode, when running in fullscreen