diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-19 22:50:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-19 22:50:22 +0100 |
commit | 77c824e2113a7d68123d7a153f4bcd2aacce944f (patch) | |
tree | 351342faa0d6d4bb6ed990bc30a9168d45f5c8a8 | |
parent | f46207ef79371225e2f61e5695b86dadc0a4e036 (diff) | |
parent | b4417b1c570e3fc7ac034f4fd3f34de302c7178d (diff) |
Merge pull request #1616 from fsimuser9430/xplane-plugin-toggle-fix-for-v12
-rw-r--r-- | x-plane-plugin/plugin.c | 4 |
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) { |