@@ -430,7 +430,7 @@ void MainTextUpdate() {
430430 printf (" , press \" ALT\" + \" A\" or \" PS\" + \" R1\" to switch.\n " );
431431
432432 if (AppStatus.ChangeModesWithoutPress ) printf (" Change modes without pressing the touchpad" ); else printf (" Change modes by pressing the touchpad" );
433- printf (" , press \" ALT\" + \" W\" to switch.\n " );
433+ printf (" , press \" ALT\" + \" W\" or \" PS \" + \" Share \" to switch.\n " );
434434 printf (" Press \" ALT\" + \" B\" or \" PS\" + \" L1\" to turn the backlight on or off.\n " );
435435
436436 printf (" Press \" ALT\" + \" Escape\" to exit.\n " );
@@ -626,7 +626,7 @@ int main(int argc, char **argv)
626626 SkipPollCount = SkipPollTimeOut;
627627 }
628628
629- if (( GetAsyncKeyState (VK_MENU) & 0x8000 ) != 0 && (GetAsyncKeyState (' W' ) & 0x8000 ) != 0 && SkipPollCount == 0 )
629+ if ( (( GetAsyncKeyState (VK_MENU) & 0x8000 ) != 0 && (GetAsyncKeyState (' W' ) & 0x8000 ) != 0 ) || (InputState. buttons & JSMASK_PS && InputState. buttons & JSMASK_SHARE) && SkipPollCount == 0 )
630630 {
631631 AppStatus.ChangeModesWithoutPress = !AppStatus.ChangeModesWithoutPress ;
632632 MainTextUpdate ();
@@ -744,8 +744,10 @@ int main(int argc, char **argv)
744744 }
745745
746746 if (JslGetControllerType (deviceID[0 ]) == JS_TYPE_DS || JslGetControllerType (deviceID[0 ]) == JS_TYPE_DS4) {
747- report.wButtons |= InputState.buttons & JSMASK_SHARE ? XINPUT_GAMEPAD_BACK : 0 ;
748- report.wButtons |= InputState.buttons & JSMASK_OPTIONS ? XINPUT_GAMEPAD_START : 0 ;
747+ if (!(InputState.buttons & JSMASK_PS)) {
748+ report.wButtons |= InputState.buttons & JSMASK_SHARE ? XINPUT_GAMEPAD_BACK : 0 ;
749+ report.wButtons |= InputState.buttons & JSMASK_OPTIONS ? XINPUT_GAMEPAD_START : 0 ;
750+ }
749751 } else if (JslGetControllerType (deviceID[0 ]) == JS_TYPE_PRO_CONTROLLER || JslGetControllerType (deviceID[0 ]) == JS_TYPE_JOYCON_LEFT || JslGetControllerType (deviceID[0 ]) == JS_TYPE_JOYCON_RIGHT) {
750752 report.wButtons |= InputState.buttons & JSMASK_MINUS ? XINPUT_GAMEPAD_BACK : 0 ;
751753 report.wButtons |= InputState.buttons & JSMASK_PLUS ? XINPUT_GAMEPAD_START : 0 ;
0 commit comments