mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- Added m_hidepointer cvar to control whether or not the mouse pointer is hidden when it's
grabbed. At least if the pointer is visible when the debugger break happens, I don't worry about it getting stuck hidden. (Note that that seems to be related to Alt+Tabbing out of the game and coming back. I wish I knew what's going on.) SVN r2497 (trunk)
This commit is contained in:
parent
6000217889
commit
6234e7445b
1 changed files with 6 additions and 5 deletions
|
@ -139,6 +139,7 @@ bool CursorState;
|
|||
CVAR (Bool, use_mouse, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (Bool, m_noprescale, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (Bool, m_filter, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (Bool, m_hidepointer, true, 0)
|
||||
|
||||
CUSTOM_CVAR (Int, in_mouse, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL)
|
||||
{
|
||||
|
@ -181,10 +182,10 @@ CUSTOM_CVAR(Int, mouse_capturemode, 1, CVAR_GLOBALCONFIG|CVAR_ARCHIVE)
|
|||
|
||||
static void SetCursorState(bool visible)
|
||||
{
|
||||
CursorState = visible;
|
||||
CursorState = visible || !m_hidepointer;
|
||||
if (GetForegroundWindow() == Window)
|
||||
{
|
||||
if (visible)
|
||||
if (CursorState)
|
||||
{
|
||||
SetCursor((HCURSOR)(intptr_t)GetClassLongPtr(Window, GCLP_HCURSOR));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue