Closed elishacloud closed 7 months ago
This article probably explains what might be the problem better than I could: https://randomascii.wordpress.com/2020/10/04/windows-timer-resolution-the-great-rule-change/
Also, I see the timeBeginPeriod() called in DDrawCompat, but I cannot find the timeEndPeriod() call, which Microsoft's documentation says must exist:
Pretty sure it's cleaned up on process exit anyway. (It would be pretty bad if it wasn't, since a crashing app can't clean up such things anyway). I think that note is mainly meant for apps that intend to continue running afterwards, when they don't need the increased timer granularity anymore, in which case this can save system resources.
I see. Thanks for the article link!
I am writing a tool that attempts to convert the ddraw/Direct3D functions to Direct3D9. As part of this work I ran into an issue with WarGames where it would hang for about 15 seconds or so right after the mission briefing and before starting the mission.
However, I discovered that it could be fixed by this line of code from DDrawCompat v0.3.2. I am wondering why this line of code would prevent the game from hanging for 15 seconds, if you have any ideas.
Also, I see the
timeBeginPeriod()
called in DDrawCompat, but I cannot find thetimeEndPeriod()
call, which Microsoft's documentation says must exist: