summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--minuitwrp/Android.mk4
-rw-r--r--minuitwrp/graphics.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk
index f42974413..188de9ded 100644
--- a/minuitwrp/Android.mk
+++ b/minuitwrp/Android.mk
@@ -52,6 +52,10 @@ ifeq ($(RECOVERY_GRAPHICS_USE_LINELENGTH), true)
LOCAL_CFLAGS += -DRECOVERY_GRAPHICS_USE_LINELENGTH
endif
+ifeq ($(TW_DISABLE_DOUBLE_BUFFERING), true)
+LOCAL_CFLAGS += -DTW_DISABLE_DOUBLE_BUFFERING
+endif
+
#Remove the # from the line below to enable event logging
#TWRP_EVENT_LOGGING := true
ifeq ($(TWRP_EVENT_LOGGING), true)
diff --git a/minuitwrp/graphics.c b/minuitwrp/graphics.c
index 704389fdf..04c41fb54 100644
--- a/minuitwrp/graphics.c
+++ b/minuitwrp/graphics.c
@@ -295,8 +295,12 @@ static int get_framebuffer(GGLSurface *fb)
fb++;
+#ifndef TW_DISABLE_DOUBLE_BUFFERING
/* check if we can use double buffering */
if (vi.yres * fi.line_length * 2 > fi.smem_len)
+#else
+ printf("TW_DISABLE_DOUBLE_BUFFERING := true\n");
+#endif
return fd;
double_buffering = 1;