libtuxtxt: Transfer from neutrino-mp for better compatibility

Origin commit data
------------------
Branch: ni/coolstream
Commit: 5612baaff7
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-02-15 (Wed, 15 Feb 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2017-02-15 18:32:35 +01:00
parent 22d123dd40
commit aaef3934cb
5 changed files with 279 additions and 113 deletions

View File

@@ -12,6 +12,8 @@
* ported 2006 to Dreambox 7025 / 32Bit framebuffer *
* by Seddi <seddi@i-have-a-dreambox.com> *
* *
* *
* ported to Tripledragon, SPARK and AZbox 2010-2013 Stefan Seyfried *
******************************************************************************/
#define TUXTXT_CFG_STANDALONE 0 // 1:plugin only 0:use library
@@ -42,6 +44,8 @@
#include FT_CACHE_H
#include FT_CACHE_SMALL_BITMAPS_H
#include <driver/rcinput.h>
/* devices */
#if TUXTXT_CFG_STANDALONE
@@ -82,20 +86,19 @@ int tv_pip_y;
#define fontwidth_small_lcd 8
#define TV43STARTX (ex)
#define TVENDX (CFrameBuffer::getInstance()->getScreenX() + CFrameBuffer::getInstance()->getScreenWidth()) //ex
#define TVENDX (screen_x + screen_w) //ex
// #define TVENDY (StartY + 25*fontheight)
// #define TV43WIDTH (TVENDX - TV43STARTX)
// #define TV43HEIGHT (TV43WIDTH *9/16)
// #define TV43STARTY (TVENDY - TV43HEIGHT)
//#define TV169FULLSTARTX (sx+ 8*40) //(sx +(ex +1 - sx)/2)
#define TV169FULLSTARTX (CFrameBuffer::getInstance()->getScreenX() + CFrameBuffer::getInstance()->getScreenWidth()/2)
#define TV169FULLSTARTX (screen_x + screen_w / 2)
#define TV169FULLSTARTY sy
//#define TV169FULLWIDTH (ex - sx)/2
#define TV169FULLWIDTH (CFrameBuffer::getInstance()->getScreenWidth()/2)
#define TV169FULLWIDTH (screen_w / 2)
#define TV169FULLHEIGHT (ey - sy)
#define TOPMENUSTARTX TV43STARTX+2
#define TOPMENUSTARTX (TV43STARTX+2)
//#define TOPMENUENDX TVENDX
#define TOPMENUSTARTY StartY
#define TOPMENUENDY TV43STARTY
@@ -105,7 +108,7 @@ int tv_pip_y;
#define TOPMENUINDENTGRP 1
#define TOPMENUINDENTDEF 2
#define TOPMENUSPC 0
#define TOPMENUCHARS (TOPMENUINDENTDEF+12+TOPMENUSPC+4)
#define TOPMENUCHARS (TOPMENUINDENTDEF+12+TOPMENUSPC+3)
#define FLOFSIZE 4
@@ -143,6 +146,7 @@ int tv_pip_y;
#define hold_mosaic 0x1E
#define release_mosaic 0x1F
#if 0
/* rc codes */
#define RC_0 0x00
#define RC_1 0x01
@@ -171,6 +175,48 @@ int tv_pip_y;
#define RC_DBOX 0x18
#define RC_TEXT 0x19
#define RC_HOME 0x1F
#else
#define RC_0 CRCInput::RC_0
#define RC_1 CRCInput::RC_1
#define RC_2 CRCInput::RC_2
#define RC_3 CRCInput::RC_3
#define RC_4 CRCInput::RC_4
#define RC_5 CRCInput::RC_5
#define RC_6 CRCInput::RC_6
#define RC_7 CRCInput::RC_7
#define RC_8 CRCInput::RC_8
#define RC_9 CRCInput::RC_9
#define RC_RIGHT CRCInput::RC_right
#define RC_LEFT CRCInput::RC_left
#define RC_UP CRCInput::RC_up
#define RC_DOWN CRCInput::RC_down
#define RC_OK CRCInput::RC_ok
#define RC_MUTE CRCInput::RC_spkr
#define RC_STANDBY CRCInput::RC_standby
#define RC_GREEN CRCInput::RC_green
#define RC_YELLOW CRCInput::RC_yellow
#define RC_RED CRCInput::RC_red
#define RC_BLUE CRCInput::RC_blue
#define RC_PLUS CRCInput::RC_plus
#define RC_MINUS CRCInput::RC_minus
#define RC_HELP CRCInput::RC_help
#define RC_INFO CRCInput::RC_info
#define RC_DBOX CRCInput::RC_setup
#define RC_HOME CRCInput::RC_home
#define RC_TTTV CRCInput::RC_tttv
#define RC_TTZOOM CRCInput::RC_ttzoom
#define RC_TTREVEAL CRCInput::RC_ttreveal
#if HAVE_TRIPLEDRAGON
/* td has more keys so use ttx key for switching split mode... */
#define RC_SPLIT CRCInput::RC_text
/* rc_text is now unused */
#define RC_TEXT (CRCInput::RC_MaxRC + 1)
#else
/* ...while other receivers use the vol- key for that, so rc_split is unused */
#define RC_SPLIT (CRCInput::RC_MaxRC + 1)
#define RC_TEXT CRCInput::RC_text
#endif
#endif
typedef enum /* object type */
{
@@ -202,6 +248,7 @@ const char *ObjectType[] =
/* framebuffer stuff */
static unsigned char *lfb = 0;
static unsigned char *lbb = 0;
struct fb_var_screeninfo var_screeninfo;
struct fb_fix_screeninfo fix_screeninfo;
@@ -545,7 +592,7 @@ char versioninfo[16];
int hotlist[10];
int maxhotlist;
int pig, rc, fb, lcd;
int pig, fb, lcd;
int sx, ex, sy, ey;
int PosX, PosY, StartX, StartY;
int lastpage;
@@ -577,7 +624,7 @@ int subtitledelay, delaystarted;
FILE *conf;
unsigned short RCCode;
neutrino_msg_t RCCode;
struct _pid_table
{
@@ -702,11 +749,11 @@ const char configmenu[][Menu_Height*(Menu_Width+1)] =
"<EFBFBD> Bildschirmformat <20><>"
"<EFBFBD>3 Standard-Modus 16:9 <20><>"
"<EFBFBD> <20><>"
"<EFBFBD>5 Helligkeit <20><>"
"<EFBFBD>4 Helligkeit <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>6 Transparenz <20><>"
"<EFBFBD>5 Transparenz <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>7 nationaler Zeichensatz <20><>"
"<EFBFBD>6 nationaler Zeichensatz <20><>"
"<EFBFBD>automatische Erkennung <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD><EFBFBD> Sprache/Language deutsch <20><><EFBFBD>"
@@ -729,11 +776,11 @@ const char configmenu[][Menu_Height*(Menu_Width+1)] =
"<EFBFBD> Screen format <20><>"
"<EFBFBD>3 Standard mode 16:9 <20><>"
"<EFBFBD> <20><>"
"<EFBFBD>5 Brightness <20><>"
"<EFBFBD>4 Brightness <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>6 Transparency <20><>"
"<EFBFBD>5 Transparency <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>7 national characterset <20><>"
"<EFBFBD>6 national characterset <20><>"
"<EFBFBD> automatic recognition <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD><EFBFBD> Sprache/language english <20><><EFBFBD>"
@@ -756,11 +803,11 @@ const char configmenu[][Menu_Height*(Menu_Width+1)] =
"<EFBFBD> Format de l'#cran <20><>"
"<EFBFBD>3 Mode standard 16:9 <20><>"
"<EFBFBD> <20><>"
"<EFBFBD>5 Clarte <20><>"
"<EFBFBD>4 Clarte <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>6 Transparence <20><>"
"<EFBFBD>5 Transparence <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>7 police nationale <20><>"
"<EFBFBD>6 police nationale <20><>"
"<EFBFBD>reconn. automatique <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD><EFBFBD> Sprache/language francais<69><73><EFBFBD>"
@@ -783,11 +830,11 @@ const char configmenu[][Menu_Height*(Menu_Width+1)] =
"<EFBFBD> Beeldschermformaat <20><>"
"<EFBFBD>3 Standaardmode 16:9 <20><>"
"<EFBFBD> <20><>"
"<EFBFBD>5 Helderheid <20><>"
"<EFBFBD>4 Helderheid <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>6 Transparantie <20><>"
"<EFBFBD>5 Transparantie <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>7 nationale tekenset <20><>"
"<EFBFBD>6 nationale tekenset <20><>"
"<EFBFBD>automatische herkenning <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD><EFBFBD> Sprache/Language nederl. <20><><EFBFBD>"
@@ -810,11 +857,11 @@ const char configmenu[][Menu_Height*(Menu_Width+1)] =
"<EFBFBD> Loqv^ oh|mgr <20><>"
"<EFBFBD>3 Tq|por pq|tupor 16:9 <20><>"
"<EFBFBD> <20><>"
"<EFBFBD>5 Kalpq|tgta <20><>"
"<EFBFBD>4 Kalpq|tgta <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>6 Diav\\meia <20><>"
"<EFBFBD>5 Diav\\meia <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>7 Ehmij^ tuposeiq\\ <20><>"
"<EFBFBD>6 Ehmij^ tuposeiq\\ <20><>"
"<EFBFBD>aut|latg amacm~qisg <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD><EFBFBD> Ck~ssa/Language ekkgmij\\ <20><><EFBFBD>"
@@ -837,11 +884,11 @@ const char configmenu[][Menu_Height*(Menu_Width+1)] =
"<EFBFBD> Formato schermo <20><>"
"<EFBFBD>3 Modo standard 16:9 <20><>"
"<EFBFBD> <20><>"
"<EFBFBD>5 Luminosit{ <20><>"
"<EFBFBD>4 Luminosit{ <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>6 Trasparenza <20><>"
"<EFBFBD>5 Trasparenza <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>7 nazionalita'caratteri <20><>"
"<EFBFBD>6 nazionalita'caratteri <20><>"
"<EFBFBD> riconoscimento automatico <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD><EFBFBD> Lingua/Language Italiana <20><><EFBFBD>"
@@ -864,11 +911,11 @@ const char configmenu[][Menu_Height*(Menu_Width+1)] =
"<EFBFBD> Format obrazu <20><>"
"<EFBFBD>3 Tryb standard 16:9 <20><>"
"<EFBFBD> <20><>"
"<EFBFBD>5 Jasno|^ <20><>"
"<EFBFBD>4 Jasno|^ <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>6 Prze~roczysto|^ <20><>"
"<EFBFBD>5 Prze~roczysto|^ <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>7 Znaki charakterystyczne <20><>"
"<EFBFBD>6 Znaki charakterystyczne <20><>"
"<EFBFBD> automatyczne rozpozn. <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD><EFBFBD> J`zyk/Language polski <20><><EFBFBD>"
@@ -891,11 +938,11 @@ const char configmenu[][Menu_Height*(Menu_Width+1)] =
"<EFBFBD> TV- format <20><>"
"<EFBFBD>3 Standard l{ge 16:9 <20><>"
"<EFBFBD> <20><>"
"<EFBFBD>5 Ljusstyrka <20><>"
"<EFBFBD>4 Ljusstyrka <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>6 Genomskinlighet <20><>"
"<EFBFBD>5 Genomskinlighet <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>7nationell teckenupps{ttning<6E><67>"
"<EFBFBD>6nationell teckenupps{ttning<6E><67>"
"<EFBFBD> automatisk igenk{nning <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD><EFBFBD> Sprache/language svenska <20><><EFBFBD>"
@@ -918,11 +965,11 @@ const char configmenu[][Menu_Height*(Menu_Width+1)] =
"<EFBFBD> N{ytt|tila <20><>"
"<EFBFBD>3 Vakiotila 16:9 <20><>"
"<EFBFBD> <20><>"
"<EFBFBD>5 Kirkkaus <20><>"
"<EFBFBD>4 Kirkkaus <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>6 L{pin{kyvyys <20><>"
"<EFBFBD>5 L{pin{kyvyys <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>7 kansallinen merkist| <20><>"
"<EFBFBD>6 kansallinen merkist| <20><>"
"<EFBFBD> automaattinen tunnistus <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD><EFBFBD> Kieli suomi <20><><EFBFBD>"
@@ -945,11 +992,11 @@ const char configmenu[][Menu_Height*(Menu_Width+1)] =
"<EFBFBD> formato ecran <20><>"
"<EFBFBD>3 Standard mode 16:9 <20><>"
"<EFBFBD> <20><>"
"<EFBFBD>5 Brilho <20><>"
"<EFBFBD>4 Brilho <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>6 Transparencia <20><>"
"<EFBFBD>5 Transparencia <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>7 Caracteres nacionaist <20><>"
"<EFBFBD>6 Caracteres nacionaist <20><>"
"<EFBFBD>reconhecimento utomatico <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD><EFBFBD> Lingua Portuguesa <20><><EFBFBD>"
@@ -972,11 +1019,11 @@ const char configmenu[][Menu_Height*(Menu_Width+1)] =
"<EFBFBD> Format kartinki <20><>"
"<EFBFBD>3 Stand. revim 16:9 <20><>"
"<EFBFBD> <20><>"
"<EFBFBD>5 Qrkostx <20><>"
"<EFBFBD>4 Qrkostx <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>6 Prozra~nostx <20><>"
"<EFBFBD>5 Prozra~nostx <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD>7 Ispolxzuem&j alfawit <20><>"
"<EFBFBD>6 Ispolxzuem&j alfawit <20><>"
"<EFBFBD> awtoopredelenie <20><>"
"<EFBFBD><EFBFBD> <20><><EFBFBD>"
"<EFBFBD><EFBFBD> Qz&k: Russkij <20><><EFBFBD>"