@@ -1460,10 +1460,10 @@ public static OutputControllerDualShock4InputState MapToDualShock4Input(Joycon i
14601460 else if ( buttons [ ( int ) Button . DPAD_RIGHT ] )
14611461 output . dPad = DpadDirection . East ;
14621462
1463- output . share = buttons [ ( int ) Button . MINUS ] ;
1463+ output . share = buttons [ ( int ) Button . CAPTURE ] ;
14641464 output . options = buttons [ ( int ) Button . PLUS ] ;
14651465 output . ps = buttons [ ( int ) Button . HOME ] ;
1466- output . touchpad = buttons [ ( int ) Button . CAPTURE ] ;
1466+ output . touchpad = buttons [ ( int ) Button . MINUS ] ;
14671467 output . shoulder_left = buttons [ ( int ) Button . SHOULDER_1 ] ;
14681468 output . shoulder_right = buttons [ ( int ) Button . SHOULDER2_1 ] ;
14691469 output . thumb_left = buttons [ ( int ) Button . STICK ] ;
@@ -1494,10 +1494,10 @@ public static OutputControllerDualShock4InputState MapToDualShock4Input(Joycon i
14941494 else if ( buttons [ ( int ) ( isLeft ? Button . DPAD_RIGHT : Button . A ) ] )
14951495 output . dPad = DpadDirection . East ;
14961496
1497- output . share = buttons [ ( int ) Button . MINUS ] ;
1497+ output . share = buttons [ ( int ) Button . CAPTURE ] ;
14981498 output . options = buttons [ ( int ) Button . PLUS ] ;
14991499 output . ps = buttons [ ( int ) Button . HOME ] ;
1500- output . touchpad = buttons [ ( int ) Button . CAPTURE ] ;
1500+ output . touchpad = buttons [ ( int ) Button . MINUS ] ;
15011501 output . shoulder_left = buttons [ ( int ) ( isLeft ? Button . SHOULDER_1 : Button . SHOULDER2_1 ) ] ;
15021502 output . shoulder_right = buttons [ ( int ) ( isLeft ? Button . SHOULDER2_1 : Button . SHOULDER_1 ) ] ;
15031503 output . thumb_left = buttons [ ( int ) ( isLeft ? Button . STICK : Button . STICK2 ) ] ;
@@ -1543,6 +1543,9 @@ public static OutputControllerDualShock4InputState MapToDualShock4Input(Joycon i
15431543 output . trigger_left_value = ( byte ) ( buttons [ ( int ) ( isLeft ? Button . SHOULDER_2 : Button . SHOULDER_1 ) ] ? Byte . MaxValue : 0 ) ;
15441544 output . trigger_right_value = ( byte ) ( buttons [ ( int ) ( isLeft ? Button . SHOULDER_1 : Button . SHOULDER_2 ) ] ? Byte . MaxValue : 0 ) ;
15451545 }
1546+ // Output digital L2 / R2 in addition to analog L2 / R2
1547+ output . trigger_left = output . trigger_left_value > 0 ? output . trigger_left = true : output . trigger_left = false ;
1548+ output . trigger_right = output . trigger_right_value > 0 ? output . trigger_right = true : output . trigger_right = false ;
15461549
15471550 return output ;
15481551 }
0 commit comments