mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
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:
13
Externals/WiiUseSrc/Src/io_osx.m
vendored
13
Externals/WiiUseSrc/Src/io_osx.m
vendored
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user