forked from cafeberry/cafeberry
double initialization?
This commit is contained in:
@@ -540,10 +540,10 @@ HRESULT InitDevice()
|
||||
hr = D3D11CreateDeviceAndSwapChain( NULL, g_driverType, NULL, createDeviceFlags, featureLevels, numFeatureLevels,
|
||||
D3D11_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice, &g_featureLevel, &g_pImmediateContext );
|
||||
|
||||
if (hr == E_INVALIDARG && numFeatureLevels > 1 && featureLevels[0] == D3D_FEATURE_LEVEL_11_1)
|
||||
{
|
||||
hr = D3D11CreateDeviceAndSwapChain( NULL, g_driverType, NULL, createDeviceFlags, &featureLevels[1], numFeatureLevels - 1,
|
||||
D3D11_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice, &g_featureLevel, &g_pImmediateContext );
|
||||
if (hr == E_INVALIDARG && numFeatureLevels > 1 && featureLevels[0] == D3D_FEATURE_LEVEL_11_1)
|
||||
{
|
||||
hr = D3D11CreateDeviceAndSwapChain( NULL, g_driverType, NULL, createDeviceFlags, &featureLevels[1], numFeatureLevels - 1,
|
||||
D3D11_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice, &g_featureLevel, &g_pImmediateContext );
|
||||
}
|
||||
|
||||
if( SUCCEEDED( hr ) )
|
||||
@@ -752,7 +752,8 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
RenderManager.SetVSync(false); //str1k3r - vsync is set to true by default in 4JLibs
|
||||
}
|
||||
|
||||
RenderManager.Initialise(g_pd3dDevice, g_pSwapChain);
|
||||
//univ - is this intentional?
|
||||
// RenderManager.Initialise(g_pd3dDevice, g_pSwapChain);
|
||||
|
||||
//str1k3r - set the resolution that we have at time of launch
|
||||
RenderManager.setResolution(g_iScreenWidth, g_iScreenHeight);
|
||||
|
||||
Reference in New Issue
Block a user