summaryrefslogtreecommitdiffstats
path: root/minuitwrp
diff options
context:
space:
mode:
authorHiemanshu Sharma <hiemanshu@gmail.com>2012-11-21 18:28:36 +0100
committerHiemanshu Sharma <hiemanshu@gmail.com>2012-11-21 18:28:36 +0100
commitacf6a9b4d9612d4782c8fd9df078cb4f9bbadae6 (patch)
tree3de432702abc8044db029ec3132bc955a0352214 /minuitwrp
parentgraphics: add support for "single buffering" (diff)
downloadandroid_bootable_recovery-acf6a9b4d9612d4782c8fd9df078cb4f9bbadae6.tar
android_bootable_recovery-acf6a9b4d9612d4782c8fd9df078cb4f9bbadae6.tar.gz
android_bootable_recovery-acf6a9b4d9612d4782c8fd9df078cb4f9bbadae6.tar.bz2
android_bootable_recovery-acf6a9b4d9612d4782c8fd9df078cb4f9bbadae6.tar.lz
android_bootable_recovery-acf6a9b4d9612d4782c8fd9df078cb4f9bbadae6.tar.xz
android_bootable_recovery-acf6a9b4d9612d4782c8fd9df078cb4f9bbadae6.tar.zst
android_bootable_recovery-acf6a9b4d9612d4782c8fd9df078cb4f9bbadae6.zip
Diffstat (limited to '')
-rw-r--r--minuitwrp/graphics.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/minuitwrp/graphics.c b/minuitwrp/graphics.c
index 357639201..dc79db881 100644
--- a/minuitwrp/graphics.c
+++ b/minuitwrp/graphics.c
@@ -51,6 +51,8 @@
#define PIXEL_SIZE 2
#endif
+#define NUM_BUFFERS 2
+
// #define PRINT_SCREENINFO 1 // Enables printing of screen info to log
typedef struct {
@@ -63,7 +65,7 @@ typedef struct {
static GRFont *gr_font = 0;
static GGLContext *gr_context = 0;
static GGLSurface gr_font_texture;
-static GGLSurface gr_framebuffer[2];
+static GGLSurface gr_framebuffer[NUM_BUFFERS];
static GGLSurface gr_mem_surface;
static unsigned gr_active_fb = 0;
static unsigned double_buffering = 0;
@@ -238,7 +240,7 @@ static void get_memory_surface(GGLSurface* ms) {
static void set_active_framebuffer(unsigned n)
{
if (n > 1 || !double_buffering) return;
- vi.yres_virtual = vi.yres * 2;
+ vi.yres_virtual = vi.yres * NUM_BUFFERS;
vi.yoffset = n * vi.yres;
// vi.bits_per_pixel = PIXEL_SIZE * 8;
if (ioctl(gr_fb_fd, FBIOPUT_VSCREENINFO, &vi) < 0) {