about summary refs log tree commit diff
path: root/src/engine
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2012-02-05 13:28:35 +0100
committeroy <Tom_Adams@web.de>2012-02-05 13:28:35 +0100
commit27daa26b991d3fc92609a915f23eadbbd68cd9e9 (patch)
tree4966c36aff0d0001692d744069fe85cf9ddc6577 /src/engine
parent0c05b3bfa1f64239e9beddd9c97f8ef0844da165 (diff)
downloadzcatch-27daa26b991d3fc92609a915f23eadbbd68cd9e9.tar.gz
zcatch-27daa26b991d3fc92609a915f23eadbbd68cd9e9.zip
fixed stuck mouse cursor when loosing fullscreen focus on windows
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/client/backend_sdl.cpp1
-rw-r--r--src/engine/client/graphics.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/engine/client/backend_sdl.cpp b/src/engine/client/backend_sdl.cpp
index a8617748..e7975aca 100644
--- a/src/engine/client/backend_sdl.cpp
+++ b/src/engine/client/backend_sdl.cpp
@@ -405,6 +405,7 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int Width, int Height,
 	}
 
 	const SDL_VideoInfo *pInfo = SDL_GetVideoInfo();
+	SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE); // prevent stuck mouse cursor sdl-bug when loosing fullscreen focus in windows
 
 	// set flags
 	int SdlFlags = SDL_OPENGL;
diff --git a/src/engine/client/graphics.cpp b/src/engine/client/graphics.cpp
index 2fff2931..2111703e 100644
--- a/src/engine/client/graphics.cpp
+++ b/src/engine/client/graphics.cpp
@@ -765,7 +765,7 @@ int CGraphics_SDL::TryInit()
 	m_ScreenHeight = g_Config.m_GfxScreenHeight;
 
 	const SDL_VideoInfo *pInfo = SDL_GetVideoInfo();
-	SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE);
+	SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE); // prevent stuck mouse cursor sdl-bug when loosing fullscreen focus in windows
 
 	// set flags
 	int Flags = SDL_OPENGL;