Changed some DirectInput code from C to C++ syntax

This commit is contained in:
pagefault
2001-06-18 00:40:47 +00:00
parent 2a5e594909
commit 18f604dad6

View File

@@ -1020,10 +1020,10 @@ void TestJoy()
{
JoystickInput[i]->Poll();
if (IDirectInputDevice8_GetDeviceState(JoystickInput[i],sizeof(DIJOYSTATE), &js[i])==DIERR_INPUTLOST)
if (JoystickInput[i]->GetDeviceState(sizeof(DIJOYSTATE), &js[i])==DIERR_INPUTLOST)
{
if (JoystickInput[i]) JoystickInput[i]->Acquire();
if (FAILED(IDirectInputDevice8_GetDeviceState(JoystickInput[i],sizeof(DIJOYSTATE), &js[i]))) return;
if (FAILED(JoystickInput[i]->GetDeviceState(sizeof(DIJOYSTATE), &js[i]))) return;
}
if (!X1Disable[i])
@@ -2204,11 +2204,9 @@ void drawscreenwin(void)
initwinvideo();
Sleep(1000);
drawscreenwin();
// exit(0);
}
}
UnlockSurface();
}
@@ -2280,10 +2278,10 @@ void WinUpdateDevices()
JoystickInput[i]->Poll();
if (IDirectInputDevice8_GetDeviceState(JoystickInput[i],sizeof(DIJOYSTATE), &js[i])==DIERR_INPUTLOST)
if (JoystickInput[i]->GetDeviceState(sizeof(DIJOYSTATE), &js[i])==DIERR_INPUTLOST)
{
if (JoystickInput[i]) JoystickInput[i]->Acquire();
if (FAILED(IDirectInputDevice8_GetDeviceState(JoystickInput[i],sizeof(DIJOYSTATE), &js[i]))) return;
if (FAILED(JoystickInput[i]->GetDeviceState(sizeof(DIJOYSTATE), &js[i]))) return;
}
if (!X1Disable[i])