Bug fixing spree -> scanline count works as expected.

This commit is contained in:
Christian Speckner 2020-01-06 00:15:20 +01:00
parent c16a16d7d4
commit bd9734ec66
3 changed files with 11 additions and 9 deletions

View File

@ -311,6 +311,12 @@ class Console : public Serializable, public ConsoleIO
*/
void updateVcenter(Int32 vcenter);
/**
Set up various properties of the TIA (vcenter, Height, etc) based on
the current display format.
*/
void setTIAProperties();
private:
/**
* Dry-run the emulation and detect the frame layout (PAL / NTSC).
@ -322,12 +328,6 @@ class Console : public Serializable, public ConsoleIO
*/
void redetectFrameLayout();
/**
Sets various properties of the TIA (vcenter, Height, etc) based on
the current display format.
*/
void setTIAProperties();
/**
Create the audio queue
*/

View File

@ -220,8 +220,8 @@ bool FrameManager::onLoad(Serializer& in)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameManager::recalculateMetrics() {
uInt32 ystartBase;
uInt32 baseHeight;
Int32 ystartBase;
Int32 baseHeight;
switch (layout())
{
@ -244,7 +244,7 @@ void FrameManager::recalculateMetrics() {
}
myHeight = baseHeight + myAdjustScanlines * 2;
myYStart = ystartBase + baseHeight - myHeight + myVcenter;
myYStart = std::max(0, ystartBase + (baseHeight - static_cast<Int32>(myHeight)) / 2 + myVcenter);
myJitterEmulation.setYStart(myYStart);
}

View File

@ -487,6 +487,8 @@ void VideoDialog::saveConfig()
// TV scanline intensity
instance().settings().setValue("tv.scanlines", myTVScanIntense->getValueLabel());
instance().console().setTIAProperties();
// Finally, issue a complete framebuffer re-initialization...
instance().createFrameBuffer();