-
Notifications
You must be signed in to change notification settings - Fork 59
Description
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,