Skip to content

Commit 8eb3eeb

Browse files
committed
[d3d9] Don't end scene in Reset on Ex device
Doesn't match what Windows does.
1 parent 9f4cb69 commit 8eb3eeb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/d3d9/d3d9_device.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,12 @@ namespace dxvk {
492492
ResetState(pPresentationParameters);
493493
m_implicitSwapchain->DestroyBackBuffers();
494494
m_autoDepthStencil = nullptr;
495+
496+
// Tests show that regular D3D9 ends the scene in Reset
497+
// while D3D9Ex doesn't.
498+
// Observed in Empires: Dawn of the Modern World (D3D8)
499+
// and the OSU compatibility mode (D3D9Ex).
500+
m_flags.clr(D3D9DeviceFlag::InScene);
495501
} else {
496502
// Extended devices only reset the bound render targets
497503
for (uint32_t i = 0; i < caps::MaxSimultaneousRenderTargets; i++) {
@@ -500,7 +506,6 @@ namespace dxvk {
500506
SetDepthStencilSurface(nullptr);
501507
}
502508

503-
m_flags.clr(D3D9DeviceFlag::InScene);
504509
m_cursor.ResetCursor();
505510

506511
/*

0 commit comments

Comments
 (0)