diff options
author | Stefan Hacker <dd0t@users.sourceforge.net> | 2010-04-29 17:28:05 +0400 |
---|---|---|
committer | Stefan Hacker <dd0t@users.sourceforge.net> | 2010-04-29 17:53:43 +0400 |
commit | 6380a88687534f241d8c882148abd2fb3faa0b2f (patch) | |
tree | c9cb7b6677f95f0f1124491b36560236abfd005f /overlay/d3d9.cpp | |
parent | 02811bc2851fba9ad70c2c2b15d3e97c1c160b2b (diff) |
Transmit fps more often and represent them as float
Diffstat (limited to 'overlay/d3d9.cpp')
-rw-r--r-- | overlay/d3d9.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/overlay/d3d9.cpp b/overlay/d3d9.cpp index 3790958a1..aa6bce690 100644 --- a/overlay/d3d9.cpp +++ b/overlay/d3d9.cpp @@ -202,12 +202,12 @@ void DevState::draw() { clock_t t = clock(); float elapsed = static_cast<float>(t - timeT) / CLOCKS_PER_SEC; ++frameCount; - if (elapsed > 1.0) { + if (elapsed > OVERLAY_FPS_INTERVAL) { OverlayMsg om; om.omh.uiMagic = OVERLAY_MAGIC_NUMBER; om.omh.uiType = OVERLAY_MSGTYPE_FPS; om.omh.iLength = sizeof(OverlayMsgFps); - om.omf.fps = static_cast<unsigned int>(frameCount * elapsed); + om.omf.fps = frameCount / elapsed; sendMessage(om); |