I need to release the swapchain but looks like it needs to be put it back in windowed mode.
DXGI ERROR: IDXGISwapChain::Release: Swapchain Released while fullscreen. Switch it to the windowed state first. [ MISCELLANEOUS ERROR #66: ]
Anyone knows the simplest way to accomplish this?
To release a swap chain, you should do two things. First, release the render target view and depth/stencil view (if there is one) which are attached to the swap chain. Second put the swap chain in windowed mode: