mirror of https://github.com/stella-emu/stella.git
Made TIA window always open at a multiple of the minimum bounds
- this means that 320x240 is now the default 'base' size, and zoom levels are based on that - the TIA image is rendered into whatever sized window is active, meaning that NTSC and PAL modes now look similar Removed some 'small screen' dead code in FrameBuffer.
This commit is contained in:
parent
285583f959
commit
be775b53e3
|
@ -616,7 +616,7 @@ FBInitStatus Console::initializeVideo(bool full)
|
||||||
const string& title = string("Stella ") + STELLA_VERSION +
|
const string& title = string("Stella ") + STELLA_VERSION +
|
||||||
": \"" + myProperties.get(Cartridge_Name) + "\"";
|
": \"" + myProperties.get(Cartridge_Name) + "\"";
|
||||||
fbstatus = myOSystem.frameBuffer().createDisplay(title,
|
fbstatus = myOSystem.frameBuffer().createDisplay(title,
|
||||||
myTIA->width() << 1, myTIA->height());
|
TIAConstants::viewableWidth, TIAConstants::viewableHeight);
|
||||||
if(fbstatus != FBInitStatus::Success)
|
if(fbstatus != FBInitStatus::Success)
|
||||||
return fbstatus;
|
return fbstatus;
|
||||||
|
|
||||||
|
|
|
@ -88,8 +88,6 @@ bool FrameBuffer::initialize()
|
||||||
// We can probably add ifdefs to take care of corner cases,
|
// We can probably add ifdefs to take care of corner cases,
|
||||||
// but that means we've failed to abstract it enough ...
|
// but that means we've failed to abstract it enough ...
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
bool smallScreen = myDesktopSize.w < FBMinimum::Width ||
|
|
||||||
myDesktopSize.h < FBMinimum::Height;
|
|
||||||
|
|
||||||
// This font is used in a variety of situations when a really small
|
// This font is used in a variety of situations when a really small
|
||||||
// font is needed; we let the specific widget/dialog decide when to
|
// font is needed; we let the specific widget/dialog decide when to
|
||||||
|
@ -98,27 +96,20 @@ bool FrameBuffer::initialize()
|
||||||
|
|
||||||
// The general font used in all UI elements
|
// The general font used in all UI elements
|
||||||
// This is determined by the size of the framebuffer
|
// This is determined by the size of the framebuffer
|
||||||
myFont = make_unique<GUI::Font>(smallScreen ? GUI::stellaDesc : GUI::stellaMediumDesc);
|
myFont = make_unique<GUI::Font>(GUI::stellaMediumDesc);
|
||||||
|
|
||||||
// The info font used in all UI elements
|
// The info font used in all UI elements
|
||||||
// This is determined by the size of the framebuffer
|
// This is determined by the size of the framebuffer
|
||||||
myInfoFont = make_unique<GUI::Font>(smallScreen ? GUI::stellaDesc : GUI::consoleDesc);
|
myInfoFont = make_unique<GUI::Font>(GUI::consoleDesc);
|
||||||
|
|
||||||
// The font used by the ROM launcher
|
// The font used by the ROM launcher
|
||||||
// Normally, this is configurable by the user, except in the case of
|
const string& lf = myOSystem.settings().getString("launcherfont");
|
||||||
// very small screens
|
if(lf == "small")
|
||||||
if(!smallScreen)
|
myLauncherFont = make_unique<GUI::Font>(GUI::consoleDesc);
|
||||||
{
|
else if(lf == "medium")
|
||||||
const string& lf = myOSystem.settings().getString("launcherfont");
|
myLauncherFont = make_unique<GUI::Font>(GUI::stellaMediumDesc);
|
||||||
if(lf == "small")
|
|
||||||
myLauncherFont = make_unique<GUI::Font>(GUI::consoleDesc);
|
|
||||||
else if(lf == "medium")
|
|
||||||
myLauncherFont = make_unique<GUI::Font>(GUI::stellaMediumDesc);
|
|
||||||
else
|
|
||||||
myLauncherFont = make_unique<GUI::Font>(GUI::stellaLargeDesc);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
myLauncherFont = make_unique<GUI::Font>(GUI::stellaDesc);
|
myLauncherFont = make_unique<GUI::Font>(GUI::stellaLargeDesc);
|
||||||
|
|
||||||
// Determine possible TIA windowed zoom levels
|
// Determine possible TIA windowed zoom levels
|
||||||
uInt32 maxZoom = maxWindowSizeForScreen(
|
uInt32 maxZoom = maxWindowSizeForScreen(
|
||||||
|
@ -126,8 +117,7 @@ bool FrameBuffer::initialize()
|
||||||
myDesktopSize.w, myDesktopSize.h);
|
myDesktopSize.w, myDesktopSize.h);
|
||||||
|
|
||||||
// Figure our the smallest zoom level we can use
|
// Figure our the smallest zoom level we can use
|
||||||
uInt32 firstZoom = smallScreen ? 1 : 2;
|
for(uInt32 zoom = 2; zoom <= maxZoom; ++zoom)
|
||||||
for(uInt32 zoom = firstZoom; zoom <= maxZoom; ++zoom)
|
|
||||||
{
|
{
|
||||||
ostringstream desc;
|
ostringstream desc;
|
||||||
desc << "Zoom " << zoom << "x";
|
desc << "Zoom " << zoom << "x";
|
||||||
|
@ -841,11 +831,8 @@ void FrameBuffer::setAvailableVidModes(uInt32 baseWidth, uInt32 baseHeight)
|
||||||
uInt32 aspect = myOSystem.settings().getInt(myOSystem.console().tia().frameLayout() == FrameLayout::ntsc ?
|
uInt32 aspect = myOSystem.settings().getInt(myOSystem.console().tia().frameLayout() == FrameLayout::ntsc ?
|
||||||
"tia.aspectn" : "tia.aspectp");
|
"tia.aspectn" : "tia.aspectp");
|
||||||
|
|
||||||
// Figure our the smallest zoom level we can use
|
// Determine all zoom levels
|
||||||
uInt32 firstZoom = 2;
|
for(uInt32 zoom = 2; zoom <= maxZoom; ++zoom)
|
||||||
if(myDesktopSize.w < FBMinimum::Width || myDesktopSize.h < FBMinimum::Height)
|
|
||||||
firstZoom = 1;
|
|
||||||
for(uInt32 zoom = firstZoom; zoom <= maxZoom; ++zoom)
|
|
||||||
{
|
{
|
||||||
ostringstream desc;
|
ostringstream desc;
|
||||||
desc << "Zoom " << zoom << "x";
|
desc << "Zoom " << zoom << "x";
|
||||||
|
|
|
@ -100,7 +100,7 @@ void TIASurface::initialize(const Console& console, const VideoMode& mode)
|
||||||
mySLineSurface->setSrcSize(1, 2 * int(float(mode.image.height()) /
|
mySLineSurface->setSrcSize(1, 2 * int(float(mode.image.height()) /
|
||||||
floor((float(mode.image.height()) / myTIA->height()) + 0.5)));
|
floor((float(mode.image.height()) / myTIA->height()) + 0.5)));
|
||||||
|
|
||||||
#if 0
|
#if 1
|
||||||
cerr << "INITIALIZE:\n"
|
cerr << "INITIALIZE:\n"
|
||||||
<< "TIA:\n"
|
<< "TIA:\n"
|
||||||
<< "src: " << myTiaSurface->srcRect() << endl
|
<< "src: " << myTiaSurface->srcRect() << endl
|
||||||
|
|
Loading…
Reference in New Issue