Merge pull request #4575 from koying/fixdroidcolor
authorjmarshallnz <jcmarsha@gmail.com>
Fri, 18 Apr 2014 20:34:37 +0000 (08:34 +1200)
committerJonathan Marshall <jmarshall@xbmc.org>
Fri, 25 Apr 2014 21:12:23 +0000 (09:12 +1200)
FIX: [droid] missing color in labels

xbmc/guilib/GUITextLayout.cpp

index ade799d..9968289 100644 (file)
@@ -412,7 +412,9 @@ void CGUITextLayout::ParseText(const CStdStringW &text, uint32_t defaultStyle, c
       size_t finish = text.find(L']', pos + 5);
       if (on && finish != std::string::npos && text.find(L"[/COLOR]",finish) != std::string::npos)
       {
-        color_t color = g_colorManager.GetColor(text.substr(pos + 5, finish - pos - 5));
+        std::string t;
+        g_charsetConverter.wToUTF8(text.substr(pos + 5, finish - pos - 5), t);
+        color_t color = g_colorManager.GetColor(t);
         vecColors::const_iterator it = std::find(colors.begin(), colors.end(), color);
         if (it == colors.end())
         { // create new color