]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/lcd4linux-scaletext-dpf.patch
ethtool: Update to 3.16
[ipfire-2.x.git] / src / patches / lcd4linux-scaletext-dpf.patch
1 diff -rupN --exclude=.svn --exclude='*.log' --exclude=Makefile --exclude='*.m4' --exclude='*.in' --exclude=autom4te.cache --exclude='config*' --exclude='*.Po' --exclude='*.sh' lcd4linux/drv_dpf.c lcd4linux.1/drv_dpf.c
2 --- lcd4linux/drv_dpf.c 2011-11-14 14:41:40.859787820 +0100
3 +++ lcd4linux.1/drv_dpf.c 2011-11-13 14:42:58.650315817 +0100
4 @@ -160,12 +160,26 @@ static int drv_dpf_start2(const char *se
5 }
6
7 /* Fixme: provider other fonts someday... */
8 - if (XRES != 6 && YRES != 8) {
9 + /* Overridden - we have scaled the textout drawing */
10 +/* if (XRES != 6 && YRES != 8) {
11 error("%s: bad Font '%s' from %s (only 6x8 at the moment)",
12 Name, s, cfg_source());
13 return -1;
14 + } */
15 +
16 + /* we dont want fonts below 6 width */
17 + if (XRES <6) {
18 + error("%s: bad Font '%s' width '%d' using minimum of 6)",
19 + Name,s,XRES);
20 + XRES = 6;
21 }
22
23 + /* we dont want fonts below 8 height */
24 + if (YRES <8) {
25 + error("%s: bad Font '%s' height '%d' using minimum of 8)",
26 + Name,s,YRES);
27 + YRES = 8;
28 + }
29
30 /* open communication with the display */
31 if (drv_dpf_open(section) < 0) {
32 diff -rupN --exclude=.svn --exclude='*.log' --exclude=Makefile --exclude='*.m4' --exclude='*.in' --exclude=autom4te.cache --exclude='config*' --exclude='*.Po' --exclude='*.sh' lcd4linux/drv_generic_graphic.c lcd4linux.1/drv_generic_graphic.c
33 --- lcd4linux/drv_generic_graphic.c 2011-11-14 14:41:40.614375417 +0100
34 +++ lcd4linux.1/drv_generic_graphic.c 2011-11-14 14:58:29.303285793 +0100
35 @@ -259,15 +259,18 @@ static void drv_generic_graphic_render(c
36 }
37
38 for (y = 0; y < YRES; y++) {
39 - int mask = 1 << XRES;
40 +
41 for (x = 0; x < XRES; x++) {
42 - mask >>= 1;
43 - if (chr[y] & mask)
44 - drv_generic_graphic_FB[layer][(r + y) * LCOLS + c + x] = fg;
45 - else
46 - drv_generic_graphic_FB[layer][(r + y) * LCOLS + c + x] = bg;
47 + int mask = 1 << 6;
48 + mask >>= ((x*6)/(XRES))+1;
49 + if (chr[(y*8)/(YRES)] & mask)
50 + drv_generic_graphic_FB[layer][(r + y ) * LCOLS + c + x] = fg;
51 + else
52 + drv_generic_graphic_FB[layer][(r + y ) * LCOLS + c + x] = bg;
53 +
54 }
55 }
56 +
57 c += XRES;
58 txt++;
59 }