mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Movie: Fix null pointer derefrence.
Part of the acceleration data is packed in with the buttons. We always have button data when we have acceleration data.
This commit is contained in:
@ -772,15 +772,15 @@ static void SetWiiInputDisplayString(int remoteID, u8* const data,
|
|||||||
display_str += " 2";
|
display_str += " 2";
|
||||||
if (buttons.home)
|
if (buttons.home)
|
||||||
display_str += " HOME";
|
display_str += " HOME";
|
||||||
}
|
|
||||||
|
|
||||||
|
// A few bits of accelData are actually inside the coreData struct.
|
||||||
if (accelData)
|
if (accelData)
|
||||||
{
|
{
|
||||||
wm_accel* dt = (wm_accel*)accelData;
|
wm_accel* dt = (wm_accel*)accelData;
|
||||||
display_str +=
|
display_str += StringFromFormat(" ACC:%d,%d,%d", dt->x << 2 | buttons.acc_x_lsb,
|
||||||
StringFromFormat(" ACC:%d,%d,%d", dt->x << 2 | ((wm_buttons*)coreData)->acc_x_lsb,
|
dt->y << 2 | buttons.acc_y_lsb << 1,
|
||||||
dt->y << 2 | ((wm_buttons*)coreData)->acc_y_lsb << 1,
|
dt->z << 2 | buttons.acc_z_lsb << 1);
|
||||||
dt->z << 2 | ((wm_buttons*)coreData)->acc_z_lsb << 1);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (irData)
|
if (irData)
|
||||||
|
Reference in New Issue
Block a user