]> git.webhop.me Git - input.git/commitdiff
input: use OFFSET_MIN for better bg detection
authorGetAway <get-away@t-online.de>
Thu, 12 Oct 2017 13:13:21 +0000 (15:13 +0200)
committerJacek Jendrzej <satbaby@kawaii.com>
Thu, 12 Oct 2017 13:37:49 +0000 (15:37 +0200)
input.c
text.c

diff --git a/input.c b/input.c
index a4cd0d881a0a879d9660a1912feaa7b639eda57c..a0cf31524fc5768aed8e8a8baeb5890d1fa08efc 100644 (file)
--- a/input.c
+++ b/input.c
@@ -12,7 +12,7 @@
 
 #define NCF_FILE       "/var/tuxbox/config/neutrino.conf"
 #define BUFSIZE        1024
-#define I_VERSION      2.11
+#define I_VERSION      2.12
 
 
 char FONT[128]="/share/fonts/neutrino.ttf";
diff --git a/text.c b/text.c
index f8b0362bd53a44a41f9deb63ad249a04e8167abb..5ff0102d3c2e5359eec3a6a2332eee6041bcdae5 100644 (file)
--- a/text.c
+++ b/text.c
@@ -153,7 +153,7 @@ int RenderChar(FT_ULong currentchar, int _sx, int _sy, int _ex, int color)
        {
                if (_sx + sbit->xadvance > _ex + 5)
                        return -1; /* limit to maxwidth */
-               uint32_t bgcolor = *(lbb + (sy + _sy - _d - 1) * swidth + (sx + _sx + sbit->left));
+               uint32_t bgcolor = *(lbb + (sy + _sy - _d - 1) * swidth + (sx + _sx + OFFSET_MIN + sbit->left));
                uint32_t fgcolor = bgra[color];
                uint32_t *colors = lookup_colors(fgcolor, bgcolor);
                uint32_t *p = lbb + (sx + _sx + sbit->left + kerning.x) + swidth * (sy + _sy - sbit->top - _d);