mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +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
|
@ -136,9 +136,10 @@ FMouse *Mouse;
|
|||
|
||||
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, 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