From cc72f125748dbb20c4cb1c13747784c951ae59c3 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Sat, 14 Dec 2019 21:48:23 +0100 Subject: [PATCH] prepare VideoDialog for new filter mode --- src/emucore/Settings.cxx | 6 +++--- src/gui/VideoDialog.cxx | 26 ++++++++++++++++---------- src/gui/VideoDialog.hxx | 2 +- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx index 13bc6e600..17ab8339d 100644 --- a/src/emucore/Settings.cxx +++ b/src/emucore/Settings.cxx @@ -46,7 +46,7 @@ Settings::Settings() // TIA specific options setPermanent("tia.zoom", "3"); - setPermanent("tia.inter", "false"); + setPermanent("tia.filter", "sharp"); setPermanent("tia.aspectn", "100"); setPermanent("tia.aspectp", "100"); setPermanent("fullscreen", "false"); @@ -403,8 +403,8 @@ void Settings::usage() const #endif << " -tia.zoom Use the specified zoom level (windowed mode)\n" << " for TIA image\n" - << " -tia.inter <1|0> Enable interpolated (smooth) scaling for TIA\n" - << " image\n" + << " -tia.filter \n" << " -tia.aspectn Scale TIA width by the given percentage in NTS\n" << " mode\n" << " -tia.aspectp Scale TIA width by the given percentage in PAL\n" diff --git a/src/gui/VideoDialog.cxx b/src/gui/VideoDialog.cxx index 935bfd524..21cf9b00d 100644 --- a/src/gui/VideoDialog.cxx +++ b/src/gui/VideoDialog.cxx @@ -119,18 +119,24 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, VarList::push_back(items, "Z26", "z26"); VarList::push_back(items, "User", "user"); myTIAPalette = new PopUpWidget(myTab, font, xpos, ypos, pwidth, - lineHeight, items, "TIA palette ", lwidth); + lineHeight, items, "Palette ", lwidth); wid.push_back(myTIAPalette); ypos += lineHeight + VGAP; - // TIA interpolation - myTIAInterpolate = new CheckboxWidget(myTab, font, xpos, ypos + 1, "TIA interpolation "); - wid.push_back(myTIAInterpolate); + // TIA Filter + items.clear(); + VarList::push_back(items, "None", "none"); + VarList::push_back(items, "Sharp", "sharp"); + VarList::push_back(items, "Soft", "soft"); + myTIAFilter = new PopUpWidget(myTab, font, xpos, ypos, pwidth, + lineHeight, items, "Filter ", lwidth); + wid.push_back(myTIAFilter); ypos += lineHeight + VGAP; + // TIA zoom levels (will be dynamically filled later) myTIAZoom = new SliderWidget(myTab, font, xpos, ypos - 1, swidth, lineHeight, - "TIA zoom", lwidth, 0, fontWidth * 4, "%"); + "Zoom ", lwidth, 0, fontWidth * 4, "%"); myTIAZoom->setMinValue(200); myTIAZoom->setStepValue(FrameBuffer::ZOOM_STEPS * 100); wid.push_back(myTIAZoom); ypos += lineHeight + VGAP; @@ -349,8 +355,8 @@ void VideoDialog::loadConfig() myTIAPalette->setSelected( instance().settings().getString("palette"), "standard"); - // TIA interpolation - myTIAInterpolate->setState(instance().settings().getBool("tia.inter")); + // TIA Filter + myTIAFilter->setSelected(instance().settings().getString("tia.filter"), "none"); // Aspect ratio setting (NTSC and PAL) myNAspectRatio->setValue(instance().settings().getInt("tia.aspectn")); @@ -422,8 +428,8 @@ void VideoDialog::saveConfig() instance().settings().setValue("palette", myTIAPalette->getSelectedTag().toString()); - // TIA interpolation - instance().settings().setValue("tia.inter", myTIAInterpolate->getState()); + // TIA Filter + instance().settings().setValue("tia.filter", myTIAFilter->getSelectedTag().toString()); // Aspect ratio setting (NTSC and PAL) instance().settings().setValue("tia.aspectn", myNAspectRatio->getValueLabel()); @@ -501,7 +507,7 @@ void VideoDialog::setDefaults() myRenderer->setSelectedIndex(0); myTIAZoom->setValue(300); myTIAPalette->setSelected("standard", ""); - myTIAInterpolate->setState(false); + myTIAFilter->setSelected("none", ""); myNAspectRatio->setValue(91); myPAspectRatio->setValue(109); mySpeed->setValue(0); diff --git a/src/gui/VideoDialog.hxx b/src/gui/VideoDialog.hxx index a4342d539..21adff53e 100644 --- a/src/gui/VideoDialog.hxx +++ b/src/gui/VideoDialog.hxx @@ -57,7 +57,7 @@ class VideoDialog : public Dialog PopUpWidget* myRenderer; SliderWidget* myTIAZoom; PopUpWidget* myTIAPalette; - CheckboxWidget* myTIAInterpolate; + PopUpWidget* myTIAFilter; SliderWidget* myNAspectRatio; SliderWidget* myPAspectRatio; SliderWidget* mySpeed;