Changed some DirectInput code from C to C++ syntax
This commit is contained in:
@@ -1020,10 +1020,10 @@ void TestJoy()
|
|||||||
{
|
{
|
||||||
JoystickInput[i]->Poll();
|
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 (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])
|
if (!X1Disable[i])
|
||||||
@@ -2204,11 +2204,9 @@ void drawscreenwin(void)
|
|||||||
initwinvideo();
|
initwinvideo();
|
||||||
Sleep(1000);
|
Sleep(1000);
|
||||||
drawscreenwin();
|
drawscreenwin();
|
||||||
// exit(0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
UnlockSurface();
|
UnlockSurface();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2280,10 +2278,10 @@ void WinUpdateDevices()
|
|||||||
|
|
||||||
JoystickInput[i]->Poll();
|
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 (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])
|
if (!X1Disable[i])
|
||||||
|
|||||||
Reference in New Issue
Block a user