From 70068a288ac304f777ee132aee9b983339578dcf Mon Sep 17 00:00:00 2001 From: daco65 Date: Sat, 14 Nov 2009 23:54:30 +0000 Subject: [PATCH] small fix from chaos in event handling of real wiimote git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4577 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp b/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp index 7004715a1d..b38a2b89d8 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp @@ -233,11 +233,8 @@ void SendEvent(SEvent& _rEvent) pHidHeader->param = HID_PARAM_INPUT; // Create the buffer - memcpy(&Buffer[Offset], _rEvent.m_PayLoad, MAX_PAYLOAD); - /* This Offset value is not exactly correct like it is for the emulated - Wiimote reports. It's often to big, but I guess that's okay. The game - will know how big the actual data is. */ - Offset += MAX_PAYLOAD; + memcpy(&Buffer[Offset], _rEvent.m_PayLoad, sizeof(_rEvent.m_PayLoad)); + Offset += sizeof(_rEvent.m_PayLoad); // Send it g_WiimoteInitialize.pWiimoteInput(m_channelID, Buffer, Offset);