mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
Do not free DirectDraw ever, avoids crashing issue on exit with Red Alert, real surface can be freed
This commit is contained in:
parent
c7bda1c01c
commit
b2c1500c70
2
main.c
2
main.c
@ -379,7 +379,7 @@ ULONG __stdcall ddraw_Release(IDirectDrawImpl *This)
|
|||||||
|
|
||||||
if(This->Ref == 0)
|
if(This->Ref == 0)
|
||||||
{
|
{
|
||||||
free(This);
|
//free(This);
|
||||||
ddraw = NULL;
|
ddraw = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -53,13 +53,12 @@ ULONG __stdcall ddraw_surface_Release(IDirectDrawSurfaceImpl *This)
|
|||||||
}
|
}
|
||||||
if(This->surface)
|
if(This->surface)
|
||||||
{
|
{
|
||||||
//free(This->surface);
|
free(This->surface);
|
||||||
}
|
}
|
||||||
if(This->palette)
|
if(This->palette)
|
||||||
{
|
{
|
||||||
IDirectDrawPalette_Release(This->palette);
|
IDirectDrawPalette_Release(This->palette);
|
||||||
}
|
}
|
||||||
/* FIXME: crashing on 64bit windows, investigate! */
|
|
||||||
//free(This);
|
//free(This);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user