summaryrefslogtreecommitdiffstats
path: root/minuitwrp/graphics.c
diff options
context:
space:
mode:
authorVojtech Bocek <vbocek@gmail.com>2014-02-06 20:36:25 +0100
committerVojtech Bocek <vbocek@gmail.com>2014-02-06 20:38:33 +0100
commit6c694b6f0bd8c6ca4552d70ee3a538d51917337e (patch)
tree440822aeec74a17c93d5319c50a2f299003325ac /minuitwrp/graphics.c
parentMerge "Load RTC offset on Qualcomm Krait chips, fixes the broken time & date" into android-4.4 (diff)
downloadandroid_bootable_recovery-6c694b6f0bd8c6ca4552d70ee3a538d51917337e.tar
android_bootable_recovery-6c694b6f0bd8c6ca4552d70ee3a538d51917337e.tar.gz
android_bootable_recovery-6c694b6f0bd8c6ca4552d70ee3a538d51917337e.tar.bz2
android_bootable_recovery-6c694b6f0bd8c6ca4552d70ee3a538d51917337e.tar.lz
android_bootable_recovery-6c694b6f0bd8c6ca4552d70ee3a538d51917337e.tar.xz
android_bootable_recovery-6c694b6f0bd8c6ca4552d70ee3a538d51917337e.tar.zst
android_bootable_recovery-6c694b6f0bd8c6ca4552d70ee3a538d51917337e.zip
Diffstat (limited to '')
-rw-r--r--minuitwrp/graphics.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/minuitwrp/graphics.c b/minuitwrp/graphics.c
index 99f584183..ddff571fe 100644
--- a/minuitwrp/graphics.c
+++ b/minuitwrp/graphics.c
@@ -483,13 +483,21 @@ void gr_blit(gr_surface source, int sx, int sy, int w, int h, int dx, int dy) {
}
GGLContext *gl = gr_context;
- gl->bindTexture(gl, (GGLSurface*) source);
+ GGLSurface *surface = (GGLSurface*)source;
+
+ if(surface->format == GGL_PIXEL_FORMAT_RGBX_8888)
+ gl->disable(gl, GGL_BLEND);
+
+ gl->bindTexture(gl, surface);
gl->texEnvi(gl, GGL_TEXTURE_ENV, GGL_TEXTURE_ENV_MODE, GGL_REPLACE);
gl->texGeni(gl, GGL_S, GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE);
gl->texGeni(gl, GGL_T, GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE);
gl->enable(gl, GGL_TEXTURE_2D);
gl->texCoord2i(gl, sx - dx, sy - dy);
gl->recti(gl, dx, dy, dx + w, dy + h);
+
+ if(surface->format == GGL_PIXEL_FORMAT_RGBX_8888)
+ gl->enable(gl, GGL_BLEND);
}
unsigned int gr_get_width(gr_surface surface) {