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

Unify emu.setislagged, emu.setlagcount, and tastudio.setlag #4173

Open
warmCabin opened this issue Jan 7, 2025 · 1 comment
Open

Unify emu.setislagged, emu.setlagcount, and tastudio.setlag #4173

warmCabin opened this issue Jan 7, 2025 · 1 comment
Labels
re: Lua API/scripting Relating to EmuHawk's Lua API (not the Lua Console) Request: Feature/Enhancement For feature requests or possible improvements Tool: TAStudio

Comments

@warmCabin
Copy link
Contributor

Summary

There are three separate ways of looking at lag in the Hawk Lua API: the lag flag (emu.setislagged), lag counter (emu.setlagcount), and TAStudio red bars (tastudio.setlag). These three values should be the three different ways of looking at the same information, but are in fact completely unrelated. There should be one simple setlag call that keeps all these values in sync.

Repro

while true do
    emu.setislagged(math.random() < 0.5)
    emu.setlagcount(math.random() * 1000)
    tastudio.setlag(emu.framecount(), math.random() < 0.5)

    emu.frameadvance()
end

Host env.

  • BizHawk 2.10.0 Windows 10
@YoshiRulz
Copy link
Member

See also #3447 and #3447 (comment).

@YoshiRulz YoshiRulz added Request: Feature/Enhancement For feature requests or possible improvements Tool: TAStudio re: Lua API/scripting Relating to EmuHawk's Lua API (not the Lua Console) labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
re: Lua API/scripting Relating to EmuHawk's Lua API (not the Lua Console) Request: Feature/Enhancement For feature requests or possible improvements Tool: TAStudio
Projects
None yet
Development

No branches or pull requests

2 participants