diff options
author | 2016-10-22 11:31:49 +0200 | |
---|---|---|
committer | 2016-10-22 11:31:49 +0200 | |
commit | 23ad94073f4c2f7131fa0c95b6202f2f9027db41 (patch) | |
tree | 4f4e1e27a22ace8fea49b63030d4462db7cb68a1 /src/osd/modules/input/input_dinput.cpp | |
parent | 255bf78b316a9dc9e4c53a65143000471a6927d3 (diff) |
use standard types uintptr_t, char16_t and char32_t instead of FPTR, utf16_char, unicode_char (nw)
Diffstat (limited to 'src/osd/modules/input/input_dinput.cpp')
-rw-r--r-- | src/osd/modules/input/input_dinput.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/osd/modules/input/input_dinput.cpp b/src/osd/modules/input/input_dinput.cpp index c4a62cd0d2f..694bf80b984 100644 --- a/src/osd/modules/input/input_dinput.cpp +++ b/src/osd/modules/input/input_dinput.cpp @@ -406,7 +406,7 @@ public: // populate the buttons for (butnum = 0; butnum < devinfo->dinput.caps.dwButtons; butnum++) { - FPTR offset = reinterpret_cast<FPTR>(&static_cast<DIMOUSESTATE *>(nullptr)->rgbButtons[butnum]); + uintptr_t offset = reinterpret_cast<uintptr_t>(&static_cast<DIMOUSESTATE *>(nullptr)->rgbButtons[butnum]); // add to the mouse device std::string name = device_item_name(devinfo, offset, default_button_name(butnum), nullptr); @@ -520,25 +520,25 @@ int dinput_joystick_device::configure() // left name = dinput_module::device_item_name(this, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("L")); - device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_LEFT))); + device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<uintptr_t>(povnum * 4 + POVDIR_LEFT))); // right name = dinput_module::device_item_name(this, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("R")); - device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_RIGHT))); + device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<uintptr_t>(povnum * 4 + POVDIR_RIGHT))); // up name = dinput_module::device_item_name(this, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("U")); - device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_UP))); + device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<uintptr_t>(povnum * 4 + POVDIR_UP))); // down name = dinput_module::device_item_name(this, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("D")); - device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_DOWN))); + device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<uintptr_t>(povnum * 4 + POVDIR_DOWN))); } // populate the buttons for (UINT32 butnum = 0; butnum < dinput.caps.dwButtons; butnum++) { - FPTR offset = reinterpret_cast<FPTR>(&static_cast<DIJOYSTATE2 *>(nullptr)->rgbButtons[butnum]); + uintptr_t offset = reinterpret_cast<uintptr_t>(&static_cast<DIJOYSTATE2 *>(nullptr)->rgbButtons[butnum]); std::string name = dinput_module::device_item_name(this, offset, default_button_name(butnum), nullptr); input_item_id itemid; @@ -606,8 +606,8 @@ public: static INT32 dinput_joystick_pov_get_state(void *device_internal, void *item_internal) { dinput_joystick_device *devinfo = static_cast<dinput_joystick_device *>(device_internal); - int povnum = reinterpret_cast<FPTR>(item_internal) / 4; - int povdir = reinterpret_cast<FPTR>(item_internal) % 4; + int povnum = reinterpret_cast<uintptr_t>(item_internal) / 4; + int povdir = reinterpret_cast<uintptr_t>(item_internal) % 4; INT32 result = 0; DWORD pov; |