Skip to content

Add hooks to xcb_send_request and friends #608

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

Merged
merged 5 commits into from
Jun 14, 2024

Conversation

CasualPokePlayer
Copy link
Contributor

@CasualPokePlayer CasualPokePlayer commented Jun 11, 2024

Mostly gets ruffle hooking correctly, however, there seems to be some invalid free crash in xlib code, not setting GameInfo::XCBEVENTS avoids this for some reason :/ this has been fixed, everything should work correctly.

Resolves #593 (for now)

@CasualPokePlayer

This comment was marked as resolved.

@CasualPokePlayer CasualPokePlayer marked this pull request as ready for review June 13, 2024 00:30
Mostly gets ruffle hooking correctly, however, there seems to be some invalid free crash in xlib code, not setting GameInfo::XCBEVENTS avoids this for some reason :/
XCB event objects are expected to be allocated by malloc (not new!), and the caller is supposed to free them (which might not work for new!).
xcb_ge_generic_event_t events have variable length, so simply copying the first 36 bytes is not enough. This primarily shows issues with Xlib and Xcb being used together.
This was kind of a TODO, to try to implement the reply side of these hooks, however it turns out to be really tricky, the only sensible thing seems to be to stache the sequence numbers returned then override replies using those sequence numbers. very annoying to do anyways, and it's not needed for now for Ruffle, so not bothering.
@clementgallet clementgallet merged commit 8bdcb34 into clementgallet:master Jun 14, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

On new ruffle versions, many x11 calls are not hooked
2 participants