From c20ec19a962e537d6a55048b48bb044c03dfda9e Mon Sep 17 00:00:00 2001 From: nongxiaoming Date: Tue, 11 Mar 2014 11:28:22 +0800 Subject: [PATCH] modify the pixel format to RGB565 in sdl_fb.c --- bsp/simulator/drivers/sdl_fb.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bsp/simulator/drivers/sdl_fb.c b/bsp/simulator/drivers/sdl_fb.c index 84076b757f..198b85d0d9 100755 --- a/bsp/simulator/drivers/sdl_fb.c +++ b/bsp/simulator/drivers/sdl_fb.c @@ -56,7 +56,7 @@ static rt_err_t sdlfb_control(rt_device_t dev, rt_uint8_t cmd, void *args) info = (struct rt_device_graphic_info *) args; info->bits_per_pixel = 16; - info->pixel_format = RTGRAPHIC_PIXEL_FORMAT_RGB565P; + info->pixel_format = RTGRAPHIC_PIXEL_FORMAT_RGB565; info->framebuffer = device->screen->pixels; info->width = device->screen->w; info->height = device->screen->h; @@ -306,8 +306,12 @@ static void *sdl_loop(void *lpParam) break; } - if (quit) - break; + if (quit) + { + exit(1); + break; + } + } rt_hw_exit(); return 0;