mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-13 23:26:16 +00:00
Windows build fixes and cleanups
This commit is contained in:
@@ -101,15 +101,6 @@ struct Boo3DAppContextWin32 : Boo3DAppContext
|
||||
}
|
||||
#endif
|
||||
|
||||
#if _WIN32_WINNT_WIN10
|
||||
if (m_ctx12.m_dev)
|
||||
{
|
||||
D3D12Context::Window& win = m_ctx12.m_windows[window];
|
||||
BOOL isFScr;
|
||||
win.m_swapChain->GetFullscreenState(&isFScr, nullptr);
|
||||
return isFScr != 0;
|
||||
}
|
||||
#endif
|
||||
if (m_ctx11.m_dev)
|
||||
{
|
||||
D3D11Context::Window& win = m_ctx11.m_windows[window];
|
||||
@@ -136,34 +127,6 @@ struct Boo3DAppContextWin32 : Boo3DAppContext
|
||||
}
|
||||
#endif
|
||||
|
||||
#if _WIN32_WINNT_WIN10
|
||||
if (m_ctx12.m_dev)
|
||||
{
|
||||
D3D12Context::Window& win = m_ctx12.m_windows[window];
|
||||
BOOL isFScr;
|
||||
win.m_swapChain->GetFullscreenState(&isFScr, nullptr);
|
||||
if (fs && isFScr)
|
||||
return false;
|
||||
else if (!fs && !isFScr)
|
||||
return false;
|
||||
|
||||
if (fs)
|
||||
{
|
||||
ComPtr<IDXGIOutput> out;
|
||||
win.m_swapChain->GetContainingOutput(&out);
|
||||
DXGI_OUTPUT_DESC outDesc;
|
||||
out->GetDesc(&outDesc);
|
||||
|
||||
win.m_swapChain->SetFullscreenState(true, nullptr);
|
||||
DXGI_MODE_DESC mdesc = {UINT(outDesc.DesktopCoordinates.right - outDesc.DesktopCoordinates.left),
|
||||
UINT(outDesc.DesktopCoordinates.bottom - outDesc.DesktopCoordinates.top)};
|
||||
win.m_swapChain->ResizeTarget(&mdesc);
|
||||
}
|
||||
else
|
||||
win.m_swapChain->SetFullscreenState(false, nullptr);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
if (m_ctx11.m_dev)
|
||||
{
|
||||
D3D11Context::Window& win = m_ctx11.m_windows[window];
|
||||
|
||||
Reference in New Issue
Block a user