Prevent FPS counters from outputting ridiculously high numbers
This commit is contained in:
parent
20d3fbe18a
commit
da0ef0e902
1 changed files with 7 additions and 0 deletions
|
@ -487,6 +487,13 @@ namespace NES
|
||||||
_fpsTimer.Reset();
|
_fpsTimer.Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(_currentFPS > 5000) {
|
||||||
|
_currentFPS = 0;
|
||||||
|
}
|
||||||
|
if(_currentRenderedFPS > 5000) {
|
||||||
|
_currentRenderedFPS = 0;
|
||||||
|
}
|
||||||
|
|
||||||
string fpsString = string("FPS: ") + std::to_string(_currentFPS) + " / " + std::to_string(_currentRenderedFPS);
|
string fpsString = string("FPS: ") + std::to_string(_currentFPS) + " / " + std::to_string(_currentRenderedFPS);
|
||||||
DrawOutlinedString(fpsString, (float)(_hdScreenWidth - 120), 13, Colors::AntiqueWhite, 1.0f);
|
DrawOutlinedString(fpsString, (float)(_hdScreenWidth - 120), 13, Colors::AntiqueWhite, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue