Skip to content

Commit

Permalink
[dxgi] Use back buffer size to determine fullscreen resolution
Browse files Browse the repository at this point in the history
This is the correct behaviour on Windows and may fix some issues.
  • Loading branch information
doitsujin committed Jul 12, 2018
1 parent 2100d7a commit 9de3a61
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/dxgi/dxgi_swapchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,11 +552,9 @@ namespace dxvk {
::GetWindowRect(m_window, &m_windowState.rect);

if (m_desc.Flags & DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH) {
auto windowRect = m_windowState.rect;

DXGI_MODE_DESC displayMode;
displayMode.Width = windowRect.right - windowRect.left;
displayMode.Height = windowRect.bottom - windowRect.top;
displayMode.Width = m_desc.Width;
displayMode.Height = m_desc.Height;
displayMode.RefreshRate = m_descFs.RefreshRate;
displayMode.Format = m_desc.Format;
displayMode.ScanlineOrdering = m_descFs.ScanlineOrdering;
Expand Down

0 comments on commit 9de3a61

Please sign in to comment.