From b0836b7909633a6afc93267cc78c765823ada4ae Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Tue, 21 Oct 2008 16:50:10 +0000 Subject: tried to improve mouse focusing --- src/engine/client/ec_gfx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/engine/client/ec_gfx.c') diff --git a/src/engine/client/ec_gfx.c b/src/engine/client/ec_gfx.c index 09d8d57b..1f9ec642 100644 --- a/src/engine/client/ec_gfx.c +++ b/src/engine/client/ec_gfx.c @@ -538,7 +538,7 @@ int gfx_window_active() #ifdef CONFIG_NO_SDL return glfwGetWindowParam(GLFW_ACTIVE) == GL_TRUE ? 1 : 0; #else - return 1; /* TODO: SDL*/ + return SDL_GetAppState()&SDL_APPINPUTFOCUS; /* TODO: SDL*/ #endif } @@ -547,7 +547,7 @@ int gfx_window_open() #ifdef CONFIG_NO_SDL return glfwGetWindowParam(GLFW_OPENED) == GL_TRUE ? 1 : 0; #else - return 1; /* TODO: SDL*/ + return SDL_GetAppState()&SDL_APPACTIVE; /* TODO: SDL*/ #endif } -- cgit 1.4.1