Grab mouse input only when in-game, ungrab if in menus.
This commit is contained in:
parent
8f7196e3e8
commit
95be4c9c91
6
game.c
6
game.c
|
@ -2440,6 +2440,9 @@ void displayrest(long smoothratio)
|
|||
{
|
||||
if( (ps[myconnectindex].gm&MODE_MENU) == MODE_MENU && current_menu < 51)
|
||||
{
|
||||
// out menu --eukara
|
||||
SDL_WM_GrabInput(SDL_GRAB_ON);
|
||||
|
||||
KB_ClearKeyDown(sc_Escape);
|
||||
ps[myconnectindex].gm &= ~MODE_MENU;
|
||||
if(ud.multimode < 2 && ud.recstat != 2)
|
||||
|
@ -2456,6 +2459,9 @@ void displayrest(long smoothratio)
|
|||
ps[myconnectindex].newowner == -1 &&
|
||||
(ps[myconnectindex].gm&MODE_TYPE) != MODE_TYPE)
|
||||
{
|
||||
// in menu --eukara
|
||||
SDL_WM_GrabInput(SDL_GRAB_OFF);
|
||||
|
||||
KB_ClearKeyDown(sc_Escape);
|
||||
FX_StopAllSounds();
|
||||
clearsoundlocks();
|
||||
|
|
Loading…
Reference in New Issue