mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 18:48:56 -06:00
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:
26
Externals/WiiUseSrc/Src/events.cpp
vendored
26
Externals/WiiUseSrc/Src/events.cpp
vendored
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user