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
merged 9 commits into from Jul 8, 2021

Conversation

mgerhardy
Copy link
Contributor

@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

https://www.youtube.com/watch?v=SOD97joxFds

@sev-
Copy link
Member

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 pr/eventrecorder branch 2 times, most recently from 2aa1b98 to 8708260 Compare June 24, 2021 17:39
@mgerhardy mgerhardy force-pushed the pr/eventrecorder branch 2 times, most recently from 094554e to 185aeaf Compare July 7, 2021 17:23
@mgerhardy mgerhardy marked this pull request as ready for review July 7, 2021 17:50
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.
…sMillis()

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
@sev-
Copy link
Member

sev- commented Jul 8, 2021

Thanks! Merging.

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