tuxtxt: fix compiler warnings; simplify ifdef's

Origin commit data
------------------
Commit: d90d34e5d2
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-11-03 (Fri, 03 Nov 2017)

Origin message was:
------------------
- tuxtxt: fix compiler warnings; simplify ifdef's
This commit is contained in:
vanhofen
2017-11-03 23:05:59 +01:00
parent dd5b547ed7
commit aadd82eb82

View File

@@ -29,7 +29,7 @@
#define KEY_TTZOOM KEY_FN_2 #define KEY_TTZOOM KEY_FN_2
#define KEY_REVEAL KEY_FN_D #define KEY_REVEAL KEY_FN_D
#ifdef HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE #if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE
#define MARK_FB(a, b, c, d) if (p == lfb) CFrameBuffer::getInstance()->mark(a, b, (a) + (c), (b) + (d)) #define MARK_FB(a, b, c, d) if (p == lfb) CFrameBuffer::getInstance()->mark(a, b, (a) + (c), (b) + (d))
#else #else
#define MARK_FB(a, b, c, d) #define MARK_FB(a, b, c, d)
@@ -5595,7 +5595,7 @@ void CopyBB2FB()
{ {
fb_pixel_t *src, *dst, *topsrc; fb_pixel_t *src, *dst, *topsrc;
int fillcolor, i, screenwidth, swtmp; int fillcolor, i, screenwidth, swtmp;
#if defined(HAVE_SPARK_HARDWARE) || defined(HAVE_COOL_HARDWARE) || defined(HAVE_DUCKBOX_HARDWARE) #if HAVE_SPARK_HARDWARE || HAVE_COOL_HARDWARE || HAVE_DUCKBOX_HARDWARE
CFrameBuffer *f = CFrameBuffer::getInstance(); CFrameBuffer *f = CFrameBuffer::getInstance();
#endif #endif
@@ -5606,9 +5606,9 @@ void CopyBB2FB()
/* copy backbuffer to framebuffer */ /* copy backbuffer to framebuffer */
if (!zoommode) if (!zoommode)
{ {
#ifdef HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE #if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE
f->blit2FB(lbb, var_screeninfo.xres, var_screeninfo.yres, 0, 0, 0, 0, true); f->blit2FB(lbb, var_screeninfo.xres, var_screeninfo.yres, 0, 0, 0, 0, true);
#elif defined(HAVE_COOL_HARDWARE) #elif HAVE_COOL_HARDWARE
f->fbCopyArea(var_screeninfo.xres, var_screeninfo.yres, 0, 0, 0, var_screeninfo.yres); f->fbCopyArea(var_screeninfo.xres, var_screeninfo.yres, 0, 0, 0, var_screeninfo.yres);
#else #else
if ((uint32_t)stride > var_screeninfo.xres) { if ((uint32_t)stride > var_screeninfo.xres) {
@@ -5660,7 +5660,7 @@ void CopyBB2FB()
if (screenmode == 1) if (screenmode == 1)
{ {
screenwidth = ( TV43STARTX ); screenwidth = ( TV43STARTX );
#if defined(HAVE_SPARK_HARDWARE) || defined(HAVE_DUCKBOX_HARDWARE) #if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE
int cx = var_screeninfo.xres - TV43STARTX; /* x start */ int cx = var_screeninfo.xres - TV43STARTX; /* x start */
int cw = TV43STARTX; /* width */ int cw = TV43STARTX; /* width */
int cy = StartY; int cy = StartY;
@@ -5705,7 +5705,7 @@ void CopyBB2FB()
for (swtmp=0; swtmp<= screenwidth;swtmp++) for (swtmp=0; swtmp<= screenwidth;swtmp++)
*(dst + stride * (fontheight + i) + swtmp) = bgra[fillcolor]; *(dst + stride * (fontheight + i) + swtmp) = bgra[fillcolor];
} }
#ifdef HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE #if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE
f->mark(0, 0, var_screeninfo.xres, var_screeninfo.yres); f->mark(0, 0, var_screeninfo.xres, var_screeninfo.yres);
f->blit(); f->blit();
#endif #endif