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

Implements win95sys.c #301

Merged
merged 27 commits into from
Apr 18, 2023
Merged

Implements win95sys.c #301

merged 27 commits into from
Apr 18, 2023

Conversation

dethrace-labs
Copy link
Owner

@dethrace-labs dethrace-labs commented Apr 14, 2023

The OG code already has a split between common and pd (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

@dethrace-labs dethrace-labs marked this pull request as ready for review April 16, 2023 19:35
@dethrace-labs dethrace-labs merged commit ef9e4d6 into main Apr 18, 2023
@dethrace-labs dethrace-labs deleted the win95-sys branch April 18, 2023 10:50
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);
}
Copy link
Collaborator

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants