Skip to content

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

@UnknownShadow200

Description

@UnknownShadow200

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions