1
0
mirror of https://github.com/cathery/sys-con.git synced 2024-09-28 22:40:47 +00:00

Create button combos for CAPTURE and HOME buttons

This commit is contained in:
jack2game 2022-01-16 13:02:12 +08:00 committed by GitHub
parent 7cde4416e8
commit e4b79a6875
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,6 +157,20 @@ void SwitchHDLHandler::FillHdlState(const NormalizedButtonData &data)
m_hdlState.buttons |= (data.buttons[16] ? HiddbgNpadButton_Capture : 0);
m_hdlState.buttons |= (data.buttons[17] ? HiddbgNpadButton_Home : 0);
if (data.buttons[10] && data.buttons[12])
{
m_hdlState.state.buttons ^= HidNpadButton_Minus;
m_hdlState.state.buttons ^= HidNpadButton_Up;
m_hdlState.state.buttons |= HiddbgNpadButton_Capture;
}
if (data.buttons[10] && data.buttons[14])
{
m_hdlState.state.buttons ^= HidNpadButton_Minus;
m_hdlState.state.buttons ^= HidNpadButton_Down;
m_hdlState.state.buttons |= HiddbgNpadButton_Home;
}
}
void SwitchHDLHandler::UpdateInput()
@ -203,4 +217,4 @@ void SwitchHDLHandler::UpdateOutput()
HiddbgHdlsSessionId &SwitchHDLHandler::GetHdlsSessionId()
{
return g_hdlsSessionId;
}
}