diff --git a/projects/imx6/patches/kodi/kodi-14-prepare-for-fractional-modes-rabeeh.patch b/projects/imx6/patches/kodi/kodi-14-prepare-for-fractional-modes-rabeeh.patch new file mode 100644 index 0000000000..af751cab72 --- /dev/null +++ b/projects/imx6/patches/kodi/kodi-14-prepare-for-fractional-modes-rabeeh.patch @@ -0,0 +1,42 @@ +From 0551526fa630c34d18ea7fcf28675ed6209220a7 Mon Sep 17 00:00:00 2001 +From: fritsch +Date: Fri, 20 Feb 2015 08:40:05 +0100 +Subject: [PATCH 1/4] IMX: Prepare for fractional modes (picked from @rabeeh) + +--- + xbmc/windowing/egl/EGLNativeTypeIMX.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/xbmc/windowing/egl/EGLNativeTypeIMX.cpp b/xbmc/windowing/egl/EGLNativeTypeIMX.cpp +index 111406c..9065f5c 100644 +--- a/xbmc/windowing/egl/EGLNativeTypeIMX.cpp ++++ b/xbmc/windowing/egl/EGLNativeTypeIMX.cpp +@@ -275,14 +275,14 @@ bool CEGLNativeTypeIMX::ModeToResolution(std::string mode, RESOLUTION_INFO *res) + StringUtils::Trim(fromMode); + + CRegExp split(true); +- split.RegComp("([0-9]+)x([0-9]+)([pi])-([0-9]+)"); ++ split.RegComp("([0-9]+)x([0-9]+)([pi])-([-+]?[0-9]*\.?[0-9]*)"); + if (split.RegFind(fromMode) < 0) + return false; + + int w = atoi(split.GetMatch(1).c_str()); + int h = atoi(split.GetMatch(2).c_str()); + std::string p = split.GetMatch(3); +- int r = atoi(split.GetMatch(4).c_str()); ++ float r = atof(split.GetMatch(4).c_str()); + + res->iWidth = w; + res->iHeight= h; +@@ -295,7 +295,7 @@ bool CEGLNativeTypeIMX::ModeToResolution(std::string mode, RESOLUTION_INFO *res) + res->bFullScreen = true; + res->iSubtitles = (int)(0.965 * res->iHeight); + res->fPixelRatio = 1.0f; +- res->strMode = StringUtils::Format("%dx%d @ %.2f%s - Full Screen", res->iScreenWidth, res->iScreenHeight, res->fRefreshRate, ++ res->strMode = StringUtils::Format("%dx%d @ %.3f%s - Full Screen", res->iScreenWidth, res->iScreenHeight, res->fRefreshRate, + res->dwFlags & D3DPRESENTFLAG_INTERLACED ? "i" : ""); + res->strId = mode; + +-- +1.9.1 +