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

Added support for future for emulators #84

Merged
merged 3 commits into from
Jan 20, 2024
Merged

Commits on Jan 20, 2024

  1. 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;
        }
    }
    ```
    Jujstme authored and CryZe committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    26b5a19 View commit details
    Browse the repository at this point in the history
  2. Fixing clippy suggestions

    Jujstme authored and CryZe committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    a14e2b9 View commit details
    Browse the repository at this point in the history
  3. Added wait_attach() functions to emulators

    Jujstme authored and CryZe committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    8774923 View commit details
    Browse the repository at this point in the history