minuitwrp graphics: Fix RECOVERY_ABGR implementation
With commit e4a84df75cfedc1c6d022baa7037845ece360ddc (minuitwrp graphics: derived commits for DRM graphics), which ships support of ARGB_8888, some if defined for RECOVERY_ABGR were replaced with RECOVERY_ARGB, causing recovery graphics part not to switch bits of image on ABGR format, and breaking it
Without this, TWRP inverts Blue and Red, causing recovery fb look orangy and etc
This affects a bunch of Samsung devices, including Exynos 850, Exynos 9611 and Exynos 2100 devices, which need proper ABGR support in recovery
Test: mka clean && mka recoveryimage with TARGET_RECOVERY_PIXEL_FORMAT := "ABGR_8888"
Change-Id: Ic7bae783645dc2a558d27c300eeaeca782313cdd
diff --git a/minuitwrp/resources.cpp b/minuitwrp/resources.cpp
index 42e3131..0508eb5 100644
--- a/minuitwrp/resources.cpp
+++ b/minuitwrp/resources.cpp
@@ -224,7 +224,7 @@
goto exit;
}
-#if defined(RECOVERY_ARGB) || defined(RECOVERY_BGRA)
+#if defined(RECOVERY_ARGB) || defined(RECOVERY_BGRA) || defined(RECOVERY_ABGR)
png_set_bgr(png_ptr);
#endif
@@ -320,7 +320,7 @@
unsigned char g = pRow[sx + 1];
unsigned char b = pRow[sx + 2];
unsigned char a = 0xff;
-#if defined(RECOVERY_ARGB) || defined(RECOVERY_BGRA)
+#if defined(RECOVERY_ARGB) || defined(RECOVERY_BGRA) || defined(RECOVERY_ABGR)
pRow[dx ] = b; // r
pRow[dx + 1] = g; // g
pRow[dx + 2] = r; // b