forked from LiveSplit/asr
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for
future
on emulators
This commit adds support for `future` when coding autosplitters for emulators, allowing to code similarly compared to native pc games. The internal `update()` function gets called automatically in this case, so this also removes the need to manually call said function on every iteration of the main loop. The downside is using a internal mutability for the main `state` and `ram_base` variable, however they are not publicly accessible so this should not raise many concerns. ```rust async fn main() { loop { let emulator = ps1::Emulator::wait_attach().await; emulator.until_closes(async { loop { // TODO: Do something on every tick. next_tick().await; } }).await; } } ```
- Loading branch information
Showing
7 changed files
with
406 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.