mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-10 06:31:48 +00:00
console down with 2+ screens always disables input grabbing
This commit is contained in:
parent
db37f4b8fb
commit
b7a76b6428
3 changed files with 11 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
|||
|
||||
DD Mmm 18 - 1.50
|
||||
|
||||
chg: with 2+ monitors, having the console down will always disable input grabbing
|
||||
|
||||
chg: on Windows, a fatal error will move the early console window to the foreground
|
||||
|
||||
chg: com_hunkMegs doesn't have a maximum value anymore
|
||||
|
|
|
@ -441,11 +441,14 @@ static qbool sdl_IsInputActive()
|
|||
if (in_noGrab->integer)
|
||||
return qfalse;
|
||||
|
||||
const qbool isConsoleDown = (cls.keyCatchers & KEYCATCH_CONSOLE) != 0;
|
||||
if (isConsoleDown && glimp.monitorCount >= 2)
|
||||
return qfalse;
|
||||
|
||||
const qbool hasFocus = (SDL_GetWindowFlags(glimp.window) & SDL_WINDOW_INPUT_FOCUS) != 0;
|
||||
if (!hasFocus)
|
||||
return qfalse;
|
||||
|
||||
const qbool isConsoleDown = (cls.keyCatchers & KEYCATCH_CONSOLE) != 0;
|
||||
const qbool isFullScreen = Cvar_VariableIntegerValue("r_fullscreen");
|
||||
if (isConsoleDown && !isFullScreen)
|
||||
return qfalse;
|
||||
|
|
|
@ -432,7 +432,11 @@ static qbool IN_ShouldBeActive()
|
|||
if ( in_noGrab && in_noGrab->integer )
|
||||
return qfalse;
|
||||
|
||||
return g_wv.activeApp && (!(cls.keyCatchers & KEYCATCH_CONSOLE) || Cvar_VariableIntegerValue("r_fullscreen"));
|
||||
const qbool isConsoleDown = (cls.keyCatchers & KEYCATCH_CONSOLE) != 0;
|
||||
if ( g_wv.monitorCount >= 2 && isConsoleDown )
|
||||
return qfalse;
|
||||
|
||||
return g_wv.activeApp && (!isConsoleDown || Cvar_VariableIntegerValue("r_fullscreen"));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue