Skip to content

Commit

Permalink
Fix Metroid UI making missile overlap HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
vyuuui committed Nov 27, 2023
1 parent f515370 commit 1dd9bc3
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions Source/Core/Core/HW/WiimoteEmu/WiimoteEmu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,15 +558,8 @@ void Wiimote::UpdateButtonsStatus(const DesiredWiimoteState& target_state)
{
m_status.buttons.hex = target_state.buttons.hex & ButtonData::BUTTON_MASK;

if (using_metroid_ui)
{
m_buttons->GetState(&m_status.buttons.hex, metroid_button_bitmasks);
}
else
{
m_buttons->GetState(&m_status.buttons.hex, button_bitmasks);
m_dpad->GetState(&m_status.buttons.hex, IsSideways() ? dpad_sideways_bitmasks : dpad_bitmasks);
}
m_buttons->GetState(&m_status.buttons.hex, using_metroid_ui ? metroid_button_bitmasks : button_bitmasks);
m_dpad->GetState(&m_status.buttons.hex, IsSideways() ? dpad_sideways_bitmasks : dpad_bitmasks);
}

void Wiimote::BuildDesiredWiimoteState(DesiredWiimoteState* target_state)
Expand All @@ -580,7 +573,7 @@ void Wiimote::BuildDesiredWiimoteState(DesiredWiimoteState* target_state)

// Fetch pressed buttons from user input.
target_state->buttons.hex = 0;
m_buttons->GetState(&target_state->buttons.hex, button_bitmasks, m_input_override_function);
m_buttons->GetState(&target_state->buttons.hex, using_metroid_ui ? metroid_button_bitmasks : button_bitmasks, m_input_override_function);
m_dpad->GetState(&target_state->buttons.hex,
IsSideways() ? dpad_sideways_bitmasks : dpad_bitmasks,
m_input_override_function);
Expand Down

0 comments on commit 1dd9bc3

Please sign in to comment.