mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-08 09:09:04 +00:00
Fix acceleration emulation for wiimote and nunchuk.
The 1-2 least significant bits were missing.
This commit is contained in:
parent
e9bbf00c88
commit
f07d3be502
9 changed files with 286 additions and 111 deletions
|
@ -378,7 +378,7 @@ void TASInputDlg::SetButtonValue(Button* button, bool CurrentState)
|
|||
}
|
||||
}
|
||||
|
||||
void TASInputDlg::SetWiiButtons(wm_core* butt)
|
||||
void TASInputDlg::SetWiiButtons(u16* butt)
|
||||
{
|
||||
for (unsigned int i = 0; i < 14; ++i)
|
||||
{
|
||||
|
@ -415,7 +415,7 @@ void TASInputDlg::GetKeyBoardInput(u8* data, WiimoteEmu::ReportFeatures rptf)
|
|||
for (unsigned int i = 0; i < 14; ++i)
|
||||
{
|
||||
if (m_buttons[i] != nullptr)
|
||||
SetButtonValue(m_buttons[i], (*(wm_core*)coreData & m_wii_buttons_bitmask[i]) != 0);
|
||||
SetButtonValue(m_buttons[i], (((wm_buttons*)coreData)->hex & m_wii_buttons_bitmask[i]) != 0);
|
||||
}
|
||||
}
|
||||
if (accelData)
|
||||
|
@ -450,7 +450,7 @@ void TASInputDlg::GetValues(u8* data, WiimoteEmu::ReportFeatures rptf)
|
|||
u8* const irData = rptf.ir ? (data + rptf.ir) : nullptr;
|
||||
|
||||
if (coreData)
|
||||
SetWiiButtons((wm_core*)coreData);
|
||||
SetWiiButtons(&((wm_buttons*)coreData)->hex);
|
||||
|
||||
if (accelData)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue