From 732ccaca76ce53d7a7b47cef1e79d45f8c5afd83 Mon Sep 17 00:00:00 2001 From: stephena Date: Sun, 13 May 2012 20:01:47 +0000 Subject: [PATCH] The 'Defaults' button in Video Settings now applies defaults to the currently selected tab only. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2472 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/gui/VideoDialog.cxx | 71 ++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 29 deletions(-) diff --git a/src/gui/VideoDialog.cxx b/src/gui/VideoDialog.cxx index 320c18c0a..dee5fe9b7 100644 --- a/src/gui/VideoDialog.cxx +++ b/src/gui/VideoDialog.cxx @@ -579,39 +579,52 @@ void VideoDialog::saveConfig() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void VideoDialog::setDefaults() { - myRendererPopup->setSelected("soft", ""); - myTIAFilterPopup->setSelected( - instance().desktopWidth() < 640 ? "zoom1x" : "zoom2x", ""); - myTIAPalettePopup->setSelected("standard", ""); - myFSResPopup->setSelected("auto", ""); - myFrameTimingPopup->setSelected("sleep", ""); - myGLFilterPopup->setSelected("nearest", ""); - myNAspectRatioSlider->setValue(90); - myNAspectRatioLabel->setLabel("90"); - myPAspectRatioSlider->setValue(100); - myPAspectRatioLabel->setLabel("100"); - myFrameRateSlider->setValue(0); - myFrameRateLabel->setLabel("Auto"); + switch(myTab->getActiveTab()) + { + case 0: // General + { + myRendererPopup->setSelected("soft", ""); + myTIAFilterPopup->setSelected( + instance().desktopWidth() < 640 ? "zoom1x" : "zoom2x", ""); + myTIAPalettePopup->setSelected("standard", ""); + myFSResPopup->setSelected("auto", ""); + myFrameTimingPopup->setSelected("sleep", ""); + myGLFilterPopup->setSelected("nearest", ""); + myNAspectRatioSlider->setValue(90); + myNAspectRatioLabel->setLabel("90"); + myPAspectRatioSlider->setValue(100); + myPAspectRatioLabel->setLabel("100"); + myFrameRateSlider->setValue(0); + myFrameRateLabel->setLabel("Auto"); - myFullscreenPopup->setSelected("0", ""); - myColorLossCheckbox->setState(true); - myGLStretchCheckbox->setState(true); - myUseVSyncCheckbox->setState(true); - myUIMessagesCheckbox->setState(true); - myCenterCheckbox->setState(false); - myFastSCBiosCheckbox->setState(false); + myFullscreenPopup->setSelected("0", ""); + myColorLossCheckbox->setState(true); + myGLStretchCheckbox->setState(true); + myUseVSyncCheckbox->setState(true); + myUIMessagesCheckbox->setState(true); + myCenterCheckbox->setState(false); + myFastSCBiosCheckbox->setState(false); + break; + } - myTVMode->setSelected("0", "0"); + case 1: // TV effects + { + myTVMode->setSelected("0", "0"); - // TV scanline intensity and interpolation - myTVScanIntense->setValue(40); - myTVScanIntenseLabel->setLabel("40"); - myTVScanInterpolate->setState(true); + // TV scanline intensity and interpolation + myTVScanIntense->setValue(40); + myTVScanIntenseLabel->setLabel("40"); + myTVScanInterpolate->setState(true); - // Make sure that mutually-exclusive items are not enabled at the same time - handleFullscreenChange(true); - handleTVModeChange(NTSCFilter::PRESET_OFF); - loadTVAdjustables(NTSCFilter::PRESET_CUSTOM); + // Make sure that mutually-exclusive items are not enabled at the same time + handleFullscreenChange(true); + handleTVModeChange(NTSCFilter::PRESET_OFF); + loadTVAdjustables(NTSCFilter::PRESET_CUSTOM); + break; + } + } + + _dirty = true; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -