Merge pull request #586 from SRSaunders/master

Release mouse when console opened in-game: revert previous change
This commit is contained in:
Robert Beckebans 2021-06-14 13:24:25 +02:00 committed by GitHub
commit 3b3e08510d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -564,8 +564,8 @@ void idCommonLocal::Frame()
// RB end, DG end
{
// RB: don't release the mouse when opening a PDA or menu
// SRS - don't release when console open in a game (otherwise may be out of frame on return) but always release at main menu
if( ( console->Active() && !game ) || !mapSpawned || ImGuiTools::ReleaseMouseForTools() )
// SRS - but always release at main menu after exiting game or demo
if( console->Active() || !mapSpawned || ImGuiTools::ReleaseMouseForTools() )
{
Sys_GrabMouseCursor( false );
}