Use bool instead of int for m_InputGrabbed

This commit is contained in:
Robert Müller 2023-01-26 22:00:01 +01:00
parent 25872820d7
commit c2e8f6738a
2 changed files with 4 additions and 4 deletions

View file

@ -47,7 +47,7 @@ CInput::CInput()
mem_zero(m_aInputState, sizeof(m_aInputState));
m_InputCounter = 1;
m_InputGrabbed = 0;
m_InputGrabbed = false;
m_MouseDoubleClick = false;
@ -272,14 +272,14 @@ bool CInput::MouseRelative(float *pX, float *pY)
void CInput::MouseModeAbsolute()
{
m_InputGrabbed = 0;
m_InputGrabbed = false;
SDL_SetRelativeMouseMode(SDL_FALSE);
Graphics()->SetWindowGrab(false);
}
void CInput::MouseModeRelative()
{
m_InputGrabbed = 1;
m_InputGrabbed = true;
#if !defined(CONF_PLATFORM_ANDROID) // No relative mouse on Android
SDL_SetRelativeMouseMode(SDL_TRUE);
#endif

View file

@ -69,7 +69,7 @@ private:
static void ConchainJoystickGuidChanged(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
float GetJoystickDeadzone();
int m_InputGrabbed;
bool m_InputGrabbed;
char *m_pClipboardText;
bool m_MouseFocus;