EVENTRECORDER: fixes for keymapper custom engine events #3085
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:
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.
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.