mirror of https://github.com/stella-emu/stella.git
larger font for frame stats
This commit is contained in:
parent
27291dd5d2
commit
b67b795642
|
@ -232,8 +232,8 @@ FBInitStatus FrameBuffer::createDisplay(const string& title,
|
||||||
|
|
||||||
// Create surfaces for TIA statistics and general messages
|
// Create surfaces for TIA statistics and general messages
|
||||||
myStatsMsg.color = kColorInfo;
|
myStatsMsg.color = kColorInfo;
|
||||||
myStatsMsg.w = infoFont().getMaxCharWidth() * 30 + 2;
|
myStatsMsg.w = font().getMaxCharWidth() * 30 + 3;
|
||||||
myStatsMsg.h = (infoFont().getFontHeight() + 2) * 3;
|
myStatsMsg.h = (font().getFontHeight() + 2) * 2;
|
||||||
|
|
||||||
if(!myStatsMsg.surface)
|
if(!myStatsMsg.surface)
|
||||||
{
|
{
|
||||||
|
@ -383,6 +383,7 @@ void FrameBuffer::drawFrameStats()
|
||||||
const ConsoleInfo& info = myOSystem.console().about();
|
const ConsoleInfo& info = myOSystem.console().about();
|
||||||
char msg[30];
|
char msg[30];
|
||||||
uInt32 color;
|
uInt32 color;
|
||||||
|
const int XPOS = 2, YPOS = 0;
|
||||||
|
|
||||||
myStatsMsg.surface->invalidate();
|
myStatsMsg.surface->invalidate();
|
||||||
string bsinfo = info.BankSwitch +
|
string bsinfo = info.BankSwitch +
|
||||||
|
@ -390,7 +391,7 @@ void FrameBuffer::drawFrameStats()
|
||||||
// draw shadowed text
|
// draw shadowed text
|
||||||
color = myOSystem.console().tia().scanlinesLastFrame() != myLastScanlines ? kDbgColorRed : myStatsMsg.color;
|
color = myOSystem.console().tia().scanlinesLastFrame() != myLastScanlines ? kDbgColorRed : myStatsMsg.color;
|
||||||
std::snprintf(msg, 30, "%3u", myOSystem.console().tia().scanlinesLastFrame());
|
std::snprintf(msg, 30, "%3u", myOSystem.console().tia().scanlinesLastFrame());
|
||||||
myStatsMsg.surface->drawString(infoFont(), msg, 1, 1,
|
myStatsMsg.surface->drawString(font(), msg, XPOS, YPOS,
|
||||||
myStatsMsg.w, color, TextAlign::Left, 0, true, kBGColor);
|
myStatsMsg.w, color, TextAlign::Left, 0, true, kBGColor);
|
||||||
// draw framerate
|
// draw framerate
|
||||||
float frameRate;
|
float frameRate;
|
||||||
|
@ -417,13 +418,13 @@ void FrameBuffer::drawFrameStats()
|
||||||
color = frameRate != myLastFrameRate ? kDbgColorRed : myStatsMsg.color;
|
color = frameRate != myLastFrameRate ? kDbgColorRed : myStatsMsg.color;
|
||||||
myLastFrameRate = frameRate;
|
myLastFrameRate = frameRate;
|
||||||
std::snprintf(msg, 30, "@%6.2ffps", frameRate);
|
std::snprintf(msg, 30, "@%6.2ffps", frameRate);
|
||||||
myStatsMsg.surface->drawString(infoFont(), msg, 1 + infoFont().getStringWidth("262 "), 1,
|
myStatsMsg.surface->drawString(font(), msg, XPOS + font().getStringWidth("262 "), YPOS,
|
||||||
myStatsMsg.w, color, TextAlign::Left, 0, true, kBGColor);
|
myStatsMsg.w, color, TextAlign::Left, 0, true, kBGColor);
|
||||||
std::snprintf(msg, 30, "=> %s", info.DisplayFormat.c_str());
|
std::snprintf(msg, 30, "=> %s", info.DisplayFormat.c_str());
|
||||||
myStatsMsg.surface->drawString(infoFont(), msg, 1 + infoFont().getStringWidth("262 @ 60.00fps "), 1,
|
myStatsMsg.surface->drawString(font(), msg, XPOS + font().getStringWidth("262 @ 60.00fps "), YPOS,
|
||||||
myStatsMsg.w, myStatsMsg.color, TextAlign::Left, 0, true, kBGColor);
|
myStatsMsg.w, myStatsMsg.color, TextAlign::Left, 0, true, kBGColor);
|
||||||
|
|
||||||
myStatsMsg.surface->drawString(infoFont(), bsinfo, 1, 15,
|
myStatsMsg.surface->drawString(font(), bsinfo, XPOS, YPOS + font().getFontHeight(),
|
||||||
myStatsMsg.w, myStatsMsg.color, TextAlign::Left, 0, true, kBGColor);
|
myStatsMsg.w, myStatsMsg.color, TextAlign::Left, 0, true, kBGColor);
|
||||||
|
|
||||||
myStatsMsg.surface->setDirty();
|
myStatsMsg.surface->setDirty();
|
||||||
|
|
|
@ -515,7 +515,7 @@ class FrameBuffer
|
||||||
bool myStatsEnabled;
|
bool myStatsEnabled;
|
||||||
uInt32 myLastScanlines;
|
uInt32 myLastScanlines;
|
||||||
float myLastFrameRate;
|
float myLastFrameRate;
|
||||||
|
|
||||||
bool myGrabMouse;
|
bool myGrabMouse;
|
||||||
|
|
||||||
// The list of all available video modes for this framebuffer
|
// The list of all available video modes for this framebuffer
|
||||||
|
|
Loading…
Reference in New Issue