Package: tuxonice-userui / 1.1+dfsg1.gc3bdd83-4

0003-Fix-corrupted-display-of-PNG.patch Patch series | download
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
49
50
51
52
53
54
55
56
57
From: Julien Muchembled <jm@jmuchemb.eu>
Date: Wed, 5 Feb 2014 01:40:40 +0100
Subject: Fix corrupted display of PNG

This is broken since commit 3ac7e257510dfd4a6d92cabd1cd2dcff381bcf96,
which does more than simply applying original Debian patch.
---
 fbsplash/common.c | 1 -
 fbsplash/image.c  | 3 +--
 fbsplash/parse.c  | 1 -
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/fbsplash/common.c b/fbsplash/common.c
index 4450192..fb34c7c 100644
--- a/fbsplash/common.c
+++ b/fbsplash/common.c
@@ -28,7 +28,6 @@
 
 #include "../userui.h"
 #include "splash.h"
-#include "../userui.h"
 
 struct fb_var_screeninfo   fb_var;
 struct fb_fix_screeninfo   fb_fix;
diff --git a/fbsplash/image.c b/fbsplash/image.c
index 51682a3..2fb3c92 100644
--- a/fbsplash/image.c
+++ b/fbsplash/image.c
@@ -18,7 +18,6 @@
 #include <linux/fb.h>
 
 #include "config.h"
-#include "../userui.h"
 
 #ifdef CONFIG_PNG
 #ifdef TARGET_KERNEL
@@ -136,7 +135,7 @@ int load_png(char *filename, u8 **data, struct fb_cmap *cmap, unsigned int *widt
 		png_set_strip_alpha(png_ptr);
 
 #ifndef TARGET_KERNEL	
-	if (!((png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA) & want_alpha)) {
+	if (want_alpha && !(png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA)) {
 		png_set_add_alpha(png_ptr, 0xff, PNG_FILLER_AFTER);
 	}
 #endif
diff --git a/fbsplash/parse.c b/fbsplash/parse.c
index 5f01bd2..3577dc8 100644
--- a/fbsplash/parse.c
+++ b/fbsplash/parse.c
@@ -21,7 +21,6 @@
 #include <ctype.h>
 #include "../userui.h"
 #include "splash.h"
-#include "../userui.h"
 
 struct config_opt {
 	char *name;