From 2145dafca0892cf32c387dc5c6141a4f518493e2 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Sat, 31 Aug 2013 22:27:44 +0300 Subject: [PATCH] xbmc: add xbmc PR3166 see https://github.com/xbmc/xbmc/pull/3166 --- .../patches/xbmc-990.25-BP-xbmc-PR3166.patch | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 packages/mediacenter/xbmc/patches/xbmc-990.25-BP-xbmc-PR3166.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.25-BP-xbmc-PR3166.patch b/packages/mediacenter/xbmc/patches/xbmc-990.25-BP-xbmc-PR3166.patch new file mode 100644 index 0000000000..86998e3dad --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-990.25-BP-xbmc-PR3166.patch @@ -0,0 +1,69 @@ +diff --git a/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitlesLibass.cpp b/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitlesLibass.cpp +index da7a06c..86a328e 100644 +--- a/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitlesLibass.cpp ++++ b/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitlesLibass.cpp +@@ -20,6 +20,7 @@ + + #include "DVDSubtitlesLibass.h" + #include "DVDClock.h" ++#include "filesystem/File.h" + #include "filesystem/SpecialProtocol.h" + #include "settings/GUISettings.h" + #include "utils/log.h" +@@ -76,8 +77,13 @@ CDVDSubtitlesLibass::CDVDSubtitlesLibass() + return; + + //Setting default font to the Arial in \media\fonts (used if FontConfig fails) +- strPath = "special://xbmc/media/Fonts/"; ++ strPath = "special://home/media/Fonts/"; + strPath += g_guiSettings.GetString("subtitles.font"); ++ if (!XFILE::CFile::Exists(strPath)) ++ { ++ strPath = "special://xbmc/media/Fonts/"; ++ strPath += g_guiSettings.GetString("subtitles.font"); ++ } + int fc = !g_guiSettings.GetBool("subtitles.overrideassfonts"); + + m_dll.ass_set_margins(m_renderer, 0, 0, 0, 0); +diff --git a/xbmc/music/karaoke/karaokelyricstext.cpp b/xbmc/music/karaoke/karaokelyricstext.cpp +index a73881c..fa9c49f 100644 +--- a/xbmc/music/karaoke/karaokelyricstext.cpp ++++ b/xbmc/music/karaoke/karaokelyricstext.cpp +@@ -139,7 +139,9 @@ bool CKaraokeLyricsText::InitGraphics() + if ( m_lyrics.empty() ) + return false; + +- CStdString fontPath = "special://xbmc/media/Fonts/" + g_guiSettings.GetString("karaoke.font"); ++ CStdString fontPath = "special://home/media/Fonts/" + g_guiSettings.GetString("karaoke.font"); ++ if (!XFILE::CFile::Exists(fontPath)) ++ fontPath = "special://xbmc/media/Fonts/" + g_guiSettings.GetString("karaoke.font");; + m_karaokeFont = g_fontManager.LoadTTF("__karaoke__", fontPath, + m_colorLyrics, 0, g_guiSettings.GetInt("karaoke.fontheight"), FONT_STYLE_BOLD ); + CGUIFont *karaokeBorder = g_fontManager.LoadTTF("__karaokeborder__", fontPath, +diff --git a/xbmc/video/windows/GUIWindowFullScreen.cpp b/xbmc/video/windows/GUIWindowFullScreen.cpp +index 519bcfb..0583e6a 100644 +--- a/xbmc/video/windows/GUIWindowFullScreen.cpp ++++ b/xbmc/video/windows/GUIWindowFullScreen.cpp +@@ -56,6 +56,7 @@ + #include "pvr/PVRManager.h" + #include "pvr/channels/PVRChannelGroupsContainer.h" + #include "windowing/WindowingFactory.h" ++#include "filesystem/File.h" + + #include + #include +@@ -707,8 +708,13 @@ bool CGUIWindowFullScreen::OnMessage(CGUIMessage& message) + { + CSingleLock lock (m_fontLock); + +- CStdString fontPath = "special://xbmc/media/Fonts/"; ++ CStdString fontPath = "special://home/media/Fonts/"; + fontPath += g_guiSettings.GetString("subtitles.font"); ++ if (!XFILE::CFile::Exists(fontPath)) ++ { ++ fontPath = "special://xbmc/media/Fonts/"; ++ fontPath += g_guiSettings.GetString("subtitles.font"); ++ } + + // We scale based on PAL4x3 - this at least ensures all sizing is constant across resolutions. + RESOLUTION_INFO pal(720, 576, 0);