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);