Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'overlay/d3d10.cpp')
-rw-r--r--overlay/d3d10.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/overlay/d3d10.cpp b/overlay/d3d10.cpp
index 0d0ee7ea3..f2f131077 100644
--- a/overlay/d3d10.cpp
+++ b/overlay/d3d10.cpp
@@ -152,7 +152,7 @@ void D10State::blit(unsigned int x, unsigned int y, unsigned int w, unsigned int
UCHAR* pTexels = (UCHAR*)mappedTex.pData;
- for (int r=0;r< uiHeight; ++r) {
+ for (unsigned int r=0;r< uiHeight; ++r) {
unsigned char *sptr = a_ucTexture + r * uiWidth * 4;
unsigned char *dptr = reinterpret_cast<unsigned char *>(pTexels) + r * mappedTex.RowPitch;
memcpy(dptr, sptr, uiWidth * 4);
@@ -387,12 +387,12 @@ void D10State::draw() {
clock_t t = clock();
float elapsed = static_cast<float>(t - timeT) / CLOCKS_PER_SEC;
++frameCount;
- if (elapsed > 1.0) { // Send FPS update every second
+ 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);