@@ -95,26 +95,6 @@ HRESULT Direct3DSwapChain9_LSS::reset(const D3DPRESENT_PARAMETERS &pPresentParam
9595
9696 m_monitor = nullptr ;
9797 }
98- if (modifyWindow && (
99- pPresentParams.BackBufferWidth != prevPresentParams.BackBufferWidth ||
100- pPresentParams.BackBufferHeight != prevPresentParams.BackBufferHeight )) {
101-
102- // Adjust window position and size
103- RECT newRect = { 0 , 0 , 0 , 0 };
104- RECT oldRect = { 0 , 0 , 0 , 0 };
105- ::GetWindowRect (m_window, &oldRect);
106- ::MapWindowPoints (HWND_DESKTOP, ::GetParent(m_window), reinterpret_cast<POINT*>(&oldRect), 1);
107- ::SetRect (&newRect, 0 , 0 , pPresentParams.BackBufferWidth, pPresentParams.BackBufferHeight);
108- ::AdjustWindowRectEx (&newRect,
109- ::GetWindowLongW (m_window, GWL_STYLE), FALSE,
110- ::GetWindowLongW(m_window, GWL_EXSTYLE));
111- ::SetRect (&newRect, 0 , 0 , newRect.right - newRect.left, newRect.bottom - newRect.top);
112- ::OffsetRect (&newRect, oldRect.left, oldRect.top);
113- // Should use SetWindowPos rather than MoveWindow to avoid cross process deadlock
114- ::SetWindowPos (m_window, nullptr , newRect.left, newRect.top,
115- newRect.right - newRect.left, newRect.bottom - newRect.top, SWP_NOACTIVATE | SWP_NOZORDER | SWP_ASYNCWINDOWPOS);
116- Logger::info (format_string(" Window's position is reset with change in backbuffer metrics. PreviousBackBufferWidth: %d, PreviousBackBufferHeight: %d, CurrentBackBufferWidth: %d, CurrentBackBufferHeight: %d" , prevPresentParams.BackBufferWidth, prevPresentParams.BackBufferHeight, pPresentParams.BackBufferWidth, pPresentParams.BackBufferHeight));
117- }
11898 }
11999 else {
120100 if (modifyWindow) {
0 commit comments