libretro: fix blargg filter on startup

This commit is contained in:
trinemark 2019-04-27 21:24:07 -05:00 committed by Stephen Anthony
parent 80482aa7e5
commit 007795af8d
2 changed files with 7 additions and 4 deletions

View File

@ -41,7 +41,7 @@ StellaLIBRETRO::StellaLIBRETRO()
video_aspect_pal = 0; video_aspect_pal = 0;
video_palette = "standard"; video_palette = "standard";
video_filter = NTSCFilter::Preset::OFF; video_filter = 0;
video_ready = false; video_ready = false;
audio_samples = 0; audio_samples = 0;
@ -108,7 +108,7 @@ bool StellaLIBRETRO::create(bool logging)
//fastscbios //fastscbios
// Fast loading of Supercharger BIOS // Fast loading of Supercharger BIOS
settings.setValue("tv.filter", static_cast<int>(video_filter)); settings.setValue("tv.filter", video_filter);
settings.setValue("tv.phosphor", video_phosphor); settings.setValue("tv.phosphor", video_phosphor);
settings.setValue("tv.phosblend", video_phosphor_blend); settings.setValue("tv.phosblend", video_phosphor_blend);
@ -131,6 +131,7 @@ bool StellaLIBRETRO::create(bool logging)
if(myOSystem->createConsole(rom) != EmptyString) if(myOSystem->createConsole(rom) != EmptyString)
return false; return false;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if(video_phosphor == "never") setVideoPhosphor(1, video_phosphor_blend); if(video_phosphor == "never") setVideoPhosphor(1, video_phosphor_blend);
@ -345,7 +346,9 @@ void StellaLIBRETRO::setConsoleFormat(uInt32 mode)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void StellaLIBRETRO::setVideoFilter(uInt32 mode) void StellaLIBRETRO::setVideoFilter(uInt32 mode)
{ {
if (system_ready && mode <= 5) video_filter = mode;
if (system_ready)
{ {
myOSystem->settings().setValue("tv.filter", mode); myOSystem->settings().setValue("tv.filter", mode);
myOSystem->frameBuffer().tiaSurface().setNTSC(static_cast<NTSCFilter::Preset>(mode)); myOSystem->frameBuffer().tiaSurface().setNTSC(static_cast<NTSCFilter::Preset>(mode));

View File

@ -160,7 +160,7 @@ class StellaLIBRETRO
uInt32 video_aspect_ntsc; uInt32 video_aspect_ntsc;
uInt32 video_aspect_pal; uInt32 video_aspect_pal;
NTSCFilter::Preset video_filter; uInt32 video_filter;
string audio_mode; string audio_mode;