Use LONG instead of DWORD (unsigned int) when interacting with DIJOFS constants.
(cherry picked from commit 4a6e53b3c9
)
This commit is contained in:
parent
5dafeb94e3
commit
31cdf8d9b4
2 changed files with 3 additions and 3 deletions
|
@ -203,7 +203,7 @@ void JoypadWindows::setup_joypad_object(const DIDEVICEOBJECTINSTANCE *ob, int p_
|
|||
HRESULT res;
|
||||
DIPROPRANGE prop_range;
|
||||
DIPROPDWORD dilong;
|
||||
DWORD ofs;
|
||||
LONG ofs;
|
||||
if (ob->guidType == GUID_XAxis)
|
||||
ofs = DIJOFS_X;
|
||||
else if (ob->guidType == GUID_YAxis)
|
||||
|
@ -426,7 +426,7 @@ void JoypadWindows::process_joypads() {
|
|||
|
||||
// on mingw, these constants are not constants
|
||||
int count = 8;
|
||||
unsigned int axes[] = { DIJOFS_X, DIJOFS_Y, DIJOFS_Z, DIJOFS_RX, DIJOFS_RY, DIJOFS_RZ, DIJOFS_SLIDER(0), DIJOFS_SLIDER(1) };
|
||||
LONG axes[] = { DIJOFS_X, DIJOFS_Y, DIJOFS_Z, DIJOFS_RX, DIJOFS_RY, DIJOFS_RZ, (LONG)DIJOFS_SLIDER(0), (LONG)DIJOFS_SLIDER(1) };
|
||||
int values[] = { js.lX, js.lY, js.lZ, js.lRx, js.lRy, js.lRz, js.rglSlider[0], js.rglSlider[1] };
|
||||
|
||||
for (int j = 0; j < joy->joy_axis.size(); j++) {
|
||||
|
|
|
@ -78,7 +78,7 @@ private:
|
|||
DWORD last_pad;
|
||||
|
||||
LPDIRECTINPUTDEVICE8 di_joy;
|
||||
List<DWORD> joy_axis;
|
||||
List<LONG> joy_axis;
|
||||
GUID guid;
|
||||
|
||||
dinput_gamepad() {
|
||||
|
|
Loading…
Reference in a new issue