aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Kaijser <martijn@xbmc.org>2019-01-03 17:09:26 +0100
committerGitHub <noreply@github.com>2019-01-03 17:09:26 +0100
commit70269057398d226ae80313ec7d2077e99612774e (patch)
tree89ba337b37c8690127719585503c9e7b7281c584
parent86b0a998504678638bbebf09f27189e1a6298fe2 (diff)
parent3ced145e697496a86ab7ebeae29ee57f3454910c (diff)
Merge pull request #15016 from fritsch/refreshrate2
Resolution: Don't add half refreshrates by default
-rw-r--r--xbmc/windowing/Resolution.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/xbmc/windowing/Resolution.cpp b/xbmc/windowing/Resolution.cpp
index d17caf0f6a..53427f965e 100644
--- a/xbmc/windowing/Resolution.cpp
+++ b/xbmc/windowing/Resolution.cpp
@@ -88,8 +88,15 @@ void CResolutionUtils::FindResolutionFromWhitelist(float fps, int width, int hei
if (info.iScreenHeight >= curr.iScreenHeight && info.iScreenWidth >= curr.iScreenWidth &&
(info.dwFlags & D3DPRESENTFLAG_MODEMASK) == (curr.dwFlags & D3DPRESENTFLAG_MODEMASK))
{
- resString = CDisplaySettings::GetInstance().GetStringFromRes(c);
- indexList.push_back(resString);
+ // do not add half refreshrates (25, 29.97 by default) as kodi cannot cope with
+ // them on playback start. Especially interlaced content is not properly detected
+ // and this causes ugly double switching.
+ // This won't allow 25p / 30p playback on native refreshrate by default
+ if ((info.fRefreshRate > 30) || (MathUtils::FloatEquals(info.fRefreshRate, 24.0f, 0.1f)))
+ {
+ resString = CDisplaySettings::GetInstance().GetStringFromRes(c);
+ indexList.push_back(resString);
+ }
}
}
}