fixed #841 (setting of phosphor properties)

This commit is contained in:
Thomas Jentzsch 2021-11-17 19:43:50 +01:00
parent e1035b74fc
commit de81f7fd67
2 changed files with 21 additions and 16 deletions

View File

@ -313,6 +313,27 @@ FBInitStatus FrameBuffer::createDisplay(const string& title, BufferType type,
// Initialize video subsystem
string pre_about = myBackend->about();
FBInitStatus status = applyVideoMode();
// Only set phosphor once when ROM is started
if(myOSystem.eventHandler().inTIAMode())
{
// Phosphor mode can be enabled either globally or per-ROM
int p_blend = 0;
bool enable = false;
if(myOSystem.settings().getString("tv.phosphor") == "always")
{
p_blend = myOSystem.settings().getInt("tv.phosblend");
enable = true;
}
else
{
p_blend = BSPF::stringToInt(myOSystem.console().properties().get(PropType::Display_PPBlend));
enable = myOSystem.console().properties().get(PropType::Display_Phosphor) == "YES";
}
myTIASurface->enablePhosphor(enable, p_blend);
}
if(status != FBInitStatus::Success)
return status;

View File

@ -101,22 +101,6 @@ void TIASurface::initialize(const Console& console,
myPaletteHandler->setPalette();
// Phosphor mode can be enabled either globally or per-ROM
int p_blend = 0;
bool enable = false;
if(myOSystem.settings().getString("tv.phosphor") == "always")
{
p_blend = myOSystem.settings().getInt("tv.phosblend");
enable = true;
}
else
{
p_blend = BSPF::stringToInt(console.properties().get(PropType::Display_PPBlend));
enable = console.properties().get(PropType::Display_Phosphor) == "YES";
}
enablePhosphor(enable, p_blend);
createScanlineSurface();
setNTSC(NTSCFilter::Preset(myOSystem.settings().getInt("tv.filter")), false);