From c432ebd8ae7797531b4213a288e406adf51abb45 Mon Sep 17 00:00:00 2001 From: GetAway Date: Thu, 12 Oct 2017 15:13:21 +0200 Subject: [PATCH] input: use OFFSET_MIN for better bg detection --- input.c | 2 +- text.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/input.c b/input.c index a4cd0d8..a0cf315 100644 --- 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 f8b0362..5ff0102 100644 --- 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); -- 2.39.5