mirror of https://github.com/stella-emu/stella.git
Revert "Don't calculate palette before all sliders have initialized."
This reverts commit 02565719a5
.
Added clamping of the returned SliderWidget values to valid range instead
This commit is contained in:
parent
02565719a5
commit
47ad90e870
|
@ -941,49 +941,21 @@ void VideoAudioDialog::handlePaletteUpdate()
|
|||
// TIA Palette
|
||||
instance().settings().setValue("palette",
|
||||
myTIAPalette->getSelectedTag().toString());
|
||||
|
||||
// Palette adjustables
|
||||
PaletteHandler::Adjustable paletteAdj;
|
||||
|
||||
if (myPhaseShiftNtsc->getValue() < 0) return;
|
||||
paletteAdj.phaseNtsc = myPhaseShiftNtsc->getValue();
|
||||
|
||||
if (myPhaseShiftPal->getValue() < 0) return;
|
||||
paletteAdj.phasePal = myPhaseShiftPal->getValue();
|
||||
|
||||
if (myTVRedScale->getValue() < 0) return;
|
||||
paletteAdj.redScale = myTVRedScale->getValue();
|
||||
|
||||
if (myTVRedShift->getValue() < 0) return;
|
||||
paletteAdj.redShift = myTVRedShift->getValue();
|
||||
|
||||
if (myTVGreenScale->getValue() < 0) return;
|
||||
paletteAdj.greenScale = myTVGreenScale->getValue();
|
||||
|
||||
if (myTVGreenShift->getValue() < 0) return;
|
||||
paletteAdj.greenShift = myTVGreenShift->getValue();
|
||||
|
||||
if (myTVBlueScale->getValue() < 0) return;
|
||||
paletteAdj.blueScale = myTVBlueScale->getValue();
|
||||
|
||||
if (myTVBlueShift->getValue() < 0) return;
|
||||
paletteAdj.blueShift = myTVBlueShift->getValue();
|
||||
|
||||
if (myTVHue->getValue() < 0) return;
|
||||
paletteAdj.hue = myTVHue->getValue();
|
||||
|
||||
if (myTVSatur->getValue() < 0) return;
|
||||
paletteAdj.saturation = myTVSatur->getValue();
|
||||
|
||||
if (myTVContrast->getValue() < 0) return;
|
||||
paletteAdj.contrast = myTVContrast->getValue();
|
||||
|
||||
if (myTVBright->getValue() < 0) return;
|
||||
paletteAdj.brightness = myTVBright->getValue();
|
||||
|
||||
if (myTVGamma->getValue() < 0) return;
|
||||
paletteAdj.gamma = myTVGamma->getValue();
|
||||
|
||||
instance().frameBuffer().tiaSurface().paletteHandler().setAdjustables(paletteAdj);
|
||||
|
||||
if(instance().hasConsole())
|
||||
|
|
|
@ -336,7 +336,7 @@ class SliderWidget : public ButtonWidget
|
|||
~SliderWidget() override = default;
|
||||
|
||||
void setValue(int value);
|
||||
int getValue() const { return _value; }
|
||||
int getValue() const { return BSPF::clamp(_value, _valueMin, _valueMax); }
|
||||
|
||||
void setMinValue(int value);
|
||||
int getMinValue() const { return _valueMin; }
|
||||
|
|
Loading…
Reference in New Issue