From 503501a9519029fd722ae82c67a47c28c0ac9b6b Mon Sep 17 00:00:00 2001 From: trinemark <49107242+trinemark@users.noreply.github.com> Date: Sat, 27 Apr 2019 21:52:23 -0500 Subject: [PATCH] libretro: fix blargg par --- src/libretro/StellaLIBRETRO.cxx | 40 ++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/src/libretro/StellaLIBRETRO.cxx b/src/libretro/StellaLIBRETRO.cxx index cd4152983..54f6129d1 100644 --- a/src/libretro/StellaLIBRETRO.cxx +++ b/src/libretro/StellaLIBRETRO.cxx @@ -257,19 +257,39 @@ float StellaLIBRETRO::getVideoAspectPar() if (getVideoNTSC()) { - if (!video_aspect_ntsc) - // non-interlace square pixel clock -- 1.0 pixel @ color burst -- double-width pixels - par = (6.1363635f / 3.579545454f) / 2.0; - else - par = video_aspect_ntsc / 100.0; + if (!video_aspect_ntsc) + { + if (!video_filter) + { + // non-interlace square pixel clock -- 1.0 pixel @ color burst -- double-width pixels + par = (6.1363635f / 3.579545454f) / 2.0; + } + else + { + // blargg filter + par = 1.0; + } + } + else + par = video_aspect_ntsc / 100.0; } else { - if (!video_aspect_pal) - // non-interlace square pixel clock -- 0.8 pixel @ color burst -- double-width pixels - par = (7.3750000f / (4.43361875f * 4.0f / 5.0f)) / 2.0f; - else - par = video_aspect_pal / 100.0; + if (!video_aspect_pal) + { + if (!video_filter) + { + // non-interlace square pixel clock -- 0.8 pixel @ color burst -- double-width pixels + par = (7.3750000f / (4.43361875f * 4.0f / 5.0f)) / 2.0f; + } + else + { + // blargg filter + par = 1.0; + } + } + else + par = video_aspect_pal / 100.0; } return par;