Clean up Wiiuse to allow less _WIN32 defines. Windows side now spits out regular packets, and takes in regular packets. Like a normal OS should :} This shouldn't break Windows wiimote, Linux Wiimote doesn't work with this revision. Will require the new plugin which doesn't have emulated Wiimote at all.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4591 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Sonicadvance1
2009-11-19 22:47:57 +00:00
parent 651b5addf4
commit 3af4c50af1
13 changed files with 40 additions and 86 deletions

View File

@ -367,25 +367,12 @@ int wiiuse_io_read(struct wiimote_t* wm) {
CFRunLoopRun();
memcpy(wm->event_buf,DataFromWiimote,sizeof(wm->event_buf));
memcpy(wm->event_buf, &wm->event_buf[1], sizeof(wm->event_buf) - 1);
return 1;
}
int wiiuse_io_write(struct wiimote_t* wm, byte* buf, int len) {
if(buf[0] != (WM_SET_REPORT | WM_BT_OUTPUT))
{
// Linux and OSX need this, Windows strips it out
// Only packets from Dolphin don't have the start
// Wiiuse uses ifdefs to add the first byte without you ever knowing it
// Should find out a nice way of doing this, getting windows to stop stripping the packets would be nice
memcpy(buf + 1, buf, len - 1);
buf[0] = (WM_SET_REPORT | WM_BT_OUTPUT);
}
[cbt writeToWiimote:buf length:len];
return 1;
}