Skip to content

Commit

Permalink
Always use multi-threaded device
Browse files Browse the repository at this point in the history
  • Loading branch information
elishacloud committed Sep 1, 2023
1 parent fcef8a4 commit 8cde797
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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 6785
#define BUILD_NUMBER 6786
6 changes: 3 additions & 3 deletions ddraw/IDirectDrawX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2916,7 +2916,7 @@ HRESULT m_IDirectDrawX::CreateD3D9Device()

// Set behavior flags
BehaviorFlags = (d3dcaps.VertexProcessingCaps ? D3DCREATE_HARDWARE_VERTEXPROCESSING : D3DCREATE_SOFTWARE_VERTEXPROCESSING) |
(!Config.SingleProcAffinity ? D3DCREATE_MULTITHREADED : 0) |
D3DCREATE_MULTITHREADED |
(Device.FPUPreserve ? D3DCREATE_FPU_PRESERVE : 0) |
(Device.NoWindowChanges ? D3DCREATE_NOWINDOWCHANGES : 0);

Expand Down Expand Up @@ -3093,8 +3093,8 @@ HRESULT m_IDirectDrawX::ReinitDevice()
return DDERR_GENERIC;
}

EnterCriticalSection(&PresentThread.ddpt);
SetCriticalSection();
EnterCriticalSection(&PresentThread.ddpt);

do {
// Prepare for reset
Expand All @@ -3121,8 +3121,8 @@ HRESULT m_IDirectDrawX::ReinitDevice()

} while (false);

ReleaseCriticalSection();
LeaveCriticalSection(&PresentThread.ddpt);
ReleaseCriticalSection();

// Success
return hr;
Expand Down

0 comments on commit 8cde797

Please sign in to comment.