summaryrefslogtreecommitdiffhomepage
path: root/x-plane-plugin
diff options
context:
space:
mode:
authorfsimuser9430 <fsimuser9430@users.noreply.github.com>2023-02-19 18:57:18 +0200
committerfsimuser9430 <fsimuser9430@users.noreply.github.com>2023-02-19 18:57:18 +0200
commitb4417b1c570e3fc7ac034f4fd3f34de302c7178d (patch)
tree351342faa0d6d4bb6ed990bc30a9168d45f5c8a8 /x-plane-plugin
parentf46207ef79371225e2f61e5695b86dadc0a4e036 (diff)
x-plane-plugin: activate toggles only on initial button press
Diffstat (limited to 'x-plane-plugin')
-rw-r--r--x-plane-plugin/plugin.c4
1 files changed, 4 insertions, 0 deletions
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)
{