Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed issue 5973. (probably)
  • Loading branch information
jordan-woyak committed Feb 5, 2013
1 parent a455abe commit bc35764
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp
Expand Up @@ -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;
Expand All @@ -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())
{
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.h
Expand Up @@ -78,7 +78,7 @@ friend class WiimoteEmu::Wiimote;
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
Expand Down

0 comments on commit bc35764

Please sign in to comment.