diff options
author | Nipun Garg | 2019-07-15 12:11:25 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:20 +0200 |
commit | 68b2e9adff5eb3dda5cb8bf788264b08a900e7cb (patch) | |
tree | f49e1068162c2f3490a95f46a8e5c83b725cce01 /engines/hdb/gfx.cpp | |
parent | 26210cfce662880ca5daeeab1f203e86cbbbae63 (diff) | |
download | scummvm-rg350-68b2e9adff5eb3dda5cb8bf788264b08a900e7cb.tar.gz scummvm-rg350-68b2e9adff5eb3dda5cb8bf788264b08a900e7cb.tar.bz2 scummvm-rg350-68b2e9adff5eb3dda5cb8bf788264b08a900e7cb.zip |
HDB: Count FPS and print onto screen
Diffstat (limited to 'engines/hdb/gfx.cpp')
-rw-r--r-- | engines/hdb/gfx.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp index 56dc8fec7e..5719b8cea7 100644 --- a/engines/hdb/gfx.cpp +++ b/engines/hdb/gfx.cpp @@ -343,6 +343,11 @@ void Gfx::updateFade() { g_system->copyRectToScreen(_globalSurface.getBasePtr(0, 0), _globalSurface.pitch, 0, 0, _globalSurface.w, _globalSurface.h); g_system->updateScreen(); + if (g_hdb->getDebug()) { + g_hdb->_frames.push_back(g_system->getMillis()); + while (g_hdb->_frames[0] < g_system->getMillis() - 1000) + g_hdb->_frames.remove_at(0); + } g_system->delayMillis(1000 / kGameFPS); } while (_fadeInfo.active); |