mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
kodi: Prepare for fractional modelines
This commit is contained in:
parent
345a11c4c2
commit
81b67f1fcb
@ -0,0 +1,42 @@
|
|||||||
|
From 0551526fa630c34d18ea7fcf28675ed6209220a7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: fritsch <peter.fruehberger@gmail.com>
|
||||||
|
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
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user