diff options
| author | fangjianzhou <[email protected]> | 2023-10-17 13:03:03 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-17 13:03:03 +0800 |
| commit | 7d64cdcf58969b1b2b7e9cfb3aac9e46cb456ae3 (patch) | |
| tree | 34ec15e80c0daad70919df60aea9f4fc0a085486 /bsp | |
| parent | 1e0f406b4f8490cb9e61a7d68850817e93406640 (diff) | |
qemu-virt64-aarch64/qemu-virt64-riscv支持SDL2 (#8130)
Diffstat (limited to 'bsp')
| -rw-r--r-- | bsp/qemu-virt64-aarch64/applications/graphic.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/bsp/qemu-virt64-aarch64/applications/graphic.c b/bsp/qemu-virt64-aarch64/applications/graphic.c index a83498c6f1..7331ebfc65 100644 --- a/bsp/qemu-virt64-aarch64/applications/graphic.c +++ b/bsp/qemu-virt64-aarch64/applications/graphic.c @@ -103,8 +103,7 @@ void graphic_thread(void *param) { int i = 0; - rt_memset(graphic_info.framebuffer, 0xff, - graphic_info.width * graphic_info.height * graphic_info.bits_per_pixel); + rt_memset(graphic_info.framebuffer, 0xff, graphic_info.pitch * graphic_info.height); cur_last_points[0] = graphic_info.width / 2; cur_last_points[1] = graphic_info.height / 2; @@ -207,7 +206,7 @@ _graphic_fail: } } -int graphic_init(void) +int graphic_test(void) { rt_thread_t graphic_tid = rt_thread_create("graphic work", graphic_thread, RT_NULL, GRAPHIC_THREAD_STACK_SIZE, GRAPHIC_THREAD_PRIORITY, GRAPHIC_THREAD_TIMESLICE); @@ -221,8 +220,4 @@ int graphic_init(void) return -RT_ERROR; } -#ifdef RT_USING_SMP -INIT_ENV_EXPORT(graphic_init); -#else -MSH_CMD_EXPORT(graphic_init, Graphic initialize); -#endif +MSH_CMD_EXPORT(graphic_test, Graphic test); |
