From 8ad7a6150804a108e293998ea7d8496575d1b97a Mon Sep 17 00:00:00 2001 From: Raymond Tsang Date: Wed, 2 Mar 2022 22:46:52 +0800 Subject: [PATCH] Update Joycon.cs Button.CAPTURE is missing and it is a fix --- Assets/JoyconLib_scripts/Joycon.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/JoyconLib_scripts/Joycon.cs b/Assets/JoyconLib_scripts/Joycon.cs index f68bcc2..f36c669 100644 --- a/Assets/JoyconLib_scripts/Joycon.cs +++ b/Assets/JoyconLib_scripts/Joycon.cs @@ -417,6 +417,7 @@ private int ProcessButtonsAndStick(byte[] report_buf) buttons[(int)Button.DPAD_UP] = (report_buf[3 + (isleft ? 2 : 0)] & (isleft ? 0x02 : 0x02)) != 0; buttons[(int)Button.DPAD_LEFT] = (report_buf[3 + (isleft ? 2 : 0)] & (isleft ? 0x08 : 0x01)) != 0; buttons[(int)Button.HOME] = ((report_buf[4] & 0x10) != 0); + buttons[(int)Button.CAPTURE] = ((report_buf[4] & 0x20) != 0); buttons[(int)Button.MINUS] = ((report_buf[4] & 0x01) != 0); buttons[(int)Button.PLUS] = ((report_buf[4] & 0x02) != 0); buttons[(int)Button.STICK] = ((report_buf[4] & (isleft ? 0x08 : 0x04)) != 0); @@ -634,4 +635,4 @@ public void PrintArray(T[] arr, DebugType d = DebugType.NONE, uint len = 0, u } DebugPrint(string.Format(format, tostr), d); } -} \ No newline at end of file +}