Improved lcd_terminate function in SDL-based lcd driver
This commit is contained in:
parent
2cfca62b00
commit
b2d613f38b
|
|
@ -52,7 +52,7 @@ void lcd_init()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
window = SDL_CreateWindow("",
|
window = SDL_CreateWindow(" ",
|
||||||
SDL_WINDOWPOS_UNDEFINED,
|
SDL_WINDOWPOS_UNDEFINED,
|
||||||
SDL_WINDOWPOS_UNDEFINED,
|
SDL_WINDOWPOS_UNDEFINED,
|
||||||
SCREEN_WIDTH,SCREEN_HEIGHT,
|
SCREEN_WIDTH,SCREEN_HEIGHT,
|
||||||
|
|
@ -70,7 +70,11 @@ void lcd_init()
|
||||||
|
|
||||||
void lcd_terminate()
|
void lcd_terminate()
|
||||||
{
|
{
|
||||||
|
while(inProgress) { } /* Wait until current render finishes */
|
||||||
|
printf("Terminating SDL display emulator, goodbye!\n");
|
||||||
|
free(frameBuffer);
|
||||||
SDL_DestroyWindow(window);
|
SDL_DestroyWindow(window);
|
||||||
|
SDL_Quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t lcd_screenWidth()
|
uint16_t lcd_screenWidth()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue