mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-27 06:11:51 +00:00
Create d3d_device_free
This commit is contained in:
parent
4504c9fba1
commit
56a17b21f1
@ -502,3 +502,16 @@ bool d3d_reset(LPDIRECT3DDEVICE dev, D3DPRESENT_PARAMETERS *d3dpp)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void d3d_device_free(LPDIRECT3DDEVICE dev, LPDIRECT3D pd3d)
|
||||
{
|
||||
if (!dev)
|
||||
return;
|
||||
|
||||
dev->Release();
|
||||
|
||||
if (!pd3d)
|
||||
return;
|
||||
|
||||
pd3d->Release();
|
||||
}
|
||||
|
@ -111,6 +111,8 @@ void d3d_set_render_state(void *data, D3DRENDERSTATETYPE state, DWORD value);
|
||||
|
||||
bool d3d_reset(LPDIRECT3DDEVICE dev, D3DPRESENT_PARAMETERS *d3dpp);
|
||||
|
||||
void d3d_device_free(LPDIRECT3DDEVICE dev, LPDIRECT3D pd3d);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -834,10 +834,7 @@ static void d3d_free(void *data)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (d3d->dev)
|
||||
d3d->dev->Release();
|
||||
if (d3d->g_pD3D)
|
||||
d3d->g_pD3D->Release();
|
||||
d3d_device_free(d3d->dev);
|
||||
|
||||
win32_monitor_from_window(window, true);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user