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

EVENTRECORDER: fixes for keymapper custom engine events #3085

merged 9 commits into from Jul 8, 2021


Copy link

@mgerhardy mgerhardy commented Jun 23, 2021

The record file format is changed. But the version wasn't bumped because the old state wasn't working anyway.

This added the custom engine events from the key mapper to the serialization of the event recorder.

With this change I can record a play in twine.

During a playback there is currently no interaction possible as all event sources except the recorder are disabled. I don't consider this a problem atm - as I see the main benefit on running the recorded plays on the buildbot - but if someone needs to have this back, I would consider doing this in a future PR.

Follow up tasks:

  • create recording for game demos
  • integrate into buildbot

Copy link

@sev- sev- commented Jun 24, 2021

Thank you for looking into this.

Answering your question. No, it was not intended. The custom events were introduced later, and since the event recorder is not enabled by default, nobody noticed that it is not processing them.

You do not really need to bump the version, because the feature was not used, so it is safe to keep it a v1 for now.

@mgerhardy mgerhardy force-pushed the mgerhardy:pr/eventrecorder branch 2 times, most recently from 2aa1b98 to 8708260 Jun 24, 2021
@mgerhardy mgerhardy force-pushed the mgerhardy:pr/eventrecorder branch 2 times, most recently from 094554e to 185aeaf Jul 7, 2021
@mgerhardy mgerhardy marked this pull request as ready for review Jul 7, 2021
mgerhardy added 9 commits Jun 23, 2021
the custom engine events were missing and the default event manager transforms the backend events
. Which means that the event recorder is not persisting the low level key press/release events
but the already transformed custom engine events of the keymapper
they are running as event source and would bring the event recorder into an out-of-sync state
This might also become a return to launcher, but I've somehere read the hint that
the event recorder was only meant to play back one game per session. We'll see.

If for some reason getMillis() was called in any of the functions that are called
inside of processMillis() the getNextEvent would skip events. To prevent this we
detect recursive calls to processMillis() now and assume that no further millisecond
has passed since the initial call.
due to the fact that we aborted every event that wasn't a key-repeat event, we never filled the event queue
@mgerhardy mgerhardy force-pushed the mgerhardy:pr/eventrecorder branch from f0559d7 to 7818358 Jul 8, 2021
Copy link

@sev- sev- commented Jul 8, 2021

Thanks! Merging.

@sev- sev- merged commit 930aefb into scummvm:master Jul 8, 2021
1 check passed
1 check passed
Codacy Static Code Analysis Codacy Static Code Analysis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
2 participants