Fixing automatic mouse release function - still this does not seem to work in every case
This commit is contained in:
parent
1f6e72f781
commit
0e0b04c138
|
@ -3,6 +3,7 @@ D2X-Rebirth Changelog
|
|||
20100727
|
||||
--------
|
||||
2d/pcx.c, include/pcx.h, main/cntrlcen.h, main/fuelcen.h, main/gameseq.c, main/kmatrix.c: Show stars background for died in mine and secret level messageboxes; 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