mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 06:39:14 +01:00
Fixed issue 5973. (probably)
This commit is contained in:
parent
a455abe00b
commit
bc35764ec2
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user