summaryrefslogtreecommitdiffstats
path: root/minui/graphics.cpp
diff options
context:
space:
mode:
authorAdrian Salido <salidoa@google.com>2019-12-13 05:18:09 +0100
committerAdrian Salido <salidoa@google.com>2019-12-13 19:53:33 +0100
commitcc7b7eb7379f08d113133b865a28dd9c3b0f0852 (patch)
tree758ff487cae26b24a5cf6fc75d01a85f813d3bde /minui/graphics.cpp
parentMerge "Generate linker config from recovery init" (diff)
downloadandroid_bootable_recovery-cc7b7eb7379f08d113133b865a28dd9c3b0f0852.tar
android_bootable_recovery-cc7b7eb7379f08d113133b865a28dd9c3b0f0852.tar.gz
android_bootable_recovery-cc7b7eb7379f08d113133b865a28dd9c3b0f0852.tar.bz2
android_bootable_recovery-cc7b7eb7379f08d113133b865a28dd9c3b0f0852.tar.lz
android_bootable_recovery-cc7b7eb7379f08d113133b865a28dd9c3b0f0852.tar.xz
android_bootable_recovery-cc7b7eb7379f08d113133b865a28dd9c3b0f0852.tar.zst
android_bootable_recovery-cc7b7eb7379f08d113133b865a28dd9c3b0f0852.zip
Diffstat (limited to '')
-rw-r--r--minui/graphics.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/minui/graphics.cpp b/minui/graphics.cpp
index 4d1f9b2d2..d34da5674 100644
--- a/minui/graphics.cpp
+++ b/minui/graphics.cpp
@@ -209,7 +209,7 @@ void gr_texticon(int x, int y, const GRSurface* icon) {
void gr_color(unsigned char r, unsigned char g, unsigned char b, unsigned char a) {
uint32_t r32 = r, g32 = g, b32 = b, a32 = a;
- if (pixel_format == PixelFormat::ABGR || pixel_format == PixelFormat::BGRA) {
+ if (pixel_format == PixelFormat::ARGB || pixel_format == PixelFormat::BGRA) {
gr_current = (a32 << 24) | (r32 << 16) | (g32 << 8) | b32;
} else {
gr_current = (a32 << 24) | (b32 << 16) | (g32 << 8) | r32;
@@ -348,6 +348,8 @@ int gr_init() {
pixel_format = PixelFormat::ABGR;
} else if (format == "RGBX_8888") {
pixel_format = PixelFormat::RGBX;
+ } else if (format == "ARGB_8888") {
+ pixel_format = PixelFormat::ARGB;
} else if (format == "BGRA_8888") {
pixel_format = PixelFormat::BGRA;
} else {