Ken Van Hoeylandt d6baf40d0b
Implement LVGL with SDL for simulator (#16)
* Implemented LVGL with SDL for simulator

* cleanup

* added SDL to build

* build fix

* mutex fixes

* sim app cleanup and improvements

* docs updated

* fix for sdl?

* fix for SDL cmake setup
2024-01-21 22:27:00 +01:00

16 lines
595 B
C

#include "check.h"
#include "display.h"
DisplayDevice* tt_display_device_alloc(DisplayDriver* driver) {
DisplayDevice* display = malloc(sizeof(DisplayDevice));
memset(display, 0, sizeof(DisplayDevice));
tt_check(driver->create_display_device(display), "failed to create display");
tt_check(display->io_handle != NULL);
tt_check(display->display_handle != NULL);
tt_check(display->horizontal_resolution != 0);
tt_check(display->vertical_resolution != 0);
tt_check(display->draw_buffer_height > 0);
tt_check(display->bits_per_pixel > 0);
return display;
}