From 48d34b432df79951f80222ec8149c7ad5ecbebfb Mon Sep 17 00:00:00 2001 From: seife Date: Mon, 11 Apr 2011 17:17:42 +0000 Subject: [PATCH] tuxtxt: simplify FillRect() for Tripledragon git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1393 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- lib/libtuxtxt/tuxtxt.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/libtuxtxt/tuxtxt.cpp b/lib/libtuxtxt/tuxtxt.cpp index c0c800df1..d797d7138 100644 --- a/lib/libtuxtxt/tuxtxt.cpp +++ b/lib/libtuxtxt/tuxtxt.cpp @@ -36,6 +36,9 @@ void FillRect(int x, int y, int w, int h, int color) unsigned char *p = lfb + x*4 + y * fix_screeninfo.line_length; #if !HAVE_TRIPLEDRAGON unsigned int col = bgra[color][3] << 24 | bgra[color][2] << 16 | bgra[color][1] << 8 | bgra[color][0]; +#else + unsigned int col = *((unsigned int*)bgra[color]); +#endif if (w > 0) for (int count = 0; count < h; count++) { unsigned int * dest0 = (unsigned int *)p; @@ -43,18 +46,6 @@ void FillRect(int x, int y, int w, int h, int color) *(dest0++) = col; p += fix_screeninfo.line_length; } -#else - int xtmp; - if (w > 0) - for ( ; h > 0 ; h--) - { - for (xtmp=0; xtmp<=w; xtmp++) - { - memmove(p+xtmp*4,bgra[color],4); - } - p += fix_screeninfo.line_length; - } -#endif } void FillBorder(int color)