mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
#212 add temp hack for baldr force exe
This commit is contained in:
parent
4dfb65f66c
commit
d366559506
@ -41,6 +41,7 @@ typedef struct IDirectDrawSurfaceImpl
|
||||
DDCOLORKEY color_key;
|
||||
DWORD last_flip_tick;
|
||||
DWORD last_blt_tick;
|
||||
BOOL queried;
|
||||
|
||||
struct IDirectDrawSurfaceImpl* backbuffer;
|
||||
struct IDirectDrawClipperImpl* clipper;
|
||||
|
@ -23,6 +23,8 @@ HRESULT __stdcall IDirectDrawSurface__QueryInterface(IDirectDrawSurfaceImpl* Thi
|
||||
|
||||
IDirectDrawSurface_AddRef(This);
|
||||
|
||||
This->queried = TRUE; /* Hack for Baldr Force exe */
|
||||
|
||||
*ppvObj = This;
|
||||
|
||||
ret = S_OK;
|
||||
@ -70,6 +72,12 @@ ULONG __stdcall IDirectDrawSurface__Release(IDirectDrawSurfaceImpl* This)
|
||||
|
||||
ULONG ret = --This->ref;
|
||||
|
||||
if (This->queried && ret == 1) /* Hack for Baldr Force exe */
|
||||
{
|
||||
This->queried = FALSE;
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
if (This->ref == 0)
|
||||
{
|
||||
TRACE(" Released (%p)\n", This);
|
||||
|
Loading…
x
Reference in New Issue
Block a user