mirror of https://github.com/stella-emu/stella.git
Rearranged info in TIA stats message a little, to take up less space but
still include all relevant information. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1669 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
05c04fadb7
commit
e143a2a330
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: Console.cxx,v 1.156 2009-01-24 18:17:34 stephena Exp $
|
// $Id: Console.cxx,v 1.157 2009-02-01 22:17:09 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
@ -115,10 +115,8 @@ Console::Console(OSystem* osystem, Cartridge* cart, const Properties& props)
|
||||||
mySystem->attach(myTIA);
|
mySystem->attach(myTIA);
|
||||||
mySystem->attach(myCart);
|
mySystem->attach(myCart);
|
||||||
|
|
||||||
// Query some info about this console
|
|
||||||
ostringstream about, vidinfo;
|
|
||||||
|
|
||||||
// Auto-detect NTSC/PAL mode if it's requested
|
// Auto-detect NTSC/PAL mode if it's requested
|
||||||
|
string autodetected = "";
|
||||||
myDisplayFormat = myProperties.get(Display_Format);
|
myDisplayFormat = myProperties.get(Display_Format);
|
||||||
if(myDisplayFormat == "AUTO-DETECT" ||
|
if(myDisplayFormat == "AUTO-DETECT" ||
|
||||||
myOSystem->settings().getBool("rominfo"))
|
myOSystem->settings().getBool("rominfo"))
|
||||||
|
@ -138,9 +136,9 @@ Console::Console(OSystem* osystem, Cartridge* cart, const Properties& props)
|
||||||
}
|
}
|
||||||
myDisplayFormat = (palCount >= 15) ? "PAL" : "NTSC";
|
myDisplayFormat = (palCount >= 15) ? "PAL" : "NTSC";
|
||||||
if(myProperties.get(Display_Format) == "AUTO-DETECT")
|
if(myProperties.get(Display_Format) == "AUTO-DETECT")
|
||||||
myConsoleInfo.DisplayFormat = "AUTO => ";
|
autodetected = "*";
|
||||||
}
|
}
|
||||||
myConsoleInfo.DisplayFormat += myDisplayFormat;
|
myConsoleInfo.DisplayFormat = myDisplayFormat + autodetected;
|
||||||
|
|
||||||
// Set up the correct properties used when toggling format
|
// Set up the correct properties used when toggling format
|
||||||
// Note that this can be overridden if a format is forced
|
// Note that this can be overridden if a format is forced
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBuffer.cxx,v 1.163 2009-01-20 21:01:28 stephena Exp $
|
// $Id: FrameBuffer.cxx,v 1.164 2009-02-01 22:17:09 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
@ -133,8 +133,8 @@ bool FrameBuffer::initialize(const string& title, uInt32 width, uInt32 height)
|
||||||
|
|
||||||
// Create surfaces for TIA statistics and general messages
|
// Create surfaces for TIA statistics and general messages
|
||||||
myStatsMsg.color = kBtnTextColor;
|
myStatsMsg.color = kBtnTextColor;
|
||||||
myStatsMsg.w = myOSystem->consoleFont().getMaxCharWidth() * 21;
|
myStatsMsg.w = myOSystem->consoleFont().getMaxCharWidth() * 23 + 2;
|
||||||
myStatsMsg.h = (myOSystem->consoleFont().getFontHeight() + 2) * 3;
|
myStatsMsg.h = (myOSystem->consoleFont().getFontHeight() + 2) * 2;
|
||||||
|
|
||||||
if(myStatsMsg.surface == NULL)
|
if(myStatsMsg.surface == NULL)
|
||||||
{
|
{
|
||||||
|
@ -183,18 +183,16 @@ void FrameBuffer::update()
|
||||||
{
|
{
|
||||||
const ConsoleInfo& info = myOSystem->console().about();
|
const ConsoleInfo& info = myOSystem->console().about();
|
||||||
char msg[30];
|
char msg[30];
|
||||||
sprintf(msg, "%u LINES %2.2f FPS",
|
sprintf(msg, "%u @ %2.2ffps => %s",
|
||||||
myOSystem->console().tia().scanlines(),
|
myOSystem->console().tia().scanlines(),
|
||||||
myOSystem->console().getFramerate());
|
myOSystem->console().getFramerate(), info.DisplayFormat.c_str());
|
||||||
myStatsMsg.surface->fillRect(0, 0, myStatsMsg.w, myStatsMsg.h, kBGColor);
|
myStatsMsg.surface->fillRect(0, 0, myStatsMsg.w, myStatsMsg.h, kBGColor);
|
||||||
myStatsMsg.surface->drawString(&myOSystem->consoleFont(),
|
myStatsMsg.surface->drawString(&myOSystem->consoleFont(),
|
||||||
msg, 1, 1, myStatsMsg.w, myStatsMsg.color, kTextAlignLeft);
|
msg, 1, 1, myStatsMsg.w, myStatsMsg.color, kTextAlignLeft);
|
||||||
myStatsMsg.surface->drawString(&myOSystem->consoleFont(),
|
myStatsMsg.surface->drawString(&myOSystem->consoleFont(),
|
||||||
info.DisplayFormat, 1, 15, myStatsMsg.w, myStatsMsg.color, kTextAlignLeft);
|
info.BankSwitch, 1, 15, myStatsMsg.w, myStatsMsg.color, kTextAlignLeft);
|
||||||
myStatsMsg.surface->drawString(&myOSystem->consoleFont(),
|
|
||||||
info.BankSwitch, 1, 30, myStatsMsg.w, myStatsMsg.color, kTextAlignLeft);
|
|
||||||
myStatsMsg.surface->addDirtyRect(0, 0, 0, 0); // force a full draw
|
myStatsMsg.surface->addDirtyRect(0, 0, 0, 0); // force a full draw
|
||||||
myStatsMsg.surface->setPos(myImageRect.x() + 3, myImageRect.y() + 3);
|
myStatsMsg.surface->setPos(myImageRect.x() + 1, myImageRect.y() + 1);
|
||||||
myStatsMsg.surface->update();
|
myStatsMsg.surface->update();
|
||||||
}
|
}
|
||||||
break; // S_EMULATE
|
break; // S_EMULATE
|
||||||
|
|
Loading…
Reference in New Issue