Fixing automatic mouse release function - still this does not seem to work in every case
This commit is contained in:
parent
9e4b8db5f6
commit
4f5d6ea605
|
@ -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
|
||||
--------
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue