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

[Feature Request] APIHawk: Allow a way for an external tool to always run Update while the game is paused and without frame advancing. #3626

Open
tommai78101 opened this issue Apr 12, 2023 · 0 comments · May be fixed by #3723
Labels
Enhancement For feature requests or possible improvements re: APIHawk Relating to EmuHawk's public .NET API or to the creation of external tools

Comments

@tommai78101
Copy link
Contributor

Summary

I have written an external tool that requires the use of TAStudio to function. There is a use case where I need to always have the external tool be invoking IToolFormBase.UpdateAfter() when the game is paused and when TAStudio is active.

Given the following source code snippet here:

// BlockFrameAdvance (true when input it being editted in TAStudio) supercedes all other frame advance conditions
if ((runFrame || force) && !BlockFrameAdvance)

When the game is paused, runFrame flag will be false, and force is typically false by default. With runFrame and force both set to false, EmuHawk will not be able to invoke the methods:

  • Tools.FastUpdateBefore()
  • Tools.UpdateToolsBefore()
  • Tools.FastUpdateAfter()
  • UpdateToolsAfter()

When frame advancing from TAStudio, force flag will be set to true, and we can invoke any of the 4 methods listed above. But it wouldn't be useful as I have a need to invoke Tools.FastUpdateBefore(), Tools.UpdateToolsBefore(), and Tools.FastUpdateAfter() while the game is paused and without TAStudio frame-advancing the game.

Thus, we currently don't have a solution. I would like to request for a small modification so that there can be an External Tools API method that will always be invoked even when the game is paused. Perhaps something like:

Tools.AlwaysUpdate() right outside of that if statement block. It is an empty method, but it will be useful for external tools to override it, and be able to do things even when the game is paused.

Host env.

  • BizHawk 2.9; Win11 64-bit Pro 22H2; Intel/NVIDIA
  • BizHawk 2.9.1 dev; Win11 64-bit Pro 22H2; Intel/NVIDIA
@YoshiRulz YoshiRulz added Enhancement For feature requests or possible improvements re: APIHawk Relating to EmuHawk's public .NET API or to the creation of external tools labels Apr 12, 2023
@tommai78101 tommai78101 linked a pull request Aug 6, 2023 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For feature requests or possible improvements re: APIHawk Relating to EmuHawk's public .NET API or to the creation of external tools
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants