From b4417b1c570e3fc7ac034f4fd3f34de302c7178d Mon Sep 17 00:00:00 2001 From: fsimuser9430 Date: Sun, 19 Feb 2023 18:57:18 +0200 Subject: x-plane-plugin: activate toggles only on initial button press --- x-plane-plugin/plugin.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'x-plane-plugin/plugin.c') diff --git a/x-plane-plugin/plugin.c b/x-plane-plugin/plugin.c index ed72e50e..e43ee0ef 100644 --- a/x-plane-plugin/plugin.c +++ b/x-plane-plugin/plugin.c @@ -134,6 +134,8 @@ static int TrackToggleHandler(XPLMCommandRef inCommand, XPLMCommandPhase inPhase, void* inRefCon) { + if (inPhase != xplm_CommandBegin) return 0; + if (track_disabled) { //Enable @@ -156,6 +158,8 @@ static int TranslationToggleHandler(XPLMCommandRef inCommand, XPLMCommandPhase inPhase, void* inRefCon) { + if (inPhase != xplm_CommandBegin) return 0; + translation_disabled = !translation_disabled; if (!translation_disabled) { -- cgit v1.2.3