summaryrefslogtreecommitdiff
path: root/package/fbv/fbv-1.0b-arch.patch.avr32
blob: f57bbac0fa883296b44d14c823c421f4ede2b1d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff -ur fbv-1.0b/fb_display.c fbv-1.0b-avr32/fb_display.c
--- fbv-1.0b/fb_display.c	2004-09-07 14:09:43.000000000 +0200
+++ fbv-1.0b-avr32/fb_display.c	2006-05-04 13:30:25.000000000 +0200
@@ -276,9 +276,6 @@
 	    for(i = 0; i < yc; i++, fbptr += scr_xs * cpp, imptr += pic_xs * cpp)
 			memcpy(fbptr, imptr, xc * cpp);
 		
-	if(cpp == 1)
-	    set8map(fh, &map_back);
-	
 	munmap(fb, scr_xs * scr_ys * cpp);
 }
 
@@ -293,17 +290,17 @@
 inline static unsigned short make15color(unsigned char r, unsigned char g, unsigned char b)
 {
     return (
-	(((r >> 3) & 31) << 10) |
+	(((r >> 3) & 31)) |
 	(((g >> 3) & 31) << 5)  |
-	 ((b >> 3) & 31)        );
+	 ((b >> 3) & 31) << 10);
 }
 
 inline static unsigned short make16color(unsigned char r, unsigned char g, unsigned char b)
 {
     return (
-	(((r >> 3) & 31) << 11) |
-	(((g >> 2) & 63) << 5)  |
-	 ((b >> 3) & 31)        );
+	(((r >> 3) & 31))      |
+	(((g >> 3) & 31) << 5) |
+	 ((b >> 3) & 31) << 10);
 }
 
 void* convertRGB2FB(int fh, unsigned char *rgbbuff, unsigned long count, int bpp, int *cpp)
@@ -342,9 +339,9 @@
 	    *cpp = 4;
 	    i_fbbuff = (unsigned int *) malloc(count * sizeof(unsigned int));
 	    for(i = 0; i < count ; i++)
-		i_fbbuff[i] = ((rgbbuff[i*3] << 16) & 0xFF0000) |
+		i_fbbuff[i] = ((rgbbuff[i*3+2] << 16) & 0xFF0000) |
 			    ((rgbbuff[i*3+1] << 8) & 0xFF00) |
-			    (rgbbuff[i*3+2] & 0xFF);
+			    (rgbbuff[i*3] & 0xFF);
 	    fbbuff = (void *) i_fbbuff;
 	    break;
 	default: