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

Check if the next frame is due #108

Open
GoldenretriverYT opened this issue Jul 7, 2023 · 1 comment
Open

Check if the next frame is due #108

GoldenretriverYT opened this issue Jul 7, 2023 · 1 comment

Comments

@GoldenretriverYT
Copy link

Unlike with mfb_wait_sync, I do not want the thread to stall until the next frame is due but I want to execute code in between, if there is still time to do so. I would appreciate a way do to so, maybe even with an argument to check the future (like mfb_frame_is_due_in(nanoseconds)

If there already is a way to due so, please tell me. If there isnt, this is a feature suggestion (:

@austanss
Copy link

I also believe this would be useful to implement.

Consider a use case where there is some sort of logic being calculated iteratively in a loop. If some representation of this logic is ought to be rendered in a MiniFB window, then its tick-rate is locked to match the framerate of the window.

The only workaround to this issue is to, in the aformentioned scenario, have the miniFB window's update logic running in a separate thread than that of the physical logic. However, then you have to work around the logistics of thread affinity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants