Merge pull request #2654 from def-/pr-input

Try to fix input in Steam version on Windows (fixes #2645)
This commit is contained in:
Dennis Felsing 2020-08-26 19:59:52 +02:00 committed by GitHub
commit 62d68d24fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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