Skip to content

Commit d45f35a

Browse files
committed
#382 Fix colorkey issues in Sanitarium
1 parent 3115122 commit d45f35a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ddsurface.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,11 @@ HRESULT dds_GetClipper(IDirectDrawSurfaceImpl* This, IDirectDrawClipperImpl** lp
909909

910910
HRESULT dds_GetColorKey(IDirectDrawSurfaceImpl* This, DWORD dwFlags, LPDDCOLORKEY lpColorKey)
911911
{
912+
if (!(This->flags & DDSD_CKSRCBLT))
913+
{
914+
return DDERR_NOCOLORKEY;
915+
}
916+
912917
if (dwFlags != DDCKEY_SRCBLT || !lpColorKey)
913918
{
914919
TRACE(" NOT_IMPLEMENTED dwFlags=%08X, lpColorKey=%p\n", dwFlags, lpColorKey);

0 commit comments

Comments
 (0)