mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-20 18:00:57 +00:00
Make it possible to manually set one of the devices with d3d_device_free
This commit is contained in:
parent
8b9c6d099f
commit
e8656333f1
@ -505,13 +505,8 @@ bool d3d_reset(LPDIRECT3DDEVICE dev, D3DPRESENT_PARAMETERS *d3dpp)
|
||||
|
||||
void d3d_device_free(LPDIRECT3DDEVICE dev, LPDIRECT3D pd3d)
|
||||
{
|
||||
if (!dev)
|
||||
return;
|
||||
|
||||
if (dev)
|
||||
dev->Release();
|
||||
|
||||
if (!pd3d)
|
||||
return;
|
||||
|
||||
if (pd3d)
|
||||
pd3d->Release();
|
||||
}
|
||||
|
@ -388,7 +388,7 @@ static bool d3d_initialize(d3d_video_t *d3d, const video_info_t *info)
|
||||
if (!d3d_reset(d3d->dev, &d3dpp))
|
||||
{
|
||||
d3d_deinitialize(d3d);
|
||||
g_pD3D->Release();
|
||||
d3d_device_free(NULL, g_pD3D);
|
||||
g_pD3D = NULL;
|
||||
|
||||
ret = d3d_init_base(d3d, info);
|
||||
@ -847,6 +847,7 @@ static void d3d_free(void *data)
|
||||
#endif
|
||||
|
||||
d3d_device_free(d3d->dev, g_pD3D);
|
||||
d3d->dev = NULL;
|
||||
g_pD3D = NULL;
|
||||
|
||||
win32_monitor_from_window(window, true);
|
||||
|
Loading…
Reference in New Issue
Block a user