mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +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);
|
int32_t mouseInit(void);
|
||||||
void mouseUninit(void);
|
void mouseUninit(void);
|
||||||
int32_t mouseReadAbs(vec2_t *const destination, vec2_t const *const source);
|
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 mouseLockToWindow(char a);
|
||||||
void mouseReadButtons(int32_t *b);
|
void mouseReadButtons(int32_t *b);
|
||||||
void mouseReadPos(int32_t *x, int32_t *y);
|
void mouseReadPos(int32_t *x, int32_t *y);
|
||||||
|
|
|
@ -292,7 +292,7 @@ void mouseUninit(void)
|
||||||
mouseGrabInput(g_mouseEnabled = 0);
|
mouseGrabInput(g_mouseEnabled = 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mouseGrabInput(char a)
|
void mouseGrabInput(bool grab)
|
||||||
{
|
{
|
||||||
static POINT pos;
|
static POINT pos;
|
||||||
static int32_t d = 0;
|
static int32_t d = 0;
|
||||||
|
@ -305,8 +305,8 @@ void mouseGrabInput(char a)
|
||||||
d++;
|
d++;
|
||||||
}
|
}
|
||||||
|
|
||||||
ShowCursor(a == 0);
|
ShowCursor(grab == 0);
|
||||||
RI_CaptureInput(a, (HWND)win_gethwnd());
|
RI_CaptureInput(grab, (HWND)win_gethwnd());
|
||||||
SetCursorPos(pos.x, pos.y);
|
SetCursorPos(pos.x, pos.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -940,17 +940,17 @@ static inline char grabmouse_low(char a)
|
||||||
//
|
//
|
||||||
// grabmouse() -- show/hide mouse cursor
|
// grabmouse() -- show/hide mouse cursor
|
||||||
//
|
//
|
||||||
void mouseGrabInput(char a)
|
void mouseGrabInput(bool grab)
|
||||||
{
|
{
|
||||||
if (appactive && g_mouseEnabled)
|
if (appactive && g_mouseEnabled)
|
||||||
{
|
{
|
||||||
#if !defined EDUKE32_TOUCH_DEVICES
|
#if !defined EDUKE32_TOUCH_DEVICES
|
||||||
if ((a != g_mouseGrabbed) && !grabmouse_low(a))
|
if ((grab != g_mouseGrabbed) && !grabmouse_low(grab))
|
||||||
#endif
|
#endif
|
||||||
g_mouseGrabbed = a;
|
g_mouseGrabbed = grab;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
g_mouseGrabbed = a;
|
g_mouseGrabbed = grab;
|
||||||
|
|
||||||
g_mousePos.x = g_mousePos.y = 0;
|
g_mousePos.x = g_mousePos.y = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue