When I call the IDXGISwapChain::SetFullscreenState method, it does not return. The window goes fullscreen, but accepts no further input. A println!() put right after never fires. I am assuming there is some sort of deadlock happening behind the scenes, but the docs don't go into what all it locks.
Does
SetFullscreenStateperform any locking?If so, what does it lock?
What other issues could cause
SetFullscreenStateto never return?
I am using Rust 1.44.1 with winapi 0.3.9. I am passing minwindef::TRUE and a null pointer as arguments (passing minwindef::FALSE returns, but does the opposite of what I want). I am using the following options in the swapchain desc:
desc.BufferCount = 1;
desc.BufferDesc.Width = width;
desc.BufferDesc.Height = height;
desc.BufferDesc.Format = dxgiformat::DXGI_FORMAT_R8G8B8A8_UNORM;
desc.BufferDesc.RefreshRate.Numerator = 60;
desc.BufferDesc.RefreshRate.Denominator = 1;
desc.BufferUsage = dxgitype::DXGI_USAGE_RENDER_TARGET_OUTPUT;
desc.OutputWindow = *hwnd.inner();
desc.SampleDesc.Count = 1;
desc.SampleDesc.Quality = 0;
desc.Flags = dxgi::DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
desc.Windowed = minwindef::TRUE;