-
Notifications
You must be signed in to change notification settings - Fork 35
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
Implements win95sys.c #301
Merged
Merged
Conversation
This file contains 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
…into win95-sys
madebr
reviewed
Apr 26, 2023
Comment on lines
-2577
to
2581
// Sleep 1 ms to avoid 100% CPU usage | ||
OS_Sleep(1); | ||
this_call_time = PDGetTotalTime(); | ||
period = this_call_time - last_call_time; | ||
// added by dethrace to avoid 100% CPU usage | ||
gHarness_platform.Sleep(1); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to sleep first. Because now the time is sampled before the sleep which might cause an extra sleep.
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.
The OG code already has a split between
common
andpd
(platform-dependent) code. The original work was done on the DOS release which is where the platform-dependent code currently was pulled from.However, we are now using the windows release, where platform dependencies are better defined - namely small portions of the windows API and small portions of DirectInput and DirectDraw.
This PR switches us to us the OG win95 platform code, with a small shim implementing the Windows API in a cross-platform way. This allows the code in
win95sys.c
to be as close to OG as possible