static void d3d_free(void *data) { d3d_video_t *d3d = (d3d_video_t*)data; HWND window = win32_get_window(); if (!d3d) return; d3d_deinitialize(d3d); #ifdef HAVE_OVERLAY d3d_free_overlays(d3d); #endif gfx_ctx_free(); #ifndef _XBOX #ifdef HAVE_MENU d3d_free_overlay(d3d, d3d->menu); if (d3d->menu) delete d3d->menu; #endif #endif d3d_device_free(d3d->dev, g_pD3D); d3d->dev = NULL; g_pD3D = NULL; win32_monitor_from_window(window, true); if (d3d) delete d3d; win32_destroy_window(); }
static void vg_free(void *data) { vg_t *vg = (vg_t*)data; if (!vg) return; vgDestroyImage(vg->mImage); if (vg->mFontsOn) { vgDestroyFont(vg->mFont); vg->font_driver->free(vg->mFontRenderer); vgDestroyPaint(vg->mPaintFg); vgDestroyPaint(vg->mPaintBg); } gfx_ctx_free(vg); free(vg); }