better wiimote code for osx with sonic fix, wiimote works better in wiiuse, but not in dolphin becau i think the read function in the wiimote plugin is in a separate thread and osx dont like this

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3924 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
tmator
2009-08-01 19:35:45 +00:00
parent 10443c3f3a
commit 7b19632b4a
2 changed files with 29 additions and 30 deletions

View File

@ -84,31 +84,8 @@ static int state_changed(struct wiimote_t* wm);
int wiiuse_poll(struct wiimote_t** wm, int wiimotes) {
int evnt = 0;
#if defined(__APPLE__)
int i;
if (!wm)
return 0;
for (i = 0; i < wiimotes; ++i) {
wm[i]->event = WIIUSE_NONE;
if (wiiuse_io_read(wm[i])) {
/* propagate the event */
propagate_event(wm[i], wm[i]->event_buf[1], wm[i]->event_buf+2);
evnt += (wm[i]->event != WIIUSE_NONE);
/* clear out the event buffer */
memset(wm[i]->event_buf, 0, sizeof(wm[i]->event_buf));
} else {
idle_cycle(wm[i]);
}
}
#else
/*
* Windows, Unix
* Windows, Unix and Apple
*/
int i;
@ -128,7 +105,6 @@ int wiiuse_poll(struct wiimote_t** wm, int wiimotes) {
idle_cycle(wm[i]);
}
}
#endif
return evnt;
}