From 7f601cc1468fd83cfc6d371d19fabdac0610f2d3 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Wed, 4 Sep 2013 00:25:03 +0200 Subject: [PATCH] xbmc: add PR3166 Signed-off-by: Stephan Raue --- .../xbmc-990.25-BP-xbmc-PR3166.patch | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 packages/mediacenter/xbmc/patches/13.alpha-2435cf3/xbmc-990.25-BP-xbmc-PR3166.patch diff --git a/packages/mediacenter/xbmc/patches/13.alpha-2435cf3/xbmc-990.25-BP-xbmc-PR3166.patch b/packages/mediacenter/xbmc/patches/13.alpha-2435cf3/xbmc-990.25-BP-xbmc-PR3166.patch new file mode 100644 index 0000000000..801d170d4e --- /dev/null +++ b/packages/mediacenter/xbmc/patches/13.alpha-2435cf3/xbmc-990.25-BP-xbmc-PR3166.patch @@ -0,0 +1,86 @@ +From 1501e49f96f75d12ef8071f30ca3338ea18f4ff4 Mon Sep 17 00:00:00 2001 +From: "Chris \"Koying\" Browet" +Date: Sat, 31 Aug 2013 03:04:48 +0200 +Subject: [PATCH] FIX: Consistenly look for fonts in special//home, then + special://xbmc + +--- + xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitlesLibass.cpp | 10 ++++++++-- + xbmc/music/karaoke/karaokelyricstext.cpp | 4 +++- + xbmc/video/windows/GUIWindowFullScreen.cpp | 8 +++++++- + 3 files changed, 18 insertions(+), 4 deletions(-) + +diff --git a/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitlesLibass.cpp b/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitlesLibass.cpp +index 2a4efde..5d7b855 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/Settings.h" + #include "utils/log.h" +@@ -75,9 +76,14 @@ static void libass_log(int level, const char *fmt, va_list args, void *data) + if(!m_renderer) + return; + +- //Setting default font to the Arial in \media\fonts (used if FontConfig fails) +- strPath = "special://xbmc/media/Fonts/"; ++ //Setting default font to the Arial in \media\fonts (used if FontConfig fails) ++ strPath = "special://home/media/Fonts/"; + strPath += CSettings::Get().GetString("subtitles.font"); ++ if (!XFILE::CFile::Exists(strPath)) ++ { ++ strPath = "special://xbmc/media/Fonts/"; ++ strPath += CSettings::Get().GetString("subtitles.font"); ++ } + int fc = !CSettings::Get().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 f04f4c5..f43a188 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/" + CSettings::Get().GetString("karaoke.font"); ++ CStdString fontPath = "special://home/media/Fonts/" + CSettings::Get().GetString("karaoke.font"); ++ if (!XFILE::CFile::Exists(fontPath)) ++ fontPath = "special://xbmc/media/Fonts/" + CSettings::Get().GetString("karaoke.font"); + m_karaokeFont = g_fontManager.LoadTTF("__karaoke__", fontPath, + m_colorLyrics, 0, CSettings::Get().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 9c8526d..bd1e9ed 100644 +--- a/xbmc/video/windows/GUIWindowFullScreen.cpp ++++ b/xbmc/video/windows/GUIWindowFullScreen.cpp +@@ -56,6 +56,7 @@ + #include "pvr/channels/PVRChannelGroupsContainer.h" + #include "windowing/WindowingFactory.h" + #include "cores/IPlayer.h" ++#include "filesystem/File.h" + + #include + #include +@@ -401,8 +402,13 @@ bool CGUIWindowFullScreen::OnMessage(CGUIMessage& message) + { + CSingleLock lock (m_fontLock); + +- CStdString fontPath = "special://xbmc/media/Fonts/"; ++ CStdString fontPath = "special://home/media/Fonts/"; + fontPath += CSettings::Get().GetString("subtitles.font"); ++ if (!XFILE::CFile::Exists(fontPath)) ++ { ++ fontPath = "special://xbmc/media/Fonts/"; ++ fontPath += CSettings::Get().GetString("subtitles.font"); ++ } + + // We scale based on PAL4x3 - this at least ensures all sizing is constant across resolutions. + RESOLUTION_INFO pal(720, 576, 0); +-- +1.8.4 +