MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / handleFrameRate

Function handleFrameRate

TheForceEngine/TFE_Input/replay.cpp:747–768  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

745 }
746
747 void handleFrameRate()
748 {
749 // Set the frame rate for replay playback.
750 string framePlaybackStr = TFE_FrontEndUI::getPlaybackFramerate();
751
752 if (strcmp(framePlaybackStr.c_str(), "Original") == 0)
753 {
754 s32 frameRate = TFE_FrontEndUI::getRecordFramerate();
755 TFE_System::frameLimiter_set(frameRate);
756 TFE_System::setVsync(true);
757 }
758 else if (strcmp(framePlaybackStr.c_str(), "Unlimited") == 0)
759 {
760 TFE_System::setVsync(false);
761 }
762 else
763 {
764 s32 playbackFrameRate = std::atoi(framePlaybackStr.c_str());
765 TFE_System::frameLimiter_set(playbackFrameRate);
766 TFE_System::setVsync(true);
767 }
768 }
769
770 void increaseReplayFrameRate()
771 {

Callers 3

increaseReplayFrameRateFunction · 0.85
decreaseReplayFrameRateFunction · 0.85
loadReplayFunction · 0.85

Calls 5

getPlaybackFramerateFunction · 0.85
getRecordFramerateFunction · 0.85
frameLimiter_setFunction · 0.85
setVsyncFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected