Remove setting 'fixed' height from frame-manager completely.

This commit is contained in:
Stephen Anthony 2019-03-10 16:49:11 -02:30
parent d09b6329c9
commit 93a07b4517
5 changed files with 3 additions and 32 deletions

View File

@ -746,6 +746,7 @@ void Console::updateYStart(uInt32 ystart)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Console::setTIAProperties()
{
// FIXME - ystart is probably disappearing soon, or at least autodetection is
uInt32 ystart = atoi(myProperties.get(Display_YStart).c_str());
if(ystart != 0)
ystart = BSPF::clamp(ystart, 0u, TIAConstants::maxYStart);
@ -754,11 +755,6 @@ void Console::setTIAProperties()
myYStartAutodetected = true;
}
// FIXME - Remove concept of 'height' entirely
// The height will eventually be constant, and the aspect scaling will take care
// of differences in NTSC vs. PAL
uInt32 height = TIAConstants::viewableHeight;
if(myDisplayFormat == "NTSC" || myDisplayFormat == "PAL60" ||
myDisplayFormat == "SECAM60")
{
@ -768,14 +764,10 @@ void Console::setTIAProperties()
else
{
// Assume we've got ~312 scanlines (PAL-like format)
// PAL ROMs normally need at least 250 lines
height = std::max(height, 250u);
myTIA->setLayout(FrameLayout::pal);
}
myTIA->setYStart(ystart);
myTIA->setHeight(height);
myEmulationTiming.updateFrameLayout(myTIA->frameLayout());
myEmulationTiming.updateConsoleTiming(myConsoleTiming);

View File

@ -252,9 +252,8 @@ class TIA : public Device
uInt32 ystart() const { return myFrameManager->ystart(); }
/**
Changes the current Height/YStart properties.
Changes the current YStart property.
*/
void setHeight(uInt32 height) { myFrameManager->setFixedHeight(height); }
void setYStart(uInt32 ystart) { myFrameManager->setYstart(ystart); }
void setLayout(FrameLayout layout) { myFrameManager->setLayout(layout); }

View File

@ -148,12 +148,6 @@ class AbstractFrameManager : public Serializable
*/
virtual uInt32 height() const { return 0; }
/**
* Configure a fixed frame height (the default is determined by the frame
* layout).
*/
virtual void setFixedHeight(uInt32 height) {}
/**
* The current y coordinate (valid only during rendering).
*/

View File

@ -45,7 +45,6 @@ FrameManager::FrameManager()
myOverscanLines(0),
myFrameLines(0),
myHeight(0),
myFixedHeight(0),
myYStart(0),
myJitterEnabled(false)
{
@ -189,15 +188,7 @@ void FrameManager::onLayoutChange()
}
myFrameLines = Metrics::vsync + myVblankLines + myKernelLines + myOverscanLines;
if (myFixedHeight == 0)
myHeight = myKernelLines + Metrics::visibleOverscan;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameManager::setFixedHeight(uInt32 height)
{
myFixedHeight = height;
myHeight = myFixedHeight > 0 ? myFixedHeight : (myKernelLines + Metrics::visibleOverscan);
myHeight = myKernelLines + Metrics::visibleOverscan;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -221,7 +212,6 @@ bool FrameManager::onSave(Serializer& out) const
out.putInt(myOverscanLines);
out.putInt(myFrameLines);
out.putInt(myHeight);
out.putInt(myFixedHeight);
out.putInt(myYStart);
out.putBool(myJitterEnabled);
@ -245,7 +235,6 @@ bool FrameManager::onLoad(Serializer& in)
myOverscanLines = in.getInt();
myFrameLines = in.getInt();
myHeight = in.getInt();
myFixedHeight = in.getInt();
myYStart = in.getInt();
myJitterEnabled = in.getBool();

View File

@ -38,8 +38,6 @@ class FrameManager: public AbstractFrameManager {
uInt32 height() const override { return myHeight; }
void setFixedHeight(uInt32 height) override;
uInt32 getY() const override { return myY; }
uInt32 scanlines() const override { return myCurrentFrameTotalLines; }
@ -91,7 +89,6 @@ class FrameManager: public AbstractFrameManager {
uInt32 myOverscanLines;
uInt32 myFrameLines;
uInt32 myHeight;
uInt32 myFixedHeight;
uInt32 myYStart;
bool myJitterEnabled;