summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/ControllerInterface/DInput
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@Gmail.com>2012-10-27 17:22:48 -0500
committerRyan Houdek <Sonicadvance1@Gmail.com>2012-10-27 17:22:48 -0500
commitc1fd640964272e68301b4f2c39e36b4f550785b6 (patch)
tree321788bd412bd805ad1432925e6457b07b10927a /Source/Core/InputCommon/Src/ControllerInterface/DInput
parent5a6a2b2bec29e71efd8dda61bf6fb5aad4a45020 (diff)
parent7006cd12170c3b3dc3c6179a66945b5183995156 (diff)
Rebase immediate-removal on master
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/DInput')
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/DInput/DInput.cpp4
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInput.cpp b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInput.cpp
index e09bd2fdd9..c23e9df17e 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInput.cpp
+++ b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInput.cpp
@@ -51,9 +51,9 @@ std::string GetDeviceName(const LPDIRECTINPUTDEVICE8 device)
if (SUCCEEDED(device->GetProperty(DIPROP_PRODUCTNAME, &str.diph)))
{
- const int size = WideCharToMultiByte(CP_ACP, 0, str.wsz, -1, NULL, 0, NULL, NULL);
+ const int size = WideCharToMultiByte(CP_UTF8, 0, str.wsz, -1, NULL, 0, NULL, NULL);
char* const data = new char[size];
- if (size == WideCharToMultiByte(CP_ACP, 0, str.wsz, -1, data, size, NULL, NULL))
+ if (size == WideCharToMultiByte(CP_UTF8, 0, str.wsz, -1, data, size, NULL, NULL))
out.assign(data);
delete[] data;
}
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp
index d37d1eb2ba..08d62bcfc1 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp
+++ b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp
@@ -241,7 +241,7 @@ Joystick::Joystick( /*const LPCDIDEVICEINSTANCE lpddi, */const LPDIRECTINPUTDEVI
{
// each hat gets 4 input instances associated with it, (up down left right)
for (u8 d = 0; d != 4; ++d)
- AddInput(new Hat(i, m_state_in.rgdwPOV[m_index], d));
+ AddInput(new Hat(i, m_state_in.rgdwPOV[i], d));
}
// get up to 6 axes and 2 sliders