From 549f9b0d2f94d2fb03f0679048810c8034b5f321 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Fri, 24 Mar 2006 17:00:55 +0000 Subject: [PATCH] (svn r4090) - Followup for r4075. Some SDL implementations seem to have a different define for the SDL_ACTIVEEVENT SDL_APPMOUSEFOCUS which caused undrawing of the mouse only on losing input-focus. Correctly check for the event state --- video/sdl_v.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/video/sdl_v.c b/video/sdl_v.c index d190237fb2..a90333ae4f 100644 --- a/video/sdl_v.c +++ b/video/sdl_v.c @@ -346,9 +346,11 @@ static int PollEvent(void) break; case SDL_ACTIVEEVENT: - if (ev.active.gain == 1) // mouse entered the window, enable cursor + if (!(ev.active.state & SDL_APPMOUSEFOCUS)) break; + + if (ev.active.gain) { // mouse entered the window, enable cursor _cursor.in_window = true; - else if (ev.active.gain == 0) { + } else { UndrawMouseCursor(); // mouse left the window, undraw cursor _cursor.in_window = false; }