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

GlobalShortcut_win: fix XboxInput button mask in buttonName(). #2490

Merged
merged 1 commit into from Aug 6, 2016

Conversation

@mkrautz
Copy link
Member

commented Aug 6, 2016

The controller ID is shifted 24 bits, so the correct mask is
0x00ffffff.

Also, 0x00ffffffff (40 bits) should have been a red flag, since
we're working with uint32_t types here.

This fixes button names for Xbox controllers that are at indexes > 0.

GlobalShortcut_win: fix XboxInput button mask in buttonName().
The controller ID is shifted 24 bits, so the correct mask is
0x00ffffff.

Also, 0x00ffffffff (40 bits) should have been a red flag, since
we're working with uint32_t types here.

This fixes button names for Xbox controllers that are at indexes > 0.
@hacst

This comment has been minimized.

Copy link
Member

commented Aug 6, 2016

So we makes in a part of the id as buttons? Lol. Easy to miss though. I wonder whether gcc or vc /analyze would've caught this.

LGTM

@mkrautz mkrautz merged commit 0763a3d into mumble-voip:master Aug 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.