mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2024-12-02 08:51:57 +00:00
support ctrl-g for (un)grabbing mouse
Many Linux Games support that
This commit is contained in:
parent
a1c1f1b6b2
commit
732d8987d3
1 changed files with 10 additions and 0 deletions
|
@ -837,6 +837,16 @@ sysEvent_t Sys_GetEvent()
|
||||||
return res_none;
|
return res_none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DG: ctrl-g to un-grab mouse - yeah, left ctrl shoots, then just use right ctrl :)
|
||||||
|
if( ev.key.keysym.sym == SDLK_g && ( ev.key.keysym.mod & KMOD_CTRL ) > 0 )
|
||||||
|
{
|
||||||
|
bool grab = cvarSystem->GetCVarBool( "in_nograb" );
|
||||||
|
grab = !grab;
|
||||||
|
cvarSystem->SetCVarBool( "in_nograb", grab );
|
||||||
|
return res_none;
|
||||||
|
}
|
||||||
|
// DG end
|
||||||
|
|
||||||
// fall through
|
// fall through
|
||||||
case SDL_KEYUP:
|
case SDL_KEYUP:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue