Ticket #2586: teletext.diff

File teletext.diff, 3.5 KB (added by barnasc, 18 years ago)
  • libs/libmythtv/osdtypeteletext.cpp

     
    11/* =============================================================
    22 * File  : osdtypeteletext.cpp
    33 * Author: Frank Muenchow <beebof@gmx.de>
    4  *         Martin Barnasconi
     4 *         Martin Barnasconi <martin@barnasconi.net>
    55 * Date  : 2005-10-25
    66 *
    77 * This program is free software; you can redistribute it
     
    215215        return;
    216216
    217217    int currentpage = m_magazines[magazine - 1].current_page;
     218
    218219    if (!currentpage)
    219220        return;
    220221
     
    248249            {
    249250                case VBI_IVTV:
    250251                    b1 = hamm8(buf, &err);
    251                     b2 = hamm8(buf + 37, & err);
    252                     if (err & 0xF00)
     252                    b2 = hamm8(buf + 37, &err);
     253                    if (err & 0xF000)
    253254                        return;
    254255                     break;
    255256                case VBI_DVB:
     
    512513                m_pageinput[2] = ' ';
    513514            }
    514515
     516            PageUpdated(m_curpage, m_cursubpage);
    515517            break;
    516518
    517519        case TTKey::kNextPage:
    518520        {
    519521            TeletextPage *ttpage = FindPage(m_curpage, 1);
     522
    520523            if (ttpage)
    521524                newPage = ttpage->pagenum;
     525
    522526            newSubPage = -1;
    523527            m_curpage_showheader = true;
    524528            break;
     
    527531        case TTKey::kPrevPage:
    528532        {
    529533            TeletextPage *ttpage = FindPage(m_curpage, -1);
     534
    530535            if (ttpage)
    531536                newPage = ttpage->pagenum;
     537
    532538            newSubPage = -1;
    533539            m_curpage_showheader = true;
    534540            break;
     
    537543        case TTKey::kNextSubPage:
    538544        {
    539545            TeletextSubPage *ttpage = FindSubPage(m_curpage, m_cursubpage, 1);
     546
    540547            if (ttpage)
    541548                newSubPage = ttpage->subpagenum;
     549
    542550            m_curpage_showheader = true;
    543551            break;
    544552        }
     
    546554        case TTKey::kPrevSubPage:
    547555        {
    548556            TeletextSubPage *ttpage = FindSubPage(m_curpage, m_cursubpage, -1);
     557
    549558            if (ttpage)
    550559                newSubPage = ttpage->subpagenum;
     560
    551561            m_curpage_showheader = true;
    552562            break;
    553563        }
     
    887897
    888898    char last_ch = ' ';
    889899    char ch;
     900    char floflinkcnt;
    890901
    891902    uint fgcolor = TTColor::WHITE;
    892903    uint bgcolor = TTColor::BLACK;
    893904    uint newfgcolor = TTColor::WHITE;
    894905    uint newbgcolor = TTColor::BLACK;
    895906
     907    const TeletextSubPage *ttpage = FindSubPage(m_curpage, m_cursubpage);
     908
    896909    if (m_curpage_issubtitle || m_transparent)
    897910    {
    898911        bgcolor    = TTColor::TRANSPARENT;
     
    911924    hold = false;
    912925    endbox = false;
    913926    startbox = false;
     927    floflinkcnt = 0;
    914928
    915929    if (row == 1)
    916930    {
     
    942956                fgcolor = ch & 7;
    943957                mosaic = false;
    944958                conceal = false;
     959
     960                if (row == 25) {
     961                   floflinkcnt++; //menu item detected;
     962                   }
     963
    945964                goto ctrl;
    946965            case 0x08: // flash
    947966                // XXX
     
    10081027                break;
    10091028        }
    10101029
     1030        if (floflinkcnt) {
     1031          if (ttpage->floflink[floflinkcnt-1] == 0)
     1032             fgcolor = TTColor::BLACK;  //hide FLOF menu characters if not available
     1033        }
     1034
    10111035        newfgcolor = fgcolor;
    10121036        newbgcolor = bgcolor;
    10131037