video: sandbox: Avoid duplicate display windows

When unit tests are run they currently create a new window. Update the
code so that the old one is removed first. This avoids the confusion as to
which one is active.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2021-11-19 13:23:46 -07:00 committed by Anatolij Gustschin
parent 0fe5e9481e
commit 250e735c69
3 changed files with 49 additions and 6 deletions

View file

@ -25,6 +25,13 @@
int sandbox_sdl_init_display(int width, int height, int log2_bpp,
bool double_size);
/**
* sandbox_sdl_remove_display() - Remove the SDL screen
*
* @return 0 if OK, -ENOENT if the SDL had not been inited.
*/
int sandbox_sdl_remove_display(void);
/**
* sandbox_sdl_sync() - Sync current U-Boot LCD frame buffer to SDL
*