Skip to content

Commit

Permalink
Check for BeginScene earlier in PresentSurface()
Browse files Browse the repository at this point in the history
  • Loading branch information
elishacloud committed Sep 8, 2024
1 parent 9069b6f commit d5aa5d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Dllmain/BuildNo.rc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define BUILD_NUMBER 7123
#define BUILD_NUMBER 7124
8 changes: 1 addition & 7 deletions ddraw/IDirectDrawSurfaceX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5140,7 +5140,7 @@ HRESULT m_IDirectDrawSurfaceX::PresentSurface(bool IsSkipScene)
}

// Check if is not primary surface or if scene should be skipped
if (ShouldWriteToGDI() || ShouldPresentToWindow(true))
if (ShouldWriteToGDI() || ShouldPresentToWindow(true) || ddrawParent->IsInScene())
{
// Never present when using Direct3D or when writing to GDI
return DD_OK;
Expand All @@ -5166,12 +5166,6 @@ HRESULT m_IDirectDrawSurfaceX::PresentSurface(bool IsSkipScene)
// Set scene ready
SceneReady = true;

// Check if device is already inscene
if (ddrawParent->IsInScene())
{
return DD_OK;
}

// Check if surface is locked or has an open DC
if (IsSurfaceBusy())
{
Expand Down

0 comments on commit d5aa5d7

Please sign in to comment.