sync with standalone
authornotaz <notasas@gmail.com>
Thu, 14 Dec 2023 23:48:24 +0000 (01:48 +0200)
committernotaz <notasas@gmail.com>
Thu, 14 Dec 2023 23:54:27 +0000 (01:54 +0200)
frontend/main.c
frontend/main.h
frontend/menu.c

index 019835d..53f31b0 100644 (file)
@@ -288,6 +288,10 @@ do_state_slot:
                                SysMessage("GPU_open returned %d", ret);
                }
                return;
+       case SACTION_ANALOG_TOGGLE:
+               ret = padToggleAnalog(0);
+               snprintf(hud_msg, sizeof(hud_msg), "ANALOG %s", ret ? "ON" : "OFF");
+               break;
 #endif
        default:
                return;
index 22053bb..98b0f37 100644 (file)
@@ -79,6 +79,7 @@ enum sched_action {
        SACTION_GUN_A,
        SACTION_GUN_B,
        SACTION_GUN_TRIGGER2,
+       SACTION_ANALOG_TOGGLE,
 };
 
 #define SACTION_GUN_MASK (0x0f << SACTION_GUN_TRIGGER)
index 2b0d2cf..e6c1540 100644 (file)
@@ -903,6 +903,7 @@ me_bind_action emuctrl_actions[] =
        { "Volume Up        ", 1 << SACTION_VOLUME_UP },
        { "Volume Down      ", 1 << SACTION_VOLUME_DOWN },
 #endif
+       { "Analog toggle    ", 1 << SACTION_ANALOG_TOGGLE },
        { NULL,                0 }
 };