diff --git a/display/display.c b/display/display.c index 5ad06912..22efa6e3 100644 --- a/display/display.c +++ b/display/display.c @@ -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) diff --git a/display/display.h b/display/display.h index 391bf4e7..239d1025 100644 --- a/display/display.h +++ b/display/display.h @@ -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);