summaryrefslogtreecommitdiffstats
path: root/minuitwrp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--minuitwrp/Android.mk3
-rw-r--r--minuitwrp/graphics.c15
-rw-r--r--minuitwrp/graphics_overlay.c2
3 files changed, 20 insertions, 0 deletions
diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk
index 2f30343d0..92043395d 100644
--- a/minuitwrp/Android.mk
+++ b/minuitwrp/Android.mk
@@ -62,6 +62,9 @@ ifeq ($(TWRP_EVENT_LOGGING), true)
LOCAL_CFLAGS += -D_EVENT_LOGGING
endif
+ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBA_8888)
+ LOCAL_CFLAGS += -DRECOVERY_RGBA
+endif
ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888)
LOCAL_CFLAGS += -DRECOVERY_RGBX
endif
diff --git a/minuitwrp/graphics.c b/minuitwrp/graphics.c
index 6dfbc23b5..a3da6cbea 100644
--- a/minuitwrp/graphics.c
+++ b/minuitwrp/graphics.c
@@ -44,6 +44,10 @@
#define PIXEL_FORMAT GGL_PIXEL_FORMAT_BGRA_8888
#define PIXEL_SIZE 4
#endif
+#ifdef RECOVERY_RGBA
+#define PIXEL_FORMAT GGL_PIXEL_FORMAT_RGBA_8888
+#define PIXEL_SIZE 4
+#endif
#ifdef RECOVERY_RGBX
#define PIXEL_FORMAT GGL_PIXEL_FORMAT_RGBX_8888
#define PIXEL_SIZE 4
@@ -199,6 +203,17 @@ static int get_framebuffer(GGLSurface *fb)
vi.blue.length = 8;
vi.transp.offset = 0;
vi.transp.length = 8;
+ } else if (PIXEL_FORMAT == GGL_PIXEL_FORMAT_RGBA_8888) {
+ fprintf(stderr, "Pixel format: RGBA_8888\n");
+ if (PIXEL_SIZE != 4) fprintf(stderr, "E: Pixel Size mismatch!\n");
+ vi.red.offset = 0;
+ vi.red.length = 8;
+ vi.green.offset = 8;
+ vi.green.length = 8;
+ vi.blue.offset = 16;
+ vi.blue.length = 8;
+ vi.transp.offset = 24;
+ vi.transp.length = 8;
} else if (PIXEL_FORMAT == GGL_PIXEL_FORMAT_RGBX_8888) {
fprintf(stderr, "Pixel format: RGBX_8888\n");
if (PIXEL_SIZE != 4) fprintf(stderr, "E: Pixel Size mismatch!\n");
diff --git a/minuitwrp/graphics_overlay.c b/minuitwrp/graphics_overlay.c
index 80e64d72b..723ffa2d4 100644
--- a/minuitwrp/graphics_overlay.c
+++ b/minuitwrp/graphics_overlay.c
@@ -75,6 +75,8 @@ static int map_mdp_pixel_format()
int format = MDP_RGB_565;
#if defined(RECOVERY_BGRA)
format = MDP_BGRA_8888;
+#elif defined(RECOVERY_RGBA)
+ format = MDP_RGBA_8888;
#elif defined(RECOVERY_RGBX)
format = MDP_RGBA_8888;
#endif