aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2009-07-10 11:47:35 +0200
committerghost <andreas.monzner@multimedia-labs.de>2009-07-10 11:47:35 +0200
commitdf4309aea023598d3565a588440b2dc3c5c8eaad (patch)
treeffa4a2482e101201a993cd878640d45924255a97 /lib/dvb
parent4b2052750fa32436ca7e27543996b6a904c0e43f (diff)
parente02c9fd73f0043ed1f57ec448a5a2c8765f55ae1 (diff)
downloadenigma2-df4309aea023598d3565a588440b2dc3c5c8eaad.tar.gz
enigma2-df4309aea023598d3565a588440b2dc3c5c8eaad.zip
Merge branch 'master' of git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/dvb')
-rw-r--r--lib/dvb/teletext.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/dvb/teletext.cpp b/lib/dvb/teletext.cpp
index 91faf855..40650c01 100644
--- a/lib/dvb/teletext.cpp
+++ b/lib/dvb/teletext.cpp
@@ -669,11 +669,11 @@ void eDVBTeletextParser::addSubtitleString(int color, std::string string, int so
}
// eDebug("color %d, m_subtitle_color %d", color, m_subtitle_color);
- gRGB rgbcol((color & 1) ? 255 : 128, (color & 2) ? 255 : 128, (color & 4) ? 255 : 128);
if ((color != m_subtitle_color || force_cell) && !m_subtitle_text.empty() && ((color == -2) || !string.empty()))
{
+ const gRGB pal[4] = { gRGB(64, 0, 76), gRGB(180, 40, 86), gRGB(160, 170, 105), gRGB(250, 200, 140) };
// eDebug("add text |%s|: %d != %d || %d", m_subtitle_text.c_str(), color, m_subtitle_color, force_cell);
- m_subtitle_page.m_elements.push_back(eDVBTeletextSubtitlePageElement(rgbcol, m_subtitle_text, m_current_source_line));
+ m_subtitle_page.m_elements.push_back(eDVBTeletextSubtitlePageElement(pal[m_subtitle_color & 3], m_subtitle_text, m_current_source_line));
m_current_source_line = -1;
m_subtitle_text = "";
} else if (!m_subtitle_text.empty() && m_subtitle_text[m_subtitle_text.size()-1] != ' ')
@@ -685,7 +685,8 @@ void eDVBTeletextParser::addSubtitleString(int color, std::string string, int so
if (!string.empty())
{
// eDebug("set %d as new color", color);
- m_subtitle_color = color;
+ if (color >= 0)
+ m_subtitle_color = color;
m_subtitle_text += string;
}
}