From 7cde4416e8323127326e06615186985df4c57b2b Mon Sep 17 00:00:00 2001 From: jack2game Date: Sun, 16 Jan 2022 13:01:45 +0800 Subject: [PATCH] Create button combos for CAPTURE and HOME buttons --- .../SwitchAbstractedPadHandler.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/source/ControllerSwitch/SwitchAbstractedPadHandler.cpp b/source/ControllerSwitch/SwitchAbstractedPadHandler.cpp index 10c9e01..57aa2a7 100644 --- a/source/ControllerSwitch/SwitchAbstractedPadHandler.cpp +++ b/source/ControllerSwitch/SwitchAbstractedPadHandler.cpp @@ -145,6 +145,20 @@ void SwitchAbstractedPadHandler::FillAbstractedState(const NormalizedButtonData m_state.state.buttons |= (data.buttons[16] ? HiddbgNpadButton_Capture : 0); m_state.state.buttons |= (data.buttons[17] ? HiddbgNpadButton_Home : 0); + + if (data.buttons[10] && data.buttons[12]) + { + m_state.state.buttons ^= HidNpadButton_Minus; + m_state.state.buttons ^= HidNpadButton_Up; + m_state.state.buttons |= HiddbgNpadButton_Capture; + } + + if (data.buttons[10] && data.buttons[14]) + { + m_state.state.buttons ^= HidNpadButton_Minus; + m_state.state.buttons ^= HidNpadButton_Down; + m_state.state.buttons |= HiddbgNpadButton_Home; + } } Result SwitchAbstractedPadHandler::UpdateAbstractedState() @@ -180,4 +194,4 @@ void SwitchAbstractedPadHandler::UpdateOutput() } svcSleepThread(1e+7L); -} \ No newline at end of file +}