summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--minuitwrp/graphics.c10
-rw-r--r--partition.cpp6
2 files changed, 10 insertions, 6 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) {
diff --git a/partition.cpp b/partition.cpp
index 29b071c5b..95f6bcac4 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -1591,12 +1591,6 @@ bool TWPartition::Backup_Tar(string backup_folder) {
tar.setsize(Backup_Size);
if (tar.createTarFork() != 0)
return false;
- if (use_encryption)
- Full_FileName += "000";
- if (TWFunc::Get_File_Size(Full_FileName) == 0) {
- LOGERR("Backup file size for '%s' is 0 bytes.\n", Full_FileName.c_str());
- return false;
- }
return true;
}