From 4a71d4f6c7f5d1ae835249418bdda7e6ac4fe614 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Fri, 29 Jul 2016 17:42:36 -0500 Subject: Add build flag for forcing single buffer mode RECOVERY_GRAPHICS_FORCE_SINGLE_BUFFER := true Change-Id: Id5144ea772c3b7ae382b064c41c23acdd0decb84 --- minuitwrp/Android.mk | 4 ++-- minuitwrp/graphics_fbdev.cpp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'minuitwrp') diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk index 18943727d..51246660b 100644 --- a/minuitwrp/Android.mk +++ b/minuitwrp/Android.mk @@ -80,8 +80,8 @@ ifeq ($(RECOVERY_GRAPHICS_FORCE_USE_LINELENGTH), true) LOCAL_CFLAGS += -DRECOVERY_GRAPHICS_FORCE_USE_LINELENGTH endif -ifeq ($(TW_DISABLE_DOUBLE_BUFFERING), true) -LOCAL_CFLAGS += -DTW_DISABLE_DOUBLE_BUFFERING +ifeq ($(RECOVERY_GRAPHICS_FORCE_SINGLE_BUFFER), true) +LOCAL_CFLAGS += -DRECOVERY_GRAPHICS_FORCE_SINGLE_BUFFER endif #Remove the # from the line below to enable event logging diff --git a/minuitwrp/graphics_fbdev.cpp b/minuitwrp/graphics_fbdev.cpp index 3402cbae3..a1c42d05c 100644 --- a/minuitwrp/graphics_fbdev.cpp +++ b/minuitwrp/graphics_fbdev.cpp @@ -249,6 +249,7 @@ static GRSurface* fbdev_init(minui_backend* backend) { } /* check if we can use double buffering */ +#ifndef RECOVERY_GRAPHICS_FORCE_SINGLE_BUFFER if (vi.yres * fi.line_length * 2 <= fi.smem_len) { double_buffered = true; printf("double buffered\n"); @@ -258,6 +259,10 @@ static GRSurface* fbdev_init(minui_backend* backend) { gr_framebuffer[0].height * gr_framebuffer[0].row_bytes; } else { +#else + { + printf("RECOVERY_GRAPHICS_FORCE_SINGLE_BUFFER := true\n"); +#endif double_buffered = false; printf("single buffered\n"); } -- cgit v1.2.3