wiiuse can read data on osx now

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3156 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
tmator
2009-05-05 20:25:55 +00:00
parent c70dd2ab0a
commit f2e92a6500
2 changed files with 71 additions and 13 deletions

View File

@ -84,6 +84,29 @@ int wiiuse_poll(struct wiimote_t** wm, int wiimotes) {
int evnt = 0;
#ifndef WIN32
#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
/*
* *nix
*/
@ -167,6 +190,7 @@ int wiiuse_poll(struct wiimote_t** wm, int wiimotes) {
idle_cycle(wm[i]);
}
}
#endif
#else
/*
* Windows