chore(generals-parity): complete wave 1-5 code parity baseline#139
Merged
Conversation
…s platforms Resolve FPS uncapping and frame counter instability that affected both Generals and Zero Hour on macOS and Linux. Changes: - protect timeBeginPeriod/timeEndPeriod Windows API calls with #ifdef _WIN32 guards in FramePacer constructor/destructor - add early-exit validation in FrameRateLimit::wait() to handle zero or invalid FPS limits without division-by-zero errors - ensure uncapped mode (maxFps > 1000000) skips limiting gracefully Shared Core/GameEngine fixes apply to both games automatically. Both GeneralsX and GeneralsXZH build and launch successfully with stable frame pacing. Fixes #132"
…flag state Root cause analysis: Generals base had FPS uncapped while Zero Hour worked because GameEngine.cpp was checking (m_useFpsLimit && m_framesPerSecondLimit <= 0) before setting default FPS. When m_useFpsLimit=FALSE (default) and m_framesPerSecondLimit=0 (default from INI loading), the condition failed and FPS remained 0 (uncapped). Changed initialization logic to always set BaseFps default when m_framesPerSecondLimit <= 0, regardless of m_useFpsLimit flag state. This ensures stable frame pacing on startup. Applied to both GeneralsX and GeneralsXZH for consistency. Fixes #132 completely"
… headers and GameEngine alignment Summary of changes: - Added full CompatLib header suite to Generals base for Win32/COM compatibility - Completed GeneralsMD GameLOD, Player, PlayerList, and UI alignments - Updated WWVegas2 libraries for both games - Fixed FPS initialization logic (previously: only reset FPS when m_useFpsLimit=TRUE, now always set default) - Protected Windows timer APIs with #ifdef guards - Added FPS limit validation for uncapped mode - Comprehensive audit trails in docs/WORKDIR/audit/ Generals base now has feature parity with Zero Hour for core systems. Both titles compile successfully with stable frame pacing on macOS/Linux. Related commits: - 62dab6f: fix(timing) - timer API guards and FPS limit validation - c722ca1: fix(fps-init) - ensure valid FPS default independent of flag state
…als-base-parity-issue-88 # Conflicts: # docs/DEV_BLOG/2026-05-DIARY.md
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.
Summary
This PR consolidates the parity baseline work across Generals and Zero Hour for waves 1-5, focusing on shared code alignment and safer cross-platform progression.
Important Context
This PR is not the final fix for the user-visible bugs tracked in #88.
It is an enabling step to reduce divergence and make subsequent bugfixes safer and more targeted.
What was done
Why this PR now
Even with outstanding runtime issues, this parity pass was required anyway to:
Issue linkage
Relates #88