Skip to content

Commit e885340

Browse files
authored
Fix crash on fresh installations
1 parent eb276d1 commit e885340

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Client/core/DXHook/CProxyDirect3DDevice9.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,6 @@ CProxyDirect3DDevice9::CProxyDirect3DDevice9(IDirect3DDevice9* pDevice)
181181
DeviceState.AdapterState.InstalledMemoryKB, DeviceState.AdapterState.MaxAnisotropicSetting));
182182
}
183183

184-
// Give a default value for the streaming memory setting
185-
if (g_pCore->GetCVars()->Exists("streaming_memory") == false)
186-
g_pCore->GetCVars()->Set("streaming_memory", g_pCore->GetMaxStreamingMemory());
187-
188184
const uint64_t registrationToken = RegisterProxyDevice(this);
189185
struct RegistrationGuard
190186
{
@@ -202,6 +198,10 @@ CProxyDirect3DDevice9::CProxyDirect3DDevice9(IDirect3DDevice9* pDevice)
202198

203199
m_registrationToken = registrationToken;
204200

201+
// Give a default value for the streaming memory setting
202+
if (g_pCore->GetCVars()->Exists("streaming_memory") == false)
203+
g_pCore->GetCVars()->Set("streaming_memory", g_pCore->GetMaxStreamingMemory());
204+
205205
CDirect3DEvents9::OnDirect3DDeviceCreate(m_pDevice);
206206

207207
registrationGuard.Dismiss();

0 commit comments

Comments
 (0)