feat(frame-pacer): overhaul logic and render FPS limits and presets#2699
feat(frame-pacer): overhaul logic and render FPS limits and presets#2699githubawn wants to merge 3 commits into
Conversation
- Added 15 FPS to render presets and expanded logic presets (1 to 960 FPS). - Implemented array-based preset snapping for logic FPS. - Renamed extraStep to snapValue for clarity. - Removed redundant logic speed scaling guards and safety asserts. - Cleaned up stale comments and dead code in CommandXlat.
|
| Filename | Overview |
|---|---|
| Core/GameEngine/Include/Common/FrameRateLimit.h | Removed the StepFpsValue/MinFpsValue enum from LogicTimeScaleFpsPreset, replaced with array-based design; added optional snapValue params to all three public methods; moved s_fpsValues to private — clean interface change with no issues. |
| Core/GameEngine/Source/Common/FrameRateLimit.cpp | Added 15 to RenderFpsPreset array, introduced LogicTimeScaleFpsPreset::s_fpsValues (1–960, UncappedFpsValue), replaced linear step logic with ascending-array search + snap; edge cases (floor at 1, ceiling at UncappedFpsValue, value==snapValue, value between presets) all handled correctly. |
| Generals/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp | Simplified changeLogicTimeScale: removed the remainder-ceiling math, passes maxRenderFps as snapValue, and only calls setLogicTimeScaleFps when actually enabling timescale so the last active FPS is preserved for sane re-enable — logic is correct for all capped/uncapped combinations. |
| GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp | Identical simplification to the Generals/ counterpart; both files are kept in sync correctly. |
Reviews (3): Last reviewed commit: "implemented feedback" | Re-trigger Greptile
This change was generated with AI assistance. All generated code has been reviewed, tested, and verified for functionality.