Ticket #368: teletext.diff
File teletext.diff, 6.7 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/osdtypeteletext.cpp
147 147 const unsigned char* buf, 148 148 int vbimode, int lang, int flags) 149 149 { 150 if (page < 256)151 return;152 150 153 151 int magazine = MAGAZINE(page); 152 153 if (magazine < 1 || magazine > 8) 154 return; 155 154 156 int lastPage = m_magazines[magazine - 1].current_page; 155 157 int lastSubPage = m_magazines[magazine - 1].current_subpage; 156 158 … … 228 230 if (vbimode == VBI_DVB || vbimode == VBI_DVB_SUBTITLE) 229 231 { 230 232 for (int j = 0; j < 40; j++) 231 ttpage->data[row][j] = bitswap[buf[j]];233 ttpage->data[row][j] = bitswap[buf[j]]; 232 234 } 233 235 else 234 236 { … … 842 844 int dy = (int)round(m_tt_rowspace / 3)+1; 843 845 844 846 if (doubleheight != 0) 845 {846 dx *= 2;847 847 dy *= 2; 848 }849 848 850 849 if (code & 0x10) DrawRect(x, y + 2*dy, dx, dy); 851 850 if (code & 0x40) DrawRect(x + dx, y + 2*dy, dx, dy); … … 904 903 { 905 904 if (startbox) 906 905 { 907 bgcolor = bgcolor =TTColor::BLACK;906 bgcolor = TTColor::BLACK; 908 907 startbox = false; 909 908 } 910 909 … … 1002 1001 1003 1002 DrawBackground(x, row); 1004 1003 if (doubleheight != 0) 1005 1004 DrawBackground(x, row +1); 1006 1005 1007 1006 if ((mosaic) && (ch < 0x40 || ch > 0x5F)) 1008 1007 { … … 1011 1010 } 1012 1011 else 1013 1012 { 1014 if (doubleheight != 0 )1013 if (doubleheight != 0 && row < kTeletextRows) 1015 1014 DrawCharacter(x, row+1, CharConversion(ch, lang), 1016 1015 doubleheight); 1017 1016 else 1018 1017 DrawCharacter(x, row, CharConversion(ch, lang), 1019 doubleheight);1018 0); 1020 1019 } 1021 1020 } 1022 1021 } -
libs/libmythtv/tv_play.cpp
127 127 "T"); 128 128 REG_KEY("TV Playback", "TOGGLECC708", 129 129 "Toggle ATSC CC", "^"); 130 REG_KEY("TV Playback", "MENURED",131 "Menu Red", "F2");132 REG_KEY("TV Playback", "MENUGREEN",133 "Menu Green", "F3");134 REG_KEY("TV Playback", "MENUYELLOW",135 "Menu Yellow", "F4");136 REG_KEY("TV Playback", "MENUBLUE",137 "Menu Blue", "F5");138 REG_KEY("TV Playback", "MENUWHITE",139 "Menu White", "F6");140 REG_KEY("TV Playback", "REVEAL",141 "Teletext reveal hidden Text", "F12");142 130 REG_KEY("TV Playback", "DISPCC608_1", "Display CC1", ""); 143 131 REG_KEY("TV Playback", "DISPCC608_2", "Display CC2", ""); 144 132 REG_KEY("TV Playback", "DISPCC608_3", "Display CC3", ""); … … 186 174 REG_KEY("TV Editing", "BIGJUMPFWD", "Jump forward 10x the normal amount", 187 175 ">,."); 188 176 REG_KEY("TV Editing", "TOGGLEEDIT", "Exit out of Edit Mode", "E"); 177 /* Teletext keys */ 178 REG_KEY("TV Playback TXT", "NEXTPAGE", 179 "Next Teletext Page", "Down"); 180 REG_KEY("TV Playback TXT", "PREVPAGE", 181 "Previous Teletext Page", "Up"); 182 REG_KEY("TV Playback TXT", "NEXTSUBPAGE", 183 "Next Teletext Subpage", "Right"); 184 REG_KEY("TV Playback TXT", "PREVSUBPAGE", 185 "Previous Teletext Subpage", "Left"); 186 REG_KEY("TV Playback TXT", "TOGGLEBACKGROUND", 187 "Toggle Background", "F11"); 188 REG_KEY("TV Playback TXT", "TOGGLECC", 189 "Toggle Teletext", "T"); 190 REG_KEY("TV Playback TXT", "MENURED", 191 "Menu Red", "F2"); 192 REG_KEY("TV Playback TXT", "MENUGREEN", 193 "Menu Green", "F3"); 194 REG_KEY("TV Playback TXT", "MENUYELLOW", 195 "Menu Yellow", "F4"); 196 REG_KEY("TV Playback TXT", "MENUBLUE", 197 "Menu Blue", "F5"); 198 REG_KEY("TV Playback TXT", "MENUWHITE", 199 "Menu White", "F6"); 200 REG_KEY("TV Playback TXT", "REVEAL", 201 "Teletext reveal hidden Text", "F12"); 189 202 /* 190 203 keys already used: 191 204 … … 1808 1821 } 1809 1822 } 1810 1823 1811 if (!gContext->GetMainWindow()->TranslateKeyPress( 1812 "TV Playback", e, actions)) 1824 if (teletextmode) 1813 1825 { 1814 return; 1826 if (!gContext->GetMainWindow()->TranslateKeyPress( 1827 "TV Playback TXT", e, actions)) 1828 return; 1815 1829 } 1830 else 1831 { 1832 if (!gContext->GetMainWindow()->TranslateKeyPress( 1833 "TV Playback", e, actions)) 1834 return; 1835 } 1816 1836 1817 1837 bool handled = false; 1818 1838 … … 1886 1906 { 1887 1907 QString action = actions[i]; 1888 1908 handled = true; 1889 if (action == " UP")1909 if (action == "NEXTPAGE") 1890 1910 TeletextNavigate(-1); 1891 else if (action == " DOWN")1911 else if (action == "PREVPAGE") 1892 1912 TeletextNavigate(-2); 1893 else if (action == " RIGHT")1913 else if (action == "NEXTSUBPAGE") 1894 1914 TeletextNavigate(-3); 1895 else if (action == " LEFT")1915 else if (action == "PREVSUBPAGE") 1896 1916 TeletextNavigate(-4); 1897 else if (action == "TOGGLE ASPECT")1917 else if (action == "TOGGLEBACKGROUND") 1898 1918 TeletextNavigate(-5); 1899 1919 else if (action == "MENURED") 1900 1920 TeletextNavigate(-6); -
libs/libmythtv/ttfont.cpp
309 309 ymin = 0; 310 310 } 311 311 else 312 ioff = (rmap->rows - ymin- 1) * rmap->cols;312 ioff = (rmap->rows - ( (double_size) ? (ymin << 1) : ymin) - 1) * rmap->cols; 313 313 314 314 if (ymax >= rmap->rows) 315 315 ymax = rmap->rows - 1; … … 473 473 height = h; 474 474 475 475 if (x < 0) 476 477 478 479 480 476 { 477 clipx = -x; 478 width += x; 479 x = 0; 480 } 481 481 if (y < 0) 482 483 484 485 486 482 { 483 clipy = -y; 484 height += y; 485 y = 0; 486 } 487 487 if ((width <= 0) || (height <= 0)) 488 489 490 491 492 488 { 489 destroy_font_raster(rmap); 490 destroy_font_raster(rtmp); 491 return; 492 } 493 493 494 494 if (m_shadowxoff > 0 || m_shadowyoff > 0) 495 495 {