ref: c5a8fec289146a7a7fb49c0c42f20695ec37e090
parent: 57391868f9a481b793bae00defabd4b56550abf0
author: Clownacy <Clownacy@users.noreply.github.com>
date: Fri Nov 15 13:44:59 EST 2019
Clean-up Input.cpp
--- a/src/Input.cpp
+++ b/src/Input.cpp
@@ -114,7 +114,7 @@
static int already_ran;
static DirectInputPair *directinput_objects;
- if ((already_ran & 1) == 0)
+ if (!(already_ran & 1))
{
already_ran |= 1;
directinput_objects = (DirectInputPair*)pvRef;
@@ -166,7 +166,7 @@
return FALSE;
HRESULT res = joystick->GetDeviceState(sizeof(DIJOYSTATE), &joystate);
- if (res)
+ if (res != DI_OK)
{
if (res == DIERR_INPUTLOST)
SetDeviceAquire(FALSE);
@@ -211,7 +211,7 @@
return FALSE;
HRESULT res = joystick->GetDeviceState(sizeof(DIJOYSTATE), &joystate);
- if (res)
+ if (res != DI_OK)
{
if (res == DIERR_INPUTLOST)
SetDeviceAquire(FALSE);