mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Change mouseGrabInput()'s parameter to a bool
git-svn-id: https://svn.eduke32.com/eduke32@6851 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
ee4df7fde5
commit
df50dcd897
3 changed files with 8 additions and 8 deletions
|
@ -225,7 +225,7 @@ void keyFlushChars(void);
|
|||
int32_t mouseInit(void);
|
||||
void mouseUninit(void);
|
||||
int32_t mouseReadAbs(vec2_t *const destination, vec2_t const *const source);
|
||||
void mouseGrabInput(char a);
|
||||
void mouseGrabInput(bool grab);
|
||||
void mouseLockToWindow(char a);
|
||||
void mouseReadButtons(int32_t *b);
|
||||
void mouseReadPos(int32_t *x, int32_t *y);
|
||||
|
|
|
@ -292,7 +292,7 @@ void mouseUninit(void)
|
|||
mouseGrabInput(g_mouseEnabled = 0);
|
||||
}
|
||||
|
||||
void mouseGrabInput(char a)
|
||||
void mouseGrabInput(bool grab)
|
||||
{
|
||||
static POINT pos;
|
||||
static int32_t d = 0;
|
||||
|
@ -305,8 +305,8 @@ void mouseGrabInput(char a)
|
|||
d++;
|
||||
}
|
||||
|
||||
ShowCursor(a == 0);
|
||||
RI_CaptureInput(a, (HWND)win_gethwnd());
|
||||
ShowCursor(grab == 0);
|
||||
RI_CaptureInput(grab, (HWND)win_gethwnd());
|
||||
SetCursorPos(pos.x, pos.y);
|
||||
}
|
||||
|
||||
|
|
|
@ -940,17 +940,17 @@ static inline char grabmouse_low(char a)
|
|||
//
|
||||
// grabmouse() -- show/hide mouse cursor
|
||||
//
|
||||
void mouseGrabInput(char a)
|
||||
void mouseGrabInput(bool grab)
|
||||
{
|
||||
if (appactive && g_mouseEnabled)
|
||||
{
|
||||
#if !defined EDUKE32_TOUCH_DEVICES
|
||||
if ((a != g_mouseGrabbed) && !grabmouse_low(a))
|
||||
if ((grab != g_mouseGrabbed) && !grabmouse_low(grab))
|
||||
#endif
|
||||
g_mouseGrabbed = a;
|
||||
g_mouseGrabbed = grab;
|
||||
}
|
||||
else
|
||||
g_mouseGrabbed = a;
|
||||
g_mouseGrabbed = grab;
|
||||
|
||||
g_mousePos.x = g_mousePos.y = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue