mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
Fix a mess up on my part, causing a bunch of unknown events in Linux with the Wiimote. Dolphin sends out packets without the start 0x52 byte. WiiUse checks for this and adds it automatically. Wiimote is still having some problems, trying to figure it out
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3536 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
36
Externals/WiiUseSrc/Src/events.c
vendored
36
Externals/WiiUseSrc/Src/events.c
vendored
@ -84,29 +84,31 @@ static int state_changed(struct wiimote_t* wm);
|
||||
int wiiuse_poll(struct wiimote_t** wm, int wiimotes) {
|
||||
int evnt = 0;
|
||||
|
||||
#ifndef WIN32
|
||||
int i;
|
||||
#if defined(__APPLE__)
|
||||
|
||||
if (!wm)
|
||||
return 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < wiimotes; ++i) {
|
||||
wm[i]->event = WIIUSE_NONE;
|
||||
if (!wm)
|
||||
return 0;
|
||||
|
||||
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);
|
||||
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]);
|
||||
}
|
||||
}
|
||||
|
||||
/* clear out the event buffer */
|
||||
memset(wm[i]->event_buf, 0, sizeof(wm[i]->event_buf));
|
||||
} else {
|
||||
idle_cycle(wm[i]);
|
||||
}
|
||||
}
|
||||
#else
|
||||
/*
|
||||
* Windows
|
||||
* Windows, Unix
|
||||
*/
|
||||
int i;
|
||||
|
||||
|
Reference in New Issue
Block a user