Skip to content

Commit

Permalink
Fix D3DXLoadSurfaceFromSurface offplain to texture
Browse files Browse the repository at this point in the history
Don't use D3DXLoadSurfaceFromSurface when copying from offplain to texture
  • Loading branch information
elishacloud committed Sep 9, 2024
1 parent 7459793 commit 95447d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dllmain/BuildNo.rc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define BUILD_NUMBER 7126
#define BUILD_NUMBER 7127
1 change: 1 addition & 0 deletions ddraw/IDirectDrawSurfaceX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6308,6 +6308,7 @@ HRESULT m_IDirectDrawSurfaceX::CopySurface(m_IDirectDrawSurfaceX* pSourceSurface

// Use D3DXLoadSurfaceFromSurface to copy the surface
if (!IsUsingEmulation() && !IsColorKey && !IsMirrorLeftRight && !IsMirrorUpDown &&
pSourceSurface->surface.Type == surface.Type && // D3DXLoadSurfaceFromSurface is very slow when copying from offplain to texture
!surface.UsingSurfaceMemory && !pSourceSurface->surface.UsingSurfaceMemory &&
(pSourceSurface->IsPalette() == IsPalette()))
{
Expand Down

0 comments on commit 95447d1

Please sign in to comment.