Skip to content

Conversation

fsimuser9430
Copy link
Contributor

In X-Plane 12, pressing a key bound for any of two x-plane-plugin toggles can result in significant unexpected camera base offset shift, which can be mildly annoying.

The cause of this is X-Plane generating a rapid stream of keypress events while the key is being held down, which together with current logic of keeping camera base offset when disabling head tracking results in this problem.

An easy fix to this is only processing an initial key press and ignoring subsequent similar events until key is released. Such check is added in this pull request.

Tested in X-Plane 12 with plugin compiled against SDK 3.0.3 and SDK 4.0.0b1 on 64bit Linux. No other tests were performed. I invite @you to comment below if you can confirm that this fix works ok on any other platform or in XP11.

@sthalik
Copy link
Member

sthalik commented Feb 19, 2023

Looks good, thanks!

@sthalik sthalik merged commit 77c824e into opentrack:master Feb 19, 2023
@Rdtcmttsa Rdtcmttsa mentioned this pull request May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants