summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-11-06 12:46:36 +0100
committerGitHub <noreply@github.com>2020-11-06 12:46:36 +0100
commitdf2abc55be9c8b9f419a1b99cbad94024d150a09 (patch)
tree639aa9775a179638e91508f37bc189cdbb6685ef
parent1abe52e611b7681084c47e6a05d088b307b60fe0 (diff)
parent4a6e53b3c96825d8dcac7e23f606efad8b2aa1dd (diff)
Merge pull request #43353 from madmiraal/fix-43352
Use LONG instead of DWORD (unsigned int) when interacting with DIJOFS constants
-rw-r--r--platform/windows/joypad_windows.cpp4
-rw-r--r--platform/windows/joypad_windows.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/platform/windows/joypad_windows.cpp b/platform/windows/joypad_windows.cpp
index d1454c9096..2a5c8a7763 100644
--- a/platform/windows/joypad_windows.cpp
+++ b/platform/windows/joypad_windows.cpp
@@ -194,7 +194,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)
@@ -395,7 +395,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++) {
diff --git a/platform/windows/joypad_windows.h b/platform/windows/joypad_windows.h
index c961abf0a5..223b44fcd6 100644
--- a/platform/windows/joypad_windows.h
+++ b/platform/windows/joypad_windows.h
@@ -77,7 +77,7 @@ private:
DWORD last_pad;
LPDIRECTINPUTDEVICE8 di_joy;
- List<DWORD> joy_axis;
+ List<LONG> joy_axis;
GUID guid;
dinput_gamepad() {