Skip to content

Commit

Permalink
Fix available memory issue
Browse files Browse the repository at this point in the history
  • Loading branch information
elishacloud committed Sep 10, 2024
1 parent 980a3dc commit c8d8b75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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 7131
#define BUILD_NUMBER 7132
4 changes: 2 additions & 2 deletions ddraw/IDirectDrawX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2061,7 +2061,7 @@ HRESULT m_IDirectDrawX::GetAvailableVidMem2(LPDDSCAPS2 lpDDSCaps2, LPDWORD lpdwT
// Memory acquired using D3DDDI
}
// Failover to texture memory if DDI does not work
else if (d3d9Device)
else
{
GetTextureMemory(AvailableMemory);
}
Expand Down Expand Up @@ -2137,7 +2137,7 @@ void m_IDirectDrawX::GetTextureMemory(DWORD& AvailableMemory)
LOG_LIMIT(100, __FUNCTION__ << " Creating temporary Direct3D9 device");

// Try to get the main window's HWND
HWND hWnd = Fullscreen::FindMainWindow(GetCurrentProcessId(), true);
HWND hWnd = nullptr;

// If no main window exists, create a temporary one
bool createdTemporaryWindow = false;
Expand Down

0 comments on commit c8d8b75

Please sign in to comment.