diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index 4145b2892..81d156be6 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -385,40 +385,36 @@ void FrameBuffer::drawFrameStats() const int XPOS = 2, YPOS = 0; myStatsMsg.surface->invalidate(); - string bsinfo = info.BankSwitch + - (myOSystem.settings().getBool("dev.settings") ? "| Developer" : "| Player"); + // draw shadowed text + string bsinfo = info.BankSwitch + + (myOSystem.settings().getBool("dev.settings") ? "| Developer" : ""); color = myOSystem.console().tia().scanlinesLastFrame() != myLastScanlines ? kDbgColorRed : myStatsMsg.color; std::snprintf(msg, 30, "%3u", myOSystem.console().tia().scanlinesLastFrame()); myStatsMsg.surface->drawString(font(), msg, XPOS, YPOS, myStatsMsg.w, color, TextAlign::Left, 0, true, kBGColor); - // draw framerate + + // draw the effective framerate float frameRate; - if(myOSystem.settings().getInt("framerate") == 0) + const TimingInfo& ti = myOSystem.timingInfo(); + // update every ~1 second + if(ti.totalFrames - myTotalFrames >= myLastFrameRate) { - // if 'Auto' is selected, draw the calculated framerate - frameRate = myOSystem.console().getFramerate(); + frameRate = 1000000.0 * (ti.totalFrames - myTotalFrames) / (ti.totalTime - myTotalTime); + if(frameRate > myOSystem.console().getFramerate() + 1) + frameRate = 1; // check soon again + myTotalFrames = ti.totalFrames; + myTotalTime = ti.totalTime; } else - { - // if 'Auto' is not selected, draw the effective framerate - const TimingInfo& ti = myOSystem.timingInfo(); - if(ti.totalFrames - myTotalFrames >= myLastFrameRate) - { - frameRate = 1000000.0 * (ti.totalFrames - myTotalFrames) / (ti.totalTime - myTotalTime); - if(frameRate > myOSystem.console().getFramerate() + 1) - frameRate = 1; - myTotalFrames = ti.totalFrames; - myTotalTime = ti.totalTime; - } - else - frameRate = myLastFrameRate; - } - color = frameRate != myLastFrameRate ? kDbgColorRed : myStatsMsg.color; + frameRate = myLastFrameRate; + myLastFrameRate = frameRate; std::snprintf(msg, 30, "@%6.2ffps", frameRate); myStatsMsg.surface->drawString(font(), msg, XPOS + font().getStringWidth("262 "), YPOS, - myStatsMsg.w, color, TextAlign::Left, 0, true, kBGColor); + myStatsMsg.w, myStatsMsg.color, TextAlign::Left, 0, true, kBGColor); + + // draw bankswitching type std::snprintf(msg, 30, "=> %s", info.DisplayFormat.c_str()); myStatsMsg.surface->drawString(font(), msg, XPOS + font().getStringWidth("262 @ 60.00fps "), YPOS, myStatsMsg.w, myStatsMsg.color, TextAlign::Left, 0, true, kBGColor); diff --git a/src/gui/TimeMachineDialog.cxx b/src/gui/TimeMachineDialog.cxx index de4b17fd9..ffa69262c 100644 --- a/src/gui/TimeMachineDialog.cxx +++ b/src/gui/TimeMachineDialog.cxx @@ -261,7 +261,7 @@ void TimeMachineDialog::loadConfig() if(!surface().attributes().blending) { surface().attributes().blending = true; - surface().attributes().blendalpha = 80; + surface().attributes().blendalpha = 92; surface().applyAttributes(); }