summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornotsyncing <song.fc@gmail.com>2018-06-09 04:40:50 +0200
committerSimon Shi <simonsmh@gmail.com>2019-01-16 09:43:30 +0100
commit8e4e8ec2f9890db53a6ecd1fa99fb73385271831 (patch)
tree6828d0bd994f4182367209ddda8a10b5bbcd6022
parentMerge "vold_decrypt: use ANDROID_ROOT for additional compatibility" into android-9.0 (diff)
downloadandroid_bootable_recovery-8e4e8ec2f9890db53a6ecd1fa99fb73385271831.tar
android_bootable_recovery-8e4e8ec2f9890db53a6ecd1fa99fb73385271831.tar.gz
android_bootable_recovery-8e4e8ec2f9890db53a6ecd1fa99fb73385271831.tar.bz2
android_bootable_recovery-8e4e8ec2f9890db53a6ecd1fa99fb73385271831.tar.lz
android_bootable_recovery-8e4e8ec2f9890db53a6ecd1fa99fb73385271831.tar.xz
android_bootable_recovery-8e4e8ec2f9890db53a6ecd1fa99fb73385271831.tar.zst
android_bootable_recovery-8e4e8ec2f9890db53a6ecd1fa99fb73385271831.zip
-rw-r--r--minuitwrp/graphics.cpp4
-rw-r--r--minuitwrp/graphics_utils.cpp5
2 files changed, 9 insertions, 0 deletions
diff --git a/minuitwrp/graphics.cpp b/minuitwrp/graphics.cpp
index 81e77a630..d914eef3d 100644
--- a/minuitwrp/graphics.cpp
+++ b/minuitwrp/graphics.cpp
@@ -157,7 +157,11 @@ gr_surface gr_render_circle(int radius, unsigned char r, unsigned char g, unsign
surface->height = diameter;
surface->stride = diameter;
surface->data = (GGLubyte*)data;
+#if defined(RECOVERY_BGRA)
+ surface->format = GGL_PIXEL_FORMAT_BGRA_8888;
+#else
surface->format = GGL_PIXEL_FORMAT_RGBA_8888;
+#endif
for(ry = -radius; ry <= radius; ++ry)
for(rx = -radius; rx <= radius; ++rx)
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);