diff --git a/Source/Core/Core/Core.h b/Source/Core/Core/Core.h index 4b53cb445b..9654ab9156 100644 --- a/Source/Core/Core/Core.h +++ b/Source/Core/Core/Core.h @@ -59,7 +59,7 @@ State GetState(); void SaveScreenShot(bool wait_for_completion = false); void SaveScreenShot(const std::string& name, bool wait_for_completion = false); -void Callback_WiimoteInterruptChannel(int _number, u16 _channelID, const void* _pData, u32 _Size); +void Callback_WiimoteInterruptChannel(int number, u16 channel_id, const u8* data, u32 size); // This displays messages in a user-visible way. void DisplayMessage(const std::string& message, int time_in_ms); diff --git a/Source/Core/Core/IOS/USB/Bluetooth/WiimoteDevice.cpp b/Source/Core/Core/IOS/USB/Bluetooth/WiimoteDevice.cpp index cb4b69b59c..baa9add316 100644 --- a/Source/Core/Core/IOS/USB/Bluetooth/WiimoteDevice.cpp +++ b/Source/Core/Core/IOS/USB/Bluetooth/WiimoteDevice.cpp @@ -914,12 +914,10 @@ void WiimoteDevice::ReceiveL2capData(u16 scid, const void* data, u32 size) namespace Core { -/* This is called continuously from the Wiimote plugin as soon as it has received - a reporting mode. size is the byte size of the report. */ -void Callback_WiimoteInterruptChannel(int number, u16 channel_id, const void* opaque_data, u32 size) +// This is called continuously from the Wiimote plugin as soon as it has received +// a reporting mode. size is the byte size of the report. +void Callback_WiimoteInterruptChannel(int number, u16 channel_id, const u8* data, u32 size) { - const u8* data = (const u8*)opaque_data; - DEBUG_LOG(WIIMOTE, "===================="); DEBUG_LOG(WIIMOTE, "Callback_WiimoteInterruptChannel: (Wiimote: #%i)", number); DEBUG_LOG(WIIMOTE, " Data: %s", ArrayToString(data, size, 50).c_str()); @@ -928,6 +926,6 @@ void Callback_WiimoteInterruptChannel(int number, u16 channel_id, const void* op const auto bt = std::static_pointer_cast( IOS::HLE::GetIOS()->GetDeviceByName("/dev/usb/oh1/57e/305")); if (bt) - bt->AccessWiiMote(0x100 + number)->ReceiveL2capData(channel_id, opaque_data, size); + bt->AccessWiiMote(0x100 + number)->ReceiveL2capData(channel_id, data, size); } }