mirror of https://github.com/stella-emu/stella.git
fixed #841 (setting of phosphor properties)
This commit is contained in:
parent
6b894c803a
commit
0f20464445
|
@ -313,6 +313,27 @@ FBInitStatus FrameBuffer::createDisplay(const string& title, BufferType type,
|
||||||
// Initialize video subsystem
|
// Initialize video subsystem
|
||||||
string pre_about = myBackend->about();
|
string pre_about = myBackend->about();
|
||||||
FBInitStatus status = applyVideoMode();
|
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)
|
if(status != FBInitStatus::Success)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
|
|
|
@ -101,22 +101,6 @@ void TIASurface::initialize(const Console& console,
|
||||||
|
|
||||||
myPaletteHandler->setPalette();
|
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();
|
createScanlineSurface();
|
||||||
setNTSC(NTSCFilter::Preset(myOSystem.settings().getInt("tv.filter")), false);
|
setNTSC(NTSCFilter::Preset(myOSystem.settings().getInt("tv.filter")), false);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue