summaryrefslogtreecommitdiffstats
path: root/minui/graphics.c
diff options
context:
space:
mode:
authorDevin Kim <dojip.kim@lge.com>2012-07-19 19:47:34 +0200
committerIliyan Malchev <malchev@google.com>2012-07-20 16:01:11 +0200
commit862d026fb2aebb3e30be68ce2f48ef226e8c3a20 (patch)
tree52e5903a0bb10ac7172d7a63be4609ef61bfe1c0 /minui/graphics.c
parentfix timed progress bars in recovery (diff)
downloadandroid_bootable_recovery-862d026fb2aebb3e30be68ce2f48ef226e8c3a20.tar
android_bootable_recovery-862d026fb2aebb3e30be68ce2f48ef226e8c3a20.tar.gz
android_bootable_recovery-862d026fb2aebb3e30be68ce2f48ef226e8c3a20.tar.bz2
android_bootable_recovery-862d026fb2aebb3e30be68ce2f48ef226e8c3a20.tar.lz
android_bootable_recovery-862d026fb2aebb3e30be68ce2f48ef226e8c3a20.tar.xz
android_bootable_recovery-862d026fb2aebb3e30be68ce2f48ef226e8c3a20.tar.zst
android_bootable_recovery-862d026fb2aebb3e30be68ce2f48ef226e8c3a20.zip
Diffstat (limited to '')
-rw-r--r--minui/graphics.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/minui/graphics.c b/minui/graphics.c
index de1cfdf3b..dc96c3b21 100644
--- a/minui/graphics.c
+++ b/minui/graphics.c
@@ -44,6 +44,8 @@
#define PIXEL_SIZE 2
#endif
+#define NUM_BUFFERS 2
+
typedef struct {
GGLSurface texture;
unsigned cwidth;
@@ -54,7 +56,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;
@@ -162,7 +164,7 @@ static void get_memory_surface(GGLSurface* ms) {
static void set_active_framebuffer(unsigned n)
{
if (n > 1) return;
- vi.yres_virtual = vi.yres * PIXEL_SIZE;
+ 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) {