From 908112ce2b16b1b2f856a6f6b4b9db4d8fbd5d55 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 28 Jan 2015 15:36:44 +0100 Subject: WIP: nonlinear stretch 16:9 setting for 4:3 video display --- addons/resource.language.en_gb/resources/strings.po | 5 +++++ system/settings/settings.xml | 1 + xbmc/cores/VideoRenderers/BaseRenderer.cpp | 6 +++++- xbmc/settings/VideoSettings.h | 3 ++- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index ff32bfd77e..3a73ad8896 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -2779,6 +2779,11 @@ msgctxt "#643" msgid "Avoid clipping on ReplayGained files" msgstr "" +#: system/settings/settings.xml +msgctxt "#644" +msgid "Stretch 16:9 - Nonlinear" +msgstr "" + #empty string with id 644 msgctxt "#645" diff --git a/system/settings/settings.xml b/system/settings/settings.xml index 8f69bcbef0..17c8a27914 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -587,6 +587,7 @@ + diff --git a/xbmc/cores/VideoRenderers/BaseRenderer.cpp b/xbmc/cores/VideoRenderers/BaseRenderer.cpp index bfafab743e..6979fa381e 100644 --- a/xbmc/cores/VideoRenderers/BaseRenderer.cpp +++ b/xbmc/cores/VideoRenderers/BaseRenderer.cpp @@ -688,7 +688,8 @@ void CBaseRenderer::SetViewMode(int viewMode) CDisplaySettings::Get().SetNonLinearStretched(true); } else if ( CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode == ViewModeStretch16x9 || - (is43 && CSettings::Get().GetInt("videoplayer.stretch43") == ViewModeStretch16x9)) + (is43 && (CSettings::Get().GetInt("videoplayer.stretch43") == ViewModeStretch16x9 || + CSettings::Get().GetInt("videoplayer.stretch43") == ViewModeStretch16x9Nonlin))) { // stretch image to 16:9 ratio CDisplaySettings::Get().SetZoomAmount(1.0); if (res == RES_PAL_4x3 || res == RES_PAL60_4x3 || res == RES_NTSC_4x3 || res == RES_HDTV_480p_4x3) @@ -701,6 +702,9 @@ void CBaseRenderer::SetViewMode(int viewMode) // incorrect behaviour, but it's what the users want, so... CDisplaySettings::Get().SetPixelRatio((screenWidth / screenHeight) * info.fPixelRatio / sourceFrameRatio); } + if (is43) + CDisplaySettings::Get().SetNonLinearStretched(CSettings::Get().GetInt("videoplayer.stretch43") == ViewModeStretch16x9Nonlin); + } else if (CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode == ViewModeOriginal) { // zoom image so that the height is the original size diff --git a/xbmc/settings/VideoSettings.h b/xbmc/settings/VideoSettings.h index 66c3504de8..03050586b0 100644 --- a/xbmc/settings/VideoSettings.h +++ b/xbmc/settings/VideoSettings.h @@ -111,7 +111,8 @@ typedef enum { ViewModeWideZoom, ViewModeStretch16x9, ViewModeOriginal, - ViewModeCustom + ViewModeCustom, + ViewModeStretch16x9Nonlin } ViewMode; class CVideoSettings -- cgit v1.2.3