From 41bc558fbe8ff0d8bf822ab2a470ea6bd61a1835 Mon Sep 17 00:00:00 2001 From: notaz Date: Fri, 15 Dec 2023 01:48:24 +0200 Subject: [PATCH] sync with standalone --- frontend/main.c | 4 ++++ frontend/main.h | 1 + frontend/menu.c | 1 + 3 files changed, 6 insertions(+) diff --git a/frontend/main.c b/frontend/main.c index 019835dd..53f31b0a 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -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; diff --git a/frontend/main.h b/frontend/main.h index 22053bbc..98b0f370 100644 --- a/frontend/main.h +++ b/frontend/main.h @@ -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) diff --git a/frontend/menu.c b/frontend/menu.c index 2b0d2cfd..e6c15402 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -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 } }; -- 2.39.5