minor code fixes

This commit is contained in:
thrust26 2019-05-19 10:13:55 +02:00
parent 33c4e81bb0
commit d08cd7cbbd
2 changed files with 7 additions and 4 deletions

View File

@ -875,7 +875,7 @@ void FrameBuffer::setAvailableVidModes(uInt32 baseWidth, uInt32 baseHeight)
if(tiaMode)
{
// TIA windowed modes
uInt32 minZoom = 2 * hidpiScaleFactor();
uInt32 minZoom = supportedTIAMinZoom();
myTIAMaxZoom = maxZoomForScreen(baseWidth, baseHeight,
myAbsDesktopSize.w, myAbsDesktopSize.h);

View File

@ -337,9 +337,12 @@ void VideoDialog::loadConfig()
// TIA zoom levels
// These are dynamically loaded, since they depend on the size of
// the desktop and which renderer we're using
myTIAZoom->setMinValue(instance().frameBuffer().supportedTIAMinZoom() * 100);
myTIAZoom->setMaxValue(instance().frameBuffer().supportedTIAMaxZoom() * 100);
myTIAZoom->setTickmarkIntervals((instance().frameBuffer().supportedTIAMaxZoom() - 2) * 2);
float minZoom = instance().frameBuffer().supportedTIAMinZoom(); // or 2 if we allow lower values
float maxZoom = instance().frameBuffer().supportedTIAMaxZoom();
myTIAZoom->setMinValue(minZoom * 100);
myTIAZoom->setMaxValue(maxZoom * 100);
myTIAZoom->setTickmarkIntervals((maxZoom - minZoom) * 2); // every ~50%
myTIAZoom->setValue(instance().settings().getFloat("tia.zoom") * 100);
// TIA Palette