NovaSquirrel/Mesen-X

[Feature Request] Add a script event that is called regularly, even while the emulator is "paused"

Closed this issue · 2 comments

Currently scripts cannot continue running while the emulator is paused, as they have no way to resume while paused. All of the currently available events hook to things like end of frame and sprite0 hits, none of which occur while paused. I'd like an event that runs on a regular basis (~30 fps would be plenty) that would allow the script to manage LuaSocket connections even while execution is paused.

I have a partial implementation of this in a PR. This PR goes into much more detail and includes a simplified script for testing the desired effect: AlchemicRaker#1

I've submitted a PR to resolve this: #58
Instead of adding an event that is called all the time, this adds an event that is only called while emulation is paused. This can be used with the existing events to have code running at any time.

Resolved with this PR.