diff options
author | Vojtech Bocek <vbocek@gmail.com> | 2014-02-06 19:52:28 +0100 |
---|---|---|
committer | Vojtech Bocek <vbocek@gmail.com> | 2014-02-06 19:57:03 +0100 |
commit | 1a4744a493a41b930d5a9e6f58c8d43eb3be3c42 (patch) | |
tree | fe3140bd69a750c731a2823dcdcb1bb0b83f416e | |
parent | Fix error message on split backups (diff) | |
download | android_bootable_recovery-1a4744a493a41b930d5a9e6f58c8d43eb3be3c42.tar android_bootable_recovery-1a4744a493a41b930d5a9e6f58c8d43eb3be3c42.tar.gz android_bootable_recovery-1a4744a493a41b930d5a9e6f58c8d43eb3be3c42.tar.bz2 android_bootable_recovery-1a4744a493a41b930d5a9e6f58c8d43eb3be3c42.tar.lz android_bootable_recovery-1a4744a493a41b930d5a9e6f58c8d43eb3be3c42.tar.xz android_bootable_recovery-1a4744a493a41b930d5a9e6f58c8d43eb3be3c42.tar.zst android_bootable_recovery-1a4744a493a41b930d5a9e6f58c8d43eb3be3c42.zip |
Diffstat (limited to '')
-rw-r--r-- | minuitwrp/graphics.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/minuitwrp/graphics.c b/minuitwrp/graphics.c index fc34b6b19..99f584183 100644 --- a/minuitwrp/graphics.c +++ b/minuitwrp/graphics.c @@ -69,6 +69,7 @@ static GGLSurface gr_framebuffer[NUM_BUFFERS]; static GGLSurface gr_mem_surface; static unsigned gr_active_fb = 0; static unsigned double_buffering = 0; +static int gr_is_curr_clr_opaque = 0; static int gr_fb_fd = -1; static int gr_vt_fd = -1; @@ -288,6 +289,8 @@ void gr_color(unsigned char r, unsigned char g, unsigned char b, unsigned char a color[2] = ((b << 8) | b) + 1; color[3] = ((a << 8) | a) + 1; gl->color4xv(gl, color); + + gr_is_curr_clr_opaque = (a == 255); } int gr_measureEx(const char *s, void* font) @@ -463,8 +466,15 @@ int twgr_text(int x, int y, const char *s) void gr_fill(int x, int y, int w, int h) { GGLContext *gl = gr_context; + + if(gr_is_curr_clr_opaque) + gl->disable(gl, GGL_BLEND); + gl->disable(gl, GGL_TEXTURE_2D); gl->recti(gl, x, y, x + w, y + h); + + if(gr_is_curr_clr_opaque) + gl->enable(gl, GGL_BLEND); } void gr_blit(gr_surface source, int sx, int sy, int w, int h, int dx, int dy) { |