Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update XP-Pen report parser #887

Merged
merged 3 commits into from
Mar 22, 2021
Merged

Conversation

X9VoiD
Copy link
Member

@X9VoiD X9VoiD commented Mar 20, 2021

Changes

  • Support 8 buttons
  • Use BitVector32 wherever profitable
  • Simplify aux report detection
    • Remove redundant check on XP_PenAuxReport (already performed in XP_PenReportParser)
  • Skip BitConverter's unneeded safety checks by directly calling Unsafe.ReadUnaligned<T>()

    We know in advance that the bytes we're parsing are complete

@X9VoiD X9VoiD mentioned this pull request Mar 20, 2021
Copy link
Member

@InfinityGhost InfinityGhost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is actually tangible evidence this improves performance, this could be applied to other report parsers as well.

@InfinityGhost InfinityGhost added core OpenTabletDriver core library enhancement New feature or request labels Mar 20, 2021
Copy link
Member

@InfinityGhost InfinityGhost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth the change, we should go ahead and make these changes to other report parsers while we're at it, ideally in separate branches so we can merge on a per-manufacturer basis.

@InfinityGhost InfinityGhost added this to the v0.5.x milestone Mar 22, 2021
@InfinityGhost InfinityGhost merged commit 599d2e8 into OpenTabletDriver:master Mar 22, 2021
@X9VoiD X9VoiD deleted the xpparser branch March 22, 2021 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core OpenTabletDriver core library enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants