mirror of https://github.com/stella-emu/stella.git
reduced TimeMachineDialog transparency
frame stats now always displays the real frameRate
This commit is contained in:
parent
9a3516b610
commit
eb96e1ca49
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue