display: Add display_close.

This commit is contained in:
Lars Brinkhoff 2020-02-04 09:43:21 +01:00
parent 72b89054da
commit 0e3187a196
2 changed files with 17 additions and 0 deletions

View file

@ -975,6 +975,18 @@ display_init(enum display_type type, int sf, void *dptr)
fprintf(stderr, "Display initialization failed\r\n");
return 0;
}
void
display_close(void *dptr)
{
if (!initialized)
return;
free (points);
ws_shutdown();
initialized = 0;
}
void
display_reset(void)

View file

@ -65,6 +65,11 @@ enum display_type {
*/
extern int display_init(enum display_type, int scale, void *dptr);
/*
* close display
*/
extern void display_close(void *dptr);
/* return size of virtual display */
extern int display_xpoints(void);
extern int display_ypoints(void);