mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
D3D9: use new during init so that constructors are run
This commit is contained in:
parent
d129258c32
commit
43b209a5c0
@ -576,6 +576,8 @@ static void d3d_free(void *data)
|
|||||||
#endif
|
#endif
|
||||||
DestroyWindow(d3d->hWnd);
|
DestroyWindow(d3d->hWnd);
|
||||||
|
|
||||||
|
delete d3d;
|
||||||
|
|
||||||
#ifndef _XBOX
|
#ifndef _XBOX
|
||||||
UnregisterClass("RetroArch", GetModuleHandle(NULL));
|
UnregisterClass("RetroArch", GetModuleHandle(NULL));
|
||||||
#endif
|
#endif
|
||||||
@ -1083,7 +1085,7 @@ static const gfx_ctx_driver_t *d3d_get_context(void)
|
|||||||
static void *d3d_init(const video_info_t *info, const input_driver_t **input,
|
static void *d3d_init(const video_info_t *info, const input_driver_t **input,
|
||||||
void **input_data)
|
void **input_data)
|
||||||
{
|
{
|
||||||
D3DVideo *vid = (D3DVideo*)calloc(1, sizeof(D3DVideo));
|
D3DVideo *vid = new D3DVideo;
|
||||||
if (!vid)
|
if (!vid)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user