summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/ControllerInterface
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2011-10-01 21:50:15 +1000
committerskidau <skidau@gmail.com>2011-10-01 21:50:15 +1000
commite76bc71efe8c3c724e14a2f741fe4f34669d1bea (patch)
treea463e3008be16950e64764532626132ebd91e4d7 /Source/Core/InputCommon/Src/ControllerInterface
parent266cafb82d67edb05cd932bd3f94febaf3348f40 (diff)
Fixed the controller config so that it lists DInput controllers with special characters (like the Registered (R) sign) in their name. UTF8 is used to match the encoding used by the Wx GUI.
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/DInput/DInput.cpp4
1 files changed, 2 insertions, 2 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;
}