Skip to content

Commit 5a80bc9

Browse files
authored
[Dd7To9] Remove D3DLOCK_DONOTWAIT flag from textures before locking them (#403)
# D3D9 does not allow the D3DLOCK_DONOTWAIT flag to be used when locking textures. This caused textures to fail to lock when d3d9to9ex was enabled.
1 parent a45d01f commit 5a80bc9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Dllmain/BuildNo.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#define BUILD_NUMBER 7845
1+
#define BUILD_NUMBER 7846

ddraw/IDirectDrawSurfaceX.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8262,6 +8262,7 @@ HRESULT m_IDirectDrawSurfaceX::LockD3d9Surface(D3DLOCKED_RECT* pLockedRect, RECT
82628262
// Lock surface texture
82638263
else if (surface.Texture)
82648264
{
8265+
Flags &= ~D3DLOCK_DONOTWAIT;
82658266
HRESULT hr = surface.Texture->LockRect(GetD3d9MipMapLevel(MipMapLevel), pLockedRect, pRect, Flags);
82668267
if (FAILED(hr) && (Flags & D3DLOCK_NOSYSLOCK))
82678268
{

0 commit comments

Comments
 (0)