diff options
author | Michael Pavone <pavone@retrodev.com> | 2021-02-20 12:47:26 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2021-02-20 12:47:26 -0800 |
commit | bb5b3179fd704f53af1f75a02b3faf7cec9b7407 (patch) | |
tree | 683189d6dc715c2e8a46bcdd586509e5bf95bb7f | |
parent | 6990568d41c9756eff8fd0913f649dbc63c5ba8d (diff) |
Close VDP debug windows when VDP is freed. Fixes Trac bug 39
-rw-r--r-- | vdp.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -254,6 +254,15 @@ vdp_context *init_vdp_context(uint8_t region_pal, uint8_t has_max_vsram) void vdp_free(vdp_context *context) { + if (headless) { + free(context->fb); + } + for (int i = 0; i < VDP_NUM_DEBUG_TYPES; i++) + { + if (context->enabled_debuggers & (1 << i)) { + vdp_toggle_debug_view(context, i); + } + } free(context); } |