From 5c69bdd735f2d943789ff994bd681c2c05170dc3 Mon Sep 17 00:00:00 2001 From: codeworkx Date: Wed, 13 Jul 2011 12:19:47 -0700 Subject: [PATCH] graphics: use gr_flip_32() only if we're really on a 32bpp device. Change-Id: I996b2dadf43477064480a47ee536e6ec395a6aad --- minui/graphics.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/minui/graphics.c b/minui/graphics.c index c11e498..6e4f436 100644 --- a/minui/graphics.c +++ b/minui/graphics.c @@ -177,18 +177,18 @@ void gr_flip(void) #endif /* copy data from the in-memory surface to the buffer we're about - * to make active. */ - if( vi.bits_per_pixel == 16) - { - memcpy(gr_framebuffer[gr_active_fb].data, gr_mem_surface.data, - vi.xres_virtual * vi.yres *2); - } - else + * to make active. */ + if(vi.bits_per_pixel == 32) { gr_flip_32((unsigned *)gr_framebuffer[gr_active_fb].data, \ (unsigned short *)gr_mem_surface.data, (vi.xres_virtual * vi.yres)); } + else + { + memcpy(gr_framebuffer[gr_active_fb].data, gr_mem_surface.data, + vi.xres_virtual * vi.yres *2); + } /* inform the display driver */ set_active_framebuffer(gr_active_fb);