mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
libtuxtxt: cleanup unused lcd code
Origin commit data
------------------
Branch: ni/coolstream
Commit: 6f01e9c62a
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-01-25 (Thu, 25 Jan 2018)
Origin message was:
------------------
- libtuxtxt: cleanup unused lcd code
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -2498,9 +2498,6 @@ skip_pid:
|
||||
|
||||
getpidsdone = 1;
|
||||
|
||||
RenderCharLCD(pids_found/10, 7, 44);
|
||||
RenderCharLCD(pids_found%10, 19, 44);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -4852,42 +4849,6 @@ void RenderCharBB(int Char, tstPageAttr *Attribute)
|
||||
RenderChar(Char, Attribute, 0, var_screeninfo.yres-var_screeninfo.yoffset);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* RenderCharLCD *
|
||||
******************************************************************************/
|
||||
|
||||
void RenderCharLCD(int /*Digit*/, int /*XPos*/, int /*YPos*/)
|
||||
{
|
||||
#if 0
|
||||
int x, y;
|
||||
|
||||
/* render digit to lcd backbuffer */
|
||||
for (y = 0; y < 15; y++)
|
||||
{
|
||||
for (x = 0; x < 10; x++)
|
||||
{
|
||||
if (lcd_digits[Digit*15*10 + x + y*10])
|
||||
lcd_backbuffer[XPos + x + ((YPos+y)/8)*120] |= 1 << ((YPos+y)%8);
|
||||
else
|
||||
lcd_backbuffer[XPos + x + ((YPos+y)/8)*120] &= ~(1 << ((YPos+y)%8));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
void RenderCharLCDsmall(int Char, int XPos, int YPos)
|
||||
{
|
||||
int old_width = fontwidth;
|
||||
int old_height = fontheight;
|
||||
setfontwidth(fontwidth_small_lcd);
|
||||
typettf.font.pix_height = fontheight = fontwidth_small_lcd;
|
||||
RenderChar(Char, 0, 0, -(YPos<<8 | XPos));
|
||||
setfontwidth(old_width);
|
||||
typettf.font.pix_height = fontheight = old_height;
|
||||
}
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* RenderMessage *
|
||||
******************************************************************************/
|
||||
@@ -5647,164 +5608,7 @@ void CopyBB2FB()
|
||||
void UpdateLCD()
|
||||
{
|
||||
#if 0
|
||||
static int init_lcd = 1, old_cached_pages = -1, old_page = -1, old_subpage = -1, old_subpage_max = -1, old_hintmode = -1;
|
||||
int x, y, subpage_max = 0, update_lcd = 0;
|
||||
|
||||
if (lcd == -1) return; // for Dreamboxes without LCD-Display (5xxx)
|
||||
/* init or update lcd */
|
||||
if (init_lcd)
|
||||
{
|
||||
init_lcd = 0;
|
||||
|
||||
for (y = 0; y < 64; y++)
|
||||
{
|
||||
int lcdbase = (y/8)*120;
|
||||
int lcdmask = 1 << (y%8);
|
||||
|
||||
for (x = 0; x < 120; )
|
||||
{
|
||||
int rommask;
|
||||
int rombyte = lcd_layout[x/8 + y*120/8];
|
||||
|
||||
for (rommask = 0x80; rommask; rommask >>= 1)
|
||||
{
|
||||
if (rombyte & rommask)
|
||||
lcd_backbuffer[x + lcdbase] |= lcdmask;
|
||||
else
|
||||
lcd_backbuffer[x + lcdbase] &= ~lcdmask;
|
||||
x++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
write(lcd, &lcd_backbuffer, sizeof(lcd_backbuffer));
|
||||
|
||||
for (y = 16; y < 56; y += 8) /* clear rectangle in backbuffer */
|
||||
for (x = 1; x < 118; x++)
|
||||
lcd_backbuffer[x + (y/8)*120] = 0;
|
||||
|
||||
for (x = 3; x <= 116; x++)
|
||||
lcd_backbuffer[x + (39/8)*120] |= 1 << (39%8);
|
||||
|
||||
for (y = 42; y <= 60; y++)
|
||||
lcd_backbuffer[35 + (y/8)*120] |= 1 << (y%8);
|
||||
|
||||
for (y = 42; y <= 60; y++)
|
||||
lcd_backbuffer[60 + (y/8)*120] |= 1 << (y%8);
|
||||
|
||||
RenderCharLCD(10, 43, 20);
|
||||
RenderCharLCD(11, 79, 20);
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
int p;
|
||||
|
||||
if (inputcounter == 2)
|
||||
p = tuxtxt_cache.page;
|
||||
else
|
||||
p = temp_page + (0xDD >> 4*(1-inputcounter)); /* partial pageinput (filled with spaces) */
|
||||
|
||||
/* page */
|
||||
if (old_page != p)
|
||||
{
|
||||
RenderCharLCD(p>>8, 7, 20);
|
||||
RenderCharLCD((p&0x0F0)>>4, 19, 20);
|
||||
RenderCharLCD(p&0x00F, 31, 20);
|
||||
|
||||
old_page = p;
|
||||
update_lcd = 1;
|
||||
}
|
||||
|
||||
/* current subpage */
|
||||
if (old_subpage != tuxtxt_cache.subpage)
|
||||
{
|
||||
if (!tuxtxt_cache.subpage)
|
||||
{
|
||||
RenderCharLCD(0, 55, 20);
|
||||
RenderCharLCD(1, 67, 20);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tuxtxt_cache.subpage >= 0xFF)
|
||||
tuxtxt_cache.subpage = 1;
|
||||
else if (tuxtxt_cache.subpage > 99)
|
||||
tuxtxt_cache.subpage = 0;
|
||||
|
||||
RenderCharLCD(tuxtxt_cache.subpage>>4, 55, 20);
|
||||
RenderCharLCD(tuxtxt_cache.subpage&0x0F, 67, 20);
|
||||
}
|
||||
|
||||
old_subpage = tuxtxt_cache.subpage;
|
||||
update_lcd = 1;
|
||||
}
|
||||
|
||||
/* max subpage */
|
||||
for (x = 0; x <= 0x79; x++)
|
||||
{
|
||||
if (tuxtxt_cache.astCachetable[tuxtxt_cache.page][x])
|
||||
subpage_max = x;
|
||||
}
|
||||
|
||||
if (old_subpage_max != subpage_max)
|
||||
{
|
||||
if (!subpage_max)
|
||||
{
|
||||
RenderCharLCD(0, 91, 20);
|
||||
RenderCharLCD(1, 103, 20);
|
||||
}
|
||||
else
|
||||
{
|
||||
RenderCharLCD(subpage_max>>4, 91, 20);
|
||||
RenderCharLCD(subpage_max&0x0F, 103, 20);
|
||||
}
|
||||
|
||||
old_subpage_max = subpage_max;
|
||||
update_lcd = 1;
|
||||
}
|
||||
|
||||
/* cachestatus */
|
||||
if (old_cached_pages != tuxtxt_cache.cached_pages)
|
||||
{
|
||||
#if 0
|
||||
int s;
|
||||
int p = tuxtxt_cache.cached_pages;
|
||||
for (s=107; s >= 107-4*fontwidth_small_lcd; s -= fontwidth_small_lcd)
|
||||
{
|
||||
int c = p % 10;
|
||||
if (p)
|
||||
RenderCharLCDsmall('0'+c, s, 44);
|
||||
else
|
||||
RenderCharLCDsmall(' ', s, 44);
|
||||
p /= 10;
|
||||
}
|
||||
#else
|
||||
RenderCharLCD(tuxtxt_cache.cached_pages/1000, 67, 44);
|
||||
RenderCharLCD(tuxtxt_cache.cached_pages%1000/100, 79, 44);
|
||||
RenderCharLCD(tuxtxt_cache.cached_pages%100/10, 91, 44);
|
||||
RenderCharLCD(tuxtxt_cache.cached_pages%10, 103, 44);
|
||||
#endif
|
||||
|
||||
old_cached_pages = tuxtxt_cache.cached_pages;
|
||||
update_lcd = 1;
|
||||
}
|
||||
|
||||
/* mode */
|
||||
if (old_hintmode != hintmode)
|
||||
{
|
||||
if (hintmode)
|
||||
RenderCharLCD(12, 43, 44);
|
||||
else
|
||||
RenderCharLCD(13, 43, 44);
|
||||
|
||||
old_hintmode = hintmode;
|
||||
update_lcd = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (update_lcd)
|
||||
write(lcd, &lcd_backbuffer, sizeof(lcd_backbuffer));
|
||||
//place for some cool vfd-stuff
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user