From 8e4e8ec2f9890db53a6ecd1fa99fb73385271831 Mon Sep 17 00:00:00 2001 From: notsyncing Date: Sat, 9 Jun 2018 10:40:50 +0800 Subject: minuitwrp: Respect TARGET_RECOVERY_PIXEL_FORMAT config. Respect TARGET_RECOVERY_PIXEL_FORMAT config in screenshot, graphics. This fixes other wrong theme color in minuitwrp on Xiaomi MIX 2S. Change-Id: Ieb8480c411e2f0c72cc50ffca66943ab025e2b7e --- minuitwrp/graphics_utils.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'minuitwrp/graphics_utils.cpp') diff --git a/minuitwrp/graphics_utils.cpp b/minuitwrp/graphics_utils.cpp index 6ce570484..67c836ed5 100644 --- a/minuitwrp/graphics_utils.cpp +++ b/minuitwrp/graphics_utils.cpp @@ -52,7 +52,12 @@ int gr_save_screenshot(const char *dest) surface.height = gr_mem_surface.height; surface.stride = gr_mem_surface.stride; surface.data = img_data; + +#if defined(RECOVERY_BGRA) + surface.format = GGL_PIXEL_FORMAT_BGRA_8888; +#else surface.format = GGL_PIXEL_FORMAT_RGBA_8888; +#endif gglInit(&gl); gl->colorBuffer(gl, &surface); -- cgit v1.2.3