DXGL r937 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r936‎ | r937 | r938 >
Date:11:48, 16 August 2019
Author:admin
Status:new
Tags:
Comment:
Set dirty flag when unlocking already unlocked surface.
Fixes intro videos in Lands of Lore III.
Modified paths:
  • /ddraw/glDirectDrawSurface.cpp (modified) (history)

Diff [purge]

Index: ddraw/glDirectDrawSurface.cpp
@@ -1677,7 +1677,11 @@
16781678 {
16791679 TRACE_ENTER(2,14,this,26,lpRect);
16801680 if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
1681 - if (!locked) TRACE_RET(HRESULT, 23, DDERR_NOTLOCKED);
 1681+ if (!locked)
 1682+ {
 1683+ this->texture->levels[this->miplevel].dirty |= 1;
 1684+ TRACE_RET(HRESULT, 23, DDERR_NOTLOCKED);
 1685+ }
16821686 locked--;
16831687 glTexture_Unlock(this->texture, this->miplevel, lpRect, FALSE);
16841688 ddsd.lpSurface = NULL;