diff --git a/src/common/tv_filters/NTSCFilter.cxx b/src/common/tv_filters/NTSCFilter.cxx index f45c92125..bd89189c8 100644 --- a/src/common/tv_filters/NTSCFilter.cxx +++ b/src/common/tv_filters/NTSCFilter.cxx @@ -78,7 +78,7 @@ string NTSCFilter::setPreset(Preset preset) break; case PRESET_BAD: mySetup = atari_ntsc_bad; - msg = "BAD"; + msg = "BAD ADJUST"; break; case PRESET_CUSTOM: mySetup = myCustomSetup; diff --git a/src/gui/VideoDialog.cxx b/src/gui/VideoDialog.cxx index c79dece55..24f0acd90 100644 --- a/src/gui/VideoDialog.cxx +++ b/src/gui/VideoDialog.cxx @@ -250,10 +250,10 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent, items.push_back("Composite", BSPF_toString(NTSCFilter::PRESET_COMPOSITE)); items.push_back("S-Video", BSPF_toString(NTSCFilter::PRESET_SVIDEO)); items.push_back("RGB", BSPF_toString(NTSCFilter::PRESET_RGB)); - items.push_back("Badly adjusted", BSPF_toString(NTSCFilter::PRESET_BAD)); + items.push_back("Bad adjust", BSPF_toString(NTSCFilter::PRESET_BAD)); items.push_back("Custom", BSPF_toString(NTSCFilter::PRESET_CUSTOM)); lwidth = font.getStringWidth("TV Mode: "); - pwidth = font.getStringWidth("Badly adjusted"), + pwidth = font.getStringWidth("Bad adjust"), myTVMode = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, "TV Mode: ", lwidth, kTVModeChanged); @@ -408,6 +408,12 @@ void VideoDialog::loadConfig() // Fast loading of Supercharger BIOS myFastSCBiosCheckbox->setState(instance().settings().getBool("fastscbios")); + // TV Mode + myTVMode->setSelected( + instance().settings().getString("tv_filter"), "0"); + handleTVModeChange(instance().settings().getInt("tv_filter") == + (int)NTSCFilter::PRESET_CUSTOM); + myTab->loadConfig(); } @@ -469,6 +475,12 @@ void VideoDialog::saveConfig() // Fast loading of Supercharger BIOS instance().settings().setBool("fastscbios", myFastSCBiosCheckbox->getState()); + // TV Mode + instance().settings().setString("tv_filter", myTVMode->getSelectedTag()); + + + + // Finally, issue a complete framebuffer re-initialization instance().createFrameBuffer(); } @@ -498,8 +510,11 @@ void VideoDialog::setDefaults() myCenterCheckbox->setState(false); myFastSCBiosCheckbox->setState(false); + myTVMode->setSelected("0", "0"); + // Make sure that mutually-exclusive items are not enabled at the same time handleFullscreenChange(true); + handleTVModeChange(false); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -511,6 +526,31 @@ void VideoDialog::handleFullscreenChange(bool enable) #endif } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void VideoDialog::handleTVModeChange(bool enable) +{ + myTVSharp->setEnabled(enable); + myTVSharpLabel->setEnabled(enable); + myTVRes->setEnabled(enable); + myTVResLabel->setEnabled(enable); + myTVArtifacts->setEnabled(enable); + myTVArtifactsLabel->setEnabled(enable); + myTVFringe->setEnabled(enable); + myTVFringeLabel->setEnabled(enable); + myTVBlend->setEnabled(enable); + myTVBlendLabel->setEnabled(enable); + myTVBright->setEnabled(enable); + myTVBrightLabel->setEnabled(enable); + myTVContrast->setEnabled(enable); + myTVContrastLabel->setEnabled(enable); + myTVSatur->setEnabled(enable); + myTVSaturLabel->setEnabled(enable); + myTVGamma->setEnabled(enable); + myTVGammaLabel->setEnabled(enable); + + _dirty = true; +} + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void VideoDialog::handleCommand(CommandSender* sender, int cmd, int data, int id) @@ -545,6 +585,30 @@ void VideoDialog::handleCommand(CommandSender* sender, int cmd, handleFullscreenChange(myFullscreenPopup->getSelectedTag() != "-1"); break; + case kTVSharpChanged: myTVSharpLabel->setValue(myTVSharp->getValue()); + break; + case kTVResChanged: myTVResLabel->setValue(myTVRes->getValue()); + break; + case kTVArtifactsChanged: myTVArtifactsLabel->setValue(myTVArtifacts->getValue()); + break; + case kTVFringeChanged: myTVFringeLabel->setValue(myTVFringe->getValue()); + break; + case kTVBlendChanged: myTVBlendLabel->setValue(myTVBlend->getValue()); + break; + case kTVBrightChanged: myTVBrightLabel->setValue(myTVBright->getValue()); + break; + case kTVContrastChanged: myTVContrastLabel->setValue(myTVContrast->getValue()); + break; + case kTVSaturChanged: myTVSaturLabel->setValue(myTVSatur->getValue()); + break; + case kTVGammaChanged: myTVGammaLabel->setValue(myTVGamma->getValue()); + break; + + case kTVModeChanged: + handleTVModeChange(atoi(myTVMode->getSelectedTag().c_str()) == + (int)NTSCFilter::PRESET_CUSTOM); + break; + default: Dialog::handleCommand(sender, cmd, data, 0); break; diff --git a/src/gui/VideoDialog.hxx b/src/gui/VideoDialog.hxx index 225fba9d4..875d47db4 100644 --- a/src/gui/VideoDialog.hxx +++ b/src/gui/VideoDialog.hxx @@ -49,6 +49,7 @@ class VideoDialog : public Dialog void setDefaults(); void handleFullscreenChange(bool enable); + void handleTVModeChange(bool enable); virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); private: diff --git a/src/gui/Widget.cxx b/src/gui/Widget.cxx index e428b9806..26af72a4d 100644 --- a/src/gui/Widget.cxx +++ b/src/gui/Widget.cxx @@ -618,11 +618,13 @@ bool SliderWidget::handleEvent(Event::Type e) switch(e) { case Event::UIDown: + case Event::UILeft: case Event::UIPgDown: setValue(_value - _stepValue); break; case Event::UIUp: + case Event::UIRight: case Event::UIPgUp: setValue(_value + _stepValue); break;