Small logic changes to the FPS reporting, only update if FPS>1. Still disabled,
but at least nobody would say there is a bug like min FPS being 999. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3330 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
d2ecdcafff
commit
4eadddd8ab
@ -222,19 +222,23 @@ void MainLoop::run()
|
|||||||
#if 0
|
#if 0
|
||||||
int fps = irr_driver->getDevice()->getVideoDriver()->getFPS();
|
int fps = irr_driver->getDevice()->getVideoDriver()->getFPS();
|
||||||
bool printFPS = false;
|
bool printFPS = false;
|
||||||
if((fps < minFPS) && (fps > 1)) { // First report seems to be always 1, so not useful
|
// First reports seem to be always 1, so not useful
|
||||||
minFPS = fps;
|
if (fps > 1) {
|
||||||
printFPS = true;
|
// More than +-5 range is interesting to report (otherwise noise)
|
||||||
}
|
if ((lastFPS+5 <= fps) || (lastFPS-5 >= fps)) {
|
||||||
if(fps > maxFPS) {
|
lastFPS = fps;
|
||||||
maxFPS = fps;
|
printFPS = true;
|
||||||
printFPS = true;
|
}
|
||||||
}
|
// Min and max are worth updating any time they happen
|
||||||
if ((lastFPS+5 <= fps) || (lastFPS-5 >= fps)) {
|
if (fps < minFPS) {
|
||||||
lastFPS = fps;
|
minFPS = fps;
|
||||||
printFPS = true;
|
printFPS = true;
|
||||||
}
|
}
|
||||||
// First print per run will be really silly, as in 999 1 1, just ignore it ;]
|
if (fps > maxFPS) {
|
||||||
|
maxFPS = fps;
|
||||||
|
printFPS = true;
|
||||||
|
}
|
||||||
|
} // no else, or you get over 50 'printf ("FPS below 1!\n")' easily
|
||||||
if (printFPS) printf("FPS %3d<%3d<%3d\n", minFPS, fps, maxFPS);
|
if (printFPS) printf("FPS %3d<%3d<%3d\n", minFPS, fps, maxFPS);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user