From f46d034e4e5d9a204e5f11d70e1fbd15ef10a5b5 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Thu, 21 Jun 2018 21:38:23 +0200 Subject: [PATCH] tuxtxt: fix framebuffer blitting for SPARK Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1506b35f7b52f0985df09bf0e42725ea1c6b176b Author: Stefan Seyfried Date: 2018-06-21 (Thu, 21 Jun 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- lib/libtuxtxt/tuxtxt.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libtuxtxt/tuxtxt.cpp b/lib/libtuxtxt/tuxtxt.cpp index 6302ef102..baa507d47 100644 --- a/lib/libtuxtxt/tuxtxt.cpp +++ b/lib/libtuxtxt/tuxtxt.cpp @@ -54,6 +54,7 @@ fb_pixel_t *getFBp(int &y) void FillRect(int x, int y, int w, int h, fb_pixel_t color, bool modeFullColor = false); void FillRect(int x, int y, int w, int h, fb_pixel_t color, bool modeFullColor) { + int _y = y; fb_pixel_t *p = getFBp(y); p += x + y * var_screeninfo.xres; if (w > 0) { @@ -65,6 +66,8 @@ void FillRect(int x, int y, int w, int h, fb_pixel_t color, bool modeFullColor) p += var_screeninfo.xres; } } + if (_y == y) /* not backbuffer... */ + fbp->mark(x, y, x+w, y+h); } void FillBorder(fb_pixel_t color, bool modeFullColor = false); @@ -4908,6 +4911,8 @@ void RenderChar(int Char, tstPageAttr *Attribute, int zoom, int yoffset) if (Attribute->underline) FillRect(PosX, PosY + yoffset + (fontheight-2)* factor, curfontwidth,2*factor, fgcolor); /* underline char */ + if (yoffset < (int)var_screeninfo.yres) + fbp->mark(PosX, PosY + yoffset, PosX + curfontwidth, PosY + yoffset + fontheight * factor); PosX += curfontwidth; }