Ejemplo n.º 1
0
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();
}
Ejemplo n.º 2
0
void d3d_free_overlays(void *data)
{
   d3d_video_t *d3d = (d3d_video_t*)data;
   for (unsigned i = 0; i < d3d->overlays.size(); i++)
      d3d_free_overlay(d3d, &d3d->overlays[i]);
   d3d->overlays.clear();
}
Ejemplo n.º 3
0
static void d3d_free(void *data)
{
   d3d_video_t *d3d = (d3d_video_t*)data;
   d3d_deinitialize(d3d);
#ifdef HAVE_OVERLAY
   d3d_free_overlays(d3d);
#endif
#ifdef HAVE_MENU
   d3d_free_overlay(d3d, d3d->rgui);
#endif
   if (d3d->dev)
      d3d->dev->Release();
   if (d3d->g_pD3D)
      d3d->g_pD3D->Release();

#ifdef HAVE_MONITOR
   Monitor::last_hm = MonitorFromWindow(d3d->hWnd, MONITOR_DEFAULTTONEAREST);
#endif
   DestroyWindow(d3d->hWnd);

   if (d3d)
      delete d3d;

#ifndef _XBOX
   UnregisterClass("RetroArch", GetModuleHandle(NULL));
#endif
}
Ejemplo n.º 4
0
static void d3d_free_overlays(d3d_video_t *d3d)
{
   unsigned i;

   if (!d3d)
      return;

   for (i = 0; i < d3d->overlays.size(); i++)
      d3d_free_overlay(d3d, &d3d->overlays[i]);
   d3d->overlays.clear();
}
Ejemplo n.º 5
0
static void d3d_free(void *data)
{
   d3d_video_t *d3d = (d3d_video_t*)data;

   if (!d3d)
      return;

   d3d_deinitialize(d3d);
#ifdef HAVE_OVERLAY
   d3d_free_overlays(d3d);
#endif

#ifdef _XBOX
   if (d3d->ctx_driver && d3d->ctx_driver->destroy)
      d3d->ctx_driver->destroy(d3d);
   d3d->ctx_driver = NULL;
#else

#ifdef HAVE_MENU
   d3d_free_overlay(d3d, d3d->menu);
#endif

#endif
   if (d3d->dev)
      d3d->dev->Release();
   if (d3d->g_pD3D)
      d3d->g_pD3D->Release();

#ifdef HAVE_MONITOR
   monitor_last = MonitorFromWindow(d3d->hWnd,
         MONITOR_DEFAULTTONEAREST);
   DestroyWindow(d3d->hWnd);
#endif

   if (d3d)
      free(d3d);

#ifndef _XBOX
   UnregisterClass("RetroArch", GetModuleHandle(NULL));
#endif
}