mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-12-03 16:12:02 +00:00
fix real wiimote on windows
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4601 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
354078def6
commit
425ee74c76
BIN
Externals/WiiUse/Win32/wiiuse.dll
vendored
BIN
Externals/WiiUse/Win32/wiiuse.dll
vendored
Binary file not shown.
BIN
Externals/WiiUse/Win32/wiiuse.lib
vendored
BIN
Externals/WiiUse/Win32/wiiuse.lib
vendored
Binary file not shown.
BIN
Externals/WiiUse/X64/wiiuse.dll
vendored
BIN
Externals/WiiUse/X64/wiiuse.dll
vendored
Binary file not shown.
BIN
Externals/WiiUse/X64/wiiuse.lib
vendored
BIN
Externals/WiiUse/X64/wiiuse.lib
vendored
Binary file not shown.
10
Externals/WiiUseSrc/Src/io_win.c
vendored
10
Externals/WiiUseSrc/Src/io_win.c
vendored
@ -103,7 +103,7 @@ int wiiuse_find(struct wiimote_t** wm, int max_wiimotes, int timeout) {
|
||||
/* this is a wiimote */
|
||||
wm[found]->dev_handle = dev;
|
||||
|
||||
wm[found]->hid_overlap.hEvent = CreateEvent(NULL, 1, 1, "");
|
||||
wm[found]->hid_overlap.hEvent = CreateEvent(NULL, 1, 1, L"");
|
||||
wm[found]->hid_overlap.Offset = 0;
|
||||
wm[found]->hid_overlap.OffsetHigh = 0;
|
||||
|
||||
@ -198,14 +198,16 @@ int wiiuse_io_read(struct wiimote_t* wm) {
|
||||
WIIUSE_WARNING("A wait error occured on reading from wiimote %i.", wm->unid);
|
||||
return 0;
|
||||
}
|
||||
// Move the data over one, so we can add back in 0xa2
|
||||
memcpy(wm->event_buf[1], &wm->event_buf, sizeof(wm->event_buf));
|
||||
wm->event_buf[0] = 0xa2; // Put back in the crazy Data that Windows strips out
|
||||
|
||||
if (!GetOverlappedResult(wm->dev_handle, &wm->hid_overlap, &b, 0))
|
||||
return 0;
|
||||
}
|
||||
|
||||
// This needs to be done even if ReadFile fails, essential during init
|
||||
// Move the data over one, so we can add back in 0xa2
|
||||
memcpy(wm->event_buf + 1, wm->event_buf, sizeof(wm->event_buf) - 1);
|
||||
wm->event_buf[0] = 0xa2; // Put back in the crazy Data that Windows strips out
|
||||
|
||||
ResetEvent(wm->hid_overlap.hEvent);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user