Haiku operating system support + simple CPU idling#41
Open
pulkomandy wants to merge 3 commits intoDIVGAMES:old_masterfrom
Open
Haiku operating system support + simple CPU idling#41pulkomandy wants to merge 3 commits intoDIVGAMES:old_masterfrom
pulkomandy wants to merge 3 commits intoDIVGAMES:old_masterfrom
Conversation
- d_type in dirent does not exist, stat is needed to get the entry type - libdl does not exist (included in libroot) - functions _fseek and _ftell exist in Haiku libroot and conflict with div
The main loops are constantly running and using a lot of CPU for nothing. This implements a simple idling algorithm: - If there are no user inputs, and - Nothing already asked to wait for retrace, Then it should be okay to sleep for 10ms (not more, because DIV timers are based on a 10ms system clock). This may not be perfect: adding "something_happened = 1" in more places may be needed. But at least DIV runs without my laptop fans spinning like crazy now.
- Fix crash if there are more than 32 video modes - The sorting function didn't work right for me, rewrite it - Remove memory allocation that's not really needed
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.
Hello!
I wanted to run DIV on Haiku for some time now. This merge request includes the few fixes needed as well as a patch to reduce CPU use. Let me know what you think of it.
Thanks for keeping DIV alive! I didn't get any publishable games out of it back in the 2000s, but I should certainly give it a try again!