ソースを参照

Fix some uninitialized variables (#2182)

Gary Hsu 5 年 前
コミット
34fbc579ea
1 ファイル変更3 行追加2 行削除
  1. 3 2
      src/renderer_d3d11.cpp

+ 3 - 2
src/renderer_d3d11.cpp

@@ -686,6 +686,7 @@ namespace bgfx { namespace d3d11
 			, m_rtMsaa(false)
 			, m_rtMsaa(false)
 			, m_timerQuerySupport(false)
 			, m_timerQuerySupport(false)
 			, m_directAccessSupport(false)
 			, m_directAccessSupport(false)
+			, m_needPresent(false)
 		{
 		{
 			m_fbh.idx = kInvalidHandle;
 			m_fbh.idx = kInvalidHandle;
 			bx::memSet(&m_scd, 0, sizeof(m_scd) );
 			bx::memSet(&m_scd, 0, sizeof(m_scd) );
@@ -989,6 +990,8 @@ namespace bgfx { namespace d3d11
 					m_nvapi.shutdown();
 					m_nvapi.shutdown();
 				}
 				}
 
 
+				m_msaaRt = NULL;
+
 				if (NULL == g_platformData.backBuffer)
 				if (NULL == g_platformData.backBuffer)
 				{
 				{
 					HRESULT hr = S_OK;
 					HRESULT hr = S_OK;
@@ -1029,8 +1032,6 @@ namespace bgfx { namespace d3d11
 					m_scd.ndt             = g_platformData.ndt;
 					m_scd.ndt             = g_platformData.ndt;
 					m_scd.windowed        = true;
 					m_scd.windowed        = true;
 
 
-					m_msaaRt = NULL;
-
 					if (NULL != m_scd.nwh)
 					if (NULL != m_scd.nwh)
 					{
 					{
 						hr = m_dxgi.createSwapChain(m_device
 						hr = m_dxgi.createSwapChain(m_device