WiimoteReal: Unbreak.

This commit is contained in:
Jordan Woyak 2018-11-25 16:24:55 -06:00
parent 42b9392784
commit 10c2101e72
2 changed files with 4 additions and 9 deletions

View File

@ -966,7 +966,6 @@ void Wiimote::ControlChannel(const u16 channel_id, const void* data, u32 size)
return; return;
} }
// this all good?
m_reporting_channel = channel_id; m_reporting_channel = channel_id;
const hid_packet* hidp = reinterpret_cast<const hid_packet*>(data); const hid_packet* hidp = reinterpret_cast<const hid_packet*>(data);
@ -1008,7 +1007,6 @@ void Wiimote::ControlChannel(const u16 channel_id, const void* data, u32 size)
void Wiimote::InterruptChannel(const u16 channel_id, const void* data, u32 size) void Wiimote::InterruptChannel(const u16 channel_id, const void* data, u32 size)
{ {
// this all good?
m_reporting_channel = channel_id; m_reporting_channel = channel_id;
const hid_packet* hidp = reinterpret_cast<const hid_packet*>(data); const hid_packet* hidp = reinterpret_cast<const hid_packet*>(data);
@ -1019,11 +1017,8 @@ void Wiimote::InterruptChannel(const u16 channel_id, const void* data, u32 size)
switch (hidp->param) switch (hidp->param)
{ {
case HID_PARAM_OUTPUT: case HID_PARAM_OUTPUT:
{ HidOutputReport(reinterpret_cast<const wm_report*>(hidp->data));
const wm_report* sr = reinterpret_cast<const wm_report*>(hidp->data); break;
HidOutputReport(sr);
}
break;
default: default:
PanicAlert("HidInput: HID_TYPE_DATA - param 0x%02x", hidp->param); PanicAlert("HidInput: HID_TYPE_DATA - param 0x%02x", hidp->param);

View File

@ -680,9 +680,9 @@ private:
// Activate motion plus: // Activate motion plus:
reg_data.ext_identifier[2] = ACTIVE_DEVICE_ADDR << 1; reg_data.ext_identifier[2] = ACTIVE_DEVICE_ADDR << 1;
times_updated_since_activation = 0x2; reg_data.initialization_status = 0x2;
// Test some hax // Some hax to disable encryption:
std::array<u8, 1> data = {0x55}; std::array<u8, 1> data = {0x55};
i2c_bus.BusWrite(ACTIVE_DEVICE_ADDR, 0xf0, (int)data.size(), data.data()); i2c_bus.BusWrite(ACTIVE_DEVICE_ADDR, 0xf0, (int)data.size(), data.data());
} }