summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2013-02-04 21:25:14 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2013-02-04 21:25:14 -0600
commitbc35764ec216749c8cebd3c8e95df066ae46a841 (patch)
tree3e9955e7aae80c6f8d7878b6f934bd4f6f47779a /Source/Core
parenta455abe00b0547d0a70962c502b0965c6d6da29f (diff)
Fixed issue 5973. (probably)
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp6
-rw-r--r--Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp b/Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp
index cc05bc10e1..529a48d15d 100644
--- a/Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp
+++ b/Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp
@@ -184,7 +184,7 @@ int FindWiimotes(Wiimote** wm, int max_wiimotes)
bool found = false;
for(int i = 0; i < MAX_WIIMOTES; i++)
{
- if(wm[i] && strcmp(wm[i]->devicepath, detail_data->DevicePath) == 0)
+ if(wm[i] && (wm[i]->devicepath == detail_data->DevicePath))
{
found = true;
break;
@@ -210,7 +210,7 @@ int FindWiimotes(Wiimote** wm, int max_wiimotes)
for (; k < MAX_WIIMOTES && !(WIIMOTE_SRC_REAL & g_wiimote_sources[k] && !wm[k]); ++k);
wm[k] = new Wiimote(k);
wm[k]->dev_handle = dev;
- memcpy(wm[k]->devicepath, detail_data->DevicePath, 197);
+ wm[k]->devicepath = detail_data->DevicePath;
if (!wm[k]->Connect())
{
@@ -240,7 +240,7 @@ bool Wiimote::Connect()
if (!dev_handle)
{
- dev_handle = CreateFile(devicepath,
+ dev_handle = CreateFile(devicepath.c_str(),
(GENERIC_READ | GENERIC_WRITE),
(FILE_SHARE_READ | FILE_SHARE_WRITE),
NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
diff --git a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.h b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.h
index 24fcea53e6..edd4b4f71b 100644
--- a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.h
+++ b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.h
@@ -78,7 +78,7 @@ public:
void Close();
#elif defined(_WIN32)
- char devicepath[255]; // Unique wiimote reference
+ std::string devicepath; // Unique wiimote reference
//ULONGLONG btaddr; // Bluetooth address
HANDLE dev_handle; // HID handle
OVERLAPPED hid_overlap; // Overlap handle