Try to fix input in Steam version on Windows (fixes #2645)

This commit is contained in:
def 2020-08-26 15:15:06 +02:00
parent 1a20f9a6ae
commit 71cd53acfe

View file

@ -3800,7 +3800,7 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
} }
// set flags // 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) if(Flags&IGraphicsBackend::INITFLAG_HIGHDPI)
SdlFlags |= SDL_WINDOW_ALLOW_HIGHDPI; SdlFlags |= SDL_WINDOW_ALLOW_HIGHDPI;
#if defined(SDL_VIDEO_DRIVER_X11) #if defined(SDL_VIDEO_DRIVER_X11)
@ -3968,7 +3968,6 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
WaitForIdle(); WaitForIdle();
CmdBuffer.Reset(); CmdBuffer.Reset();
SDL_ShowWindow(m_pWindow);
if(SetWindowScreen(g_Config.m_GfxScreen)) if(SetWindowScreen(g_Config.m_GfxScreen))
{ {
// query the current displaymode, when running in fullscreen // query the current displaymode, when running in fullscreen