Adjust SDL loop timing a bit#752
Merged
Gadgetoid merged 2 commits into32blit:masterfrom Jan 13, 2023
Merged
Conversation
Collaborator
Author
|
... and then I realise that this will have unstable (Which also means it was already running |
Signal SDL loop every 10 ms but limit render to 20ms. Also call render before update to match what stm32/pico do.
It doesn't run the main loop at 100Hz.
Collaborator
Author
|
Came back to this as it helps the audio buffering in DaftBoy. "Fixed" Emscripten by #ifdef-ing the render check. It's still the odd one out, running at the display refresh rate unlike SDL on anything else (the same as before this change)... |
Contributor
|
Thank you! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes the fact that SDL only called
tickevery 20ms, so you would always be running behind and get two updates. Also switchesrender/tickaround as SDL was backwards compared to STM32/Pico.