From 18d59732724500f094510cece80afd83e3256282 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 1 Apr 2018 13:03:19 -0700 Subject: Added comment --- Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineD3DBase') diff --git a/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.h b/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.h index 743c9793..9f69d55b 100644 --- a/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.h +++ b/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.h @@ -49,9 +49,10 @@ namespace Diligent ~SwapChainD3DBase() { - // Swap chain must be in windowed mode when terminating the app if (m_pSwapChain) { + // Swap chain must be in windowed mode when it is destroyed + // https://msdn.microsoft.com/en-us/library/windows/desktop/bb205075(v=vs.85).aspx#Destroying BOOL IsFullScreen = FALSE; m_pSwapChain->GetFullscreenState(&IsFullScreen, nullptr); if (IsFullScreen) @@ -173,6 +174,7 @@ namespace Diligent { // If we are already in fullscreen mode, we need to switch to windowed mode first, // because a swap chain must be in windowed mode when it is released. + // https://msdn.microsoft.com/en-us/library/windows/desktop/bb205075(v=vs.85).aspx#Destroying if (m_FSDesc.Fullscreen) m_pSwapChain->SetFullscreenState(FALSE, nullptr); m_FSDesc.Fullscreen = True; -- cgit v1.2.3