Fixing automatic mouse release function - still this does not seem to work in every case

This commit is contained in:
zicodxx 2010-07-27 19:42:28 +00:00
parent 9e4b8db5f6
commit 4f5d6ea605
2 changed files with 3 additions and 1 deletions

View file

@ -3,6 +3,7 @@ D1X-Rebirth Changelog
20100727
--------
2d/pcx.c, include/pcx.h, main/cntrlcen.h, main/effects.c, main/fireball.c, main/fuelcen.h, main/gameseq.c, main/kmatrix.c, main/net_ipx.c, main/net_udp.c, main/render.c, main/segment.h, main/switch.c: Show main menu background for died in mine messagebox; equalise fuelcen.h and cntrlcen.h
arch/sdl/mouse.c: Fixing automatic mouse release function - still this does not seem to work in every case
20100726
--------

View file

@ -251,12 +251,13 @@ void mouse_update_cursor_and_grab(fix time)
{
int show = SDL_ShowCursor(SDL_QUERY), grab = SDL_WM_GrabInput(SDL_QUERY);
if (!(SDL_GetAppState() & SDL_APPMOUSEFOCUS))
if (!(SDL_GetAppState() == (SDL_APPMOUSEFOCUS | SDL_APPINPUTFOCUS | SDL_APPACTIVE)))
{
if (!show)
SDL_ShowCursor(SDL_ENABLE);
if (grab)
SDL_WM_GrabInput(SDL_GRAB_OFF);
return;
}
if (Mouse.cursor_enabled)