mirror of https://github.com/stella-emu/stella.git
made scanlines available in non-Blargg modes
This commit is contained in:
parent
e2f5be4725
commit
db833249df
|
@ -97,7 +97,7 @@ void TIASurface::initialize(const Console& console, const VideoMode& mode)
|
|||
// so rounding is performed to eliminate it
|
||||
// This won't be 100% accurate, but non-integral scaling isn't 100%
|
||||
// accurate anyway
|
||||
mySLineSurface->setSrcSize(1, int(2 * float(mode.image.height()) /
|
||||
mySLineSurface->setSrcSize(1, 2 * int(float(mode.image.height()) /
|
||||
floor((float(mode.image.height()) / myTIA->height()) + 0.5)));
|
||||
|
||||
#if 0
|
||||
|
@ -288,7 +288,7 @@ void TIASurface::enableNTSC(bool enable)
|
|||
tia_attr.smoothing = myOSystem.settings().getBool("tia.inter");
|
||||
myTiaSurface->applyAttributes();
|
||||
|
||||
myScanlinesEnabled = enable;
|
||||
myScanlinesEnabled = myOSystem.settings().getInt("tv.scanlines") > 0;
|
||||
FBSurface::Attributes& sl_attr = mySLineSurface->attributes();
|
||||
sl_attr.smoothing = myOSystem.settings().getBool("tv.scaninter");
|
||||
sl_attr.blending = myScanlinesEnabled;
|
||||
|
|
|
@ -109,7 +109,7 @@ void StellaSettingsDialog::addVideoOptions(WidgetArray& wid, int& xpos, int& ypo
|
|||
int pwidth = font.getStringWidth("Bad adjust");
|
||||
|
||||
myTVMode = new PopUpWidget(this, font, xpos, ypos, pwidth, lineHeight,
|
||||
items, "TV mode ", lwidth, kTVModeChanged);
|
||||
items, "TV mode ", lwidth);
|
||||
wid.push_back(myTVMode);
|
||||
ypos += lineHeight + VGAP * 2;
|
||||
|
||||
|
@ -194,7 +194,6 @@ void StellaSettingsDialog::loadConfig()
|
|||
|
||||
// TV scanline intensity
|
||||
myTVScanIntense->setValue(valueToLevel(settings.getInt("tv.scanlines")));
|
||||
handleTVModeChange();
|
||||
|
||||
// TV phosphor blend
|
||||
myTVPhosLevel->setValue(valueToLevel(settings.getInt("tv.phosblend")));
|
||||
|
@ -270,8 +269,6 @@ void StellaSettingsDialog::setDefaults()
|
|||
// TV phosphor blend
|
||||
myTVPhosLevel->setValue(6); // = 45%
|
||||
|
||||
handleTVModeChange();
|
||||
|
||||
// Load the default game properties
|
||||
Properties defaultProperties;
|
||||
const string& md5 = myGameProperties.get(Cartridge_MD5);
|
||||
|
@ -296,10 +293,6 @@ void StellaSettingsDialog::handleCommand(CommandSender* sender, int cmd,
|
|||
setDefaults();
|
||||
break;
|
||||
|
||||
case kTVModeChanged:
|
||||
handleTVModeChange();
|
||||
break;
|
||||
|
||||
case kScanlinesChanged:
|
||||
if(myTVScanIntense->getValue() == 0)
|
||||
myTVScanIntense->setValueLabel("off");
|
||||
|
@ -400,16 +393,6 @@ void StellaSettingsDialog::loadControllerProperties(const Properties& props)
|
|||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void StellaSettingsDialog::handleTVModeChange()
|
||||
{
|
||||
NTSCFilter::Preset preset = NTSCFilter::Preset(myTVMode->getSelectedTag().toInt());
|
||||
bool scanenable = preset != NTSCFilter::PRESET_OFF;
|
||||
|
||||
myTVScanlines->setEnabled(scanenable);
|
||||
myTVScanIntense->setEnabled(scanenable);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int StellaSettingsDialog::levelToValue(int level)
|
||||
{
|
||||
|
|
|
@ -43,7 +43,6 @@ class StellaSettingsDialog : public Dialog
|
|||
void addGameOptions(WidgetArray& wid, int& xpos, int& ypos, const GUI::Font& font);
|
||||
|
||||
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
|
||||
void handleTVModeChange();
|
||||
|
||||
// load the properties for the controller settings
|
||||
void loadControllerProperties(const Properties& props);
|
||||
|
@ -77,7 +76,6 @@ class StellaSettingsDialog : public Dialog
|
|||
StaticTextWidget* myRightPortDetected;
|
||||
|
||||
enum {
|
||||
kTVModeChanged = 'SStv',
|
||||
kScanlinesChanged = 'SSsc',
|
||||
kPhosphorChanged = 'SSph'
|
||||
};
|
||||
|
|
|
@ -540,7 +540,6 @@ void VideoDialog::setDefaults()
|
|||
void VideoDialog::handleTVModeChange(NTSCFilter::Preset preset)
|
||||
{
|
||||
bool enable = preset == NTSCFilter::PRESET_CUSTOM;
|
||||
bool scanenable = preset != NTSCFilter::PRESET_OFF;
|
||||
|
||||
myTVSharp->setEnabled(enable);
|
||||
myTVHue->setEnabled(enable);
|
||||
|
@ -557,10 +556,6 @@ void VideoDialog::handleTVModeChange(NTSCFilter::Preset preset)
|
|||
myCloneRGB->setEnabled(enable);
|
||||
myCloneBad->setEnabled(enable);
|
||||
myCloneCustom->setEnabled(enable);
|
||||
|
||||
myTVScanLabel->setEnabled(scanenable);
|
||||
myTVScanIntense->setEnabled(scanenable);
|
||||
myTVScanInterpolate->setEnabled(scanenable);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
Loading…
Reference in New Issue