mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 08:41:11 +00:00
[console] Release the mouse when showing the mouse
This makes mouse grabbing much less painful.
This commit is contained in:
parent
be5ab7b864
commit
35e2ffb4ab
2 changed files with 8 additions and 4 deletions
|
@ -201,6 +201,7 @@ debug_app_window (const IE_event_t *ie_event)
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
capture_mouse_event (const IE_event_t *ie_event)
|
capture_mouse_event (const IE_event_t *ie_event)
|
||||||
{
|
{
|
||||||
|
@ -217,7 +218,7 @@ capture_mouse_event (const IE_event_t *ie_event)
|
||||||
};
|
};
|
||||||
} else if (ie_event->mouse.type == ie_mouseup
|
} else if (ie_event->mouse.type == ie_mouseup
|
||||||
&& ((ie_event->mouse.buttons ^ prev_mouse.buttons) & 4)) {
|
&& ((ie_event->mouse.buttons ^ prev_mouse.buttons) & 4)) {
|
||||||
IN_UpdateGrab (in_grab);
|
IN_UpdateGrab (0);
|
||||||
dragging = false;
|
dragging = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
#include "QF/cvar.h"
|
#include "QF/cvar.h"
|
||||||
#include "QF/dstring.h"
|
#include "QF/dstring.h"
|
||||||
|
#include "QF/input.h"
|
||||||
#include "QF/keys.h"
|
#include "QF/keys.h"
|
||||||
#include "QF/qargs.h"
|
#include "QF/qargs.h"
|
||||||
#include "QF/quakefs.h"
|
#include "QF/quakefs.h"
|
||||||
|
@ -338,9 +339,11 @@ ClearNotify (void)
|
||||||
static void
|
static void
|
||||||
con_update_mouse (void)
|
con_update_mouse (void)
|
||||||
{
|
{
|
||||||
VID_SetCursor (con_force_mouse_visible
|
bool show_cursor = (con_force_mouse_visible
|
||||||
|| con_show_mouse
|
|| con_show_mouse
|
||||||
|| !con_hide_mouse);
|
|| !con_hide_mouse);
|
||||||
|
VID_SetCursor (show_cursor);
|
||||||
|
IN_UpdateGrab (show_cursor ? 0 : in_grab);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue