mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 10:09:36 -06:00
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:
24
Externals/WiiUseSrc/Src/events.c
vendored
24
Externals/WiiUseSrc/Src/events.c
vendored
@ -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
|
||||
|
Reference in New Issue
Block a user