summaryrefslogtreecommitdiffstats
path: root/minui/resources.c
diff options
context:
space:
mode:
Diffstat (limited to 'minui/resources.c')
-rw-r--r--minui/resources.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/minui/resources.c b/minui/resources.c
index 2bae4ded0..886c3255d 100644
--- a/minui/resources.c
+++ b/minui/resources.c
@@ -15,6 +15,7 @@
*/
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include <fcntl.h>
@@ -215,6 +216,10 @@ int res_create_display_surface(const char* name, gr_surface* pSurface) {
goto exit;
}
+#if defined(RECOVERY_ABGR) || defined(RECOVERY_BGRA)
+ png_set_bgr(png_ptr);
+#endif
+
unsigned char* p_row = malloc(width * 4);
unsigned int y;
for (y = 0; y < height; ++y) {
@@ -278,6 +283,10 @@ int res_create_multi_display_surface(const char* name, int* frames, gr_surface**
}
}
+#if defined(RECOVERY_ABGR) || defined(RECOVERY_BGRA)
+ png_set_bgr(png_ptr);
+#endif
+
unsigned char* p_row = malloc(width * 4);
unsigned int y;
for (y = 0; y < height; ++y) {
@@ -333,6 +342,10 @@ int res_create_alpha_surface(const char* name, gr_surface* pSurface) {
surface->row_bytes = width;
surface->pixel_bytes = 1;
+#if defined(RECOVERY_ABGR) || defined(RECOVERY_BGRA)
+ png_set_bgr(png_ptr);
+#endif
+
unsigned char* p_row;
unsigned int y;
for (y = 0; y < height; ++y) {