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

Generic XI_RawMotion events are always sent with opcode of 0 #430

Closed
UnknownShadow200 opened this issue Aug 5, 2021 · 0 comments
Closed

Comments

@UnknownShadow200
Copy link

UnknownShadow200 commented Aug 5, 2021

I'm attempting to run a game that uses XInput2 XI_RawMotion events for mouse input through libTAS.
However, the XI_RawMotion events sent by libTAS are always ignored by the game. (note: the game uses XLib directly, it doesn't use SDL)

The events are ignored by the game because libTAS is sending XI_RawMotion events with an opcode (event.xcookie.extension) of 0 instead of the opcode returned from XQueryExtension(display, "XInputExtension", &xiOpcode ...


Issue seems to be because although libTAS sets event.xcookie.extension to xinput_opcode
https://github.com/clementgallet/libTAS/blob/d2c3eb07474acca9da759bbfde7396227e30c971/src/library/inputs/inputevents.cpp#L761..L774

assigning xinput_opcode to a value is only performed when LIBTAS_HAS_XINPUT is defined
https://github.com/clementgallet/libTAS/blob/d2c3eb07474acca9da759bbfde7396227e30c971/src/library/xlib/xwindows.cpp#L68..L73

but LIBTAS_HAS_XINPUT never actually gets defined anywhere by default anymore.

The solution I can think of is to just remove the #ifdef LIBTAS_HAS_XINPUT around that and also from the code in XFreeEventData, but I'm not sure if that's the best solution,

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

No branches or pull requests

1 participant