Patch: dxr3plugin OSD don't turn pink
Commit Message
Luca Olivetti wrote:
>>>> @@ -449,7 +441,7 @@
>>>>
>>>> // This should be done in cSPUEncoder::cSPUEncoder
>>>>
>>>> - m_palManager.Clear();
>>>> + m_palManager.Reset();
>>>> return 0;
>>>> break;
>
>
> I'm not sure this hunk is correct, the display is cleared various times
> throughout the osd life, the palette should be freed only upon close,
> shouldn't it?
well, it doesn't harm (it was in Martin's source withot me realizing it)
but it works well even without it. I also set the palette to 16 colors
now (not that it changes much, but...).
Bye
@@ -270,6 +270,8 @@
// set active area to 0
//m_x0 = m_x1 = m_y0 = m_y1 = 0;
+ //16 Colors max.
+ m_palManager.SetBpp(4);
}
// ==================================
@@ -383,19 +385,7 @@
case OSD_Close:
// clear colors from palettemanager
-
- #if VDRVERSNUM >= 10307
- if ((col = (tColor*)m_windows[m_lastwindow].colors) != NULL)
- #else
- if ((col = (eDvbColor*)m_windows[m_lastwindow].colors) != NULL)
- #endif
- {
- /*-for (size_t i = 0; i < m_windows[m_lastwindow].NumColors; ++i)
- {
- m_palManager.RemoveColor((int)(col[i]) & 0xFFFFFF);
- }*/
- m_palManager.Reset();
- }
+ m_palManager.Reset();
// clear osd
for (size_t i = m_windows[m_lastwindow].y0; i <= m_windows[m_lastwindow].y1; ++i)
@@ -443,9 +433,6 @@
// returns 0 on success
// This should be done in cSPUEncoder::cSPUEncoder
-
- ///-m_palManager.Clear();
- m_palManager.Reset();
return 0;
break;