From 2a858c628a98bc70184a0ce62c75cdaebac7c850 Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Wed, 22 Mar 2017 07:27:12 +0100 Subject: [PATCH] Fix videosystem auto mode / osd mode switch in movie player --- src/gui/movieplayer.cpp | 20 ++++++++++++++++++++ src/gui/movieplayer.h | 2 ++ 2 files changed, 22 insertions(+) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 46e222231..9f1eb5862 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -147,6 +148,8 @@ void CMoviePlayerGui::Init(void) { playing = false; stopped = true; + currentVideoSystem = -1; + currentOsdResolution = 0; frameBuffer = CFrameBuffer::getInstance(); @@ -223,6 +226,12 @@ void CMoviePlayerGui::cutNeutrino() if (playing) return; +#ifdef ENABLE_CHANGE_OSD_RESOLUTION + COsdHelpers *coh = COsdHelpers::getInstance(); + currentVideoSystem = coh->getVideoSystem(); + currentOsdResolution = coh->getOsdResolution(); +#endif + playing = true; /* set g_InfoViewer update timer to 1 sec, should be reset to default from restoreNeutrino->set neutrino mode */ if (!isWebTV) @@ -247,6 +256,17 @@ void CMoviePlayerGui::restoreNeutrino() if (!playing) return; +#ifdef ENABLE_CHANGE_OSD_RESOLUTION + if ((currentVideoSystem > -1) && (g_settings.video_Mode == VIDEO_STD_AUTO)) { + COsdHelpers *coh = COsdHelpers::getInstance(); + if (currentVideoSystem != coh->getVideoSystem()) { + coh->setVideoSystem(currentVideoSystem, false); + coh->changeOsdResolution(currentOsdResolution, false, true); + } + currentVideoSystem = -1; + } +#endif + playing = false; if (isUPNP) diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index 1e15997d7..0b6cd507d 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -118,6 +118,8 @@ class CMoviePlayerGui : public CMenuTarget int startposition; int position; int duration; + int currentVideoSystem; + uint32_t currentOsdResolution; unsigned short numpida; unsigned short vpid;