graphics: use gr_flip_32() only if we're really on a 32bpp device.

Change-Id: I996b2dadf43477064480a47ee536e6ec395a6aad
This commit is contained in:
codeworkx 2011-07-13 12:19:47 -07:00
parent 94a4babac7
commit 5c69bdd735

View File

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