Skip to content

Commit

Permalink
Fix subpic texture size issue when switching to fullscreen exclusive …
Browse files Browse the repository at this point in the history
…with MPCVR
  • Loading branch information
clsid2 committed Mar 27, 2022
1 parent ed5fb6c commit 2aeebb7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/SubPic/SubPicAllocatorPresenterImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ STDMETHODIMP_(void) CSubPicAllocatorPresenterImpl::SetPosition(RECT w, RECT v)
if (m_windowRect.Width() * m_windowRect.Height() <= maxpixels) {
// use window size
m_curSubtitleTextureSize = CSize(m_windowRect.Width(), m_windowRect.Height());
m_pAllocator->SetMaxTextureSize(m_curSubtitleTextureSize);
} else {
bool correct_ar = false;
if (m_maxSubtitleTextureSize.cx == 2560 && m_windowRect.Width() >= 3800 && m_windowRect.Width() <= 4096) { // not 3840, to handle a maximized window as well
Expand All @@ -178,11 +177,10 @@ STDMETHODIMP_(void) CSubPicAllocatorPresenterImpl::SetPosition(RECT w, RECT v)
m_curSubtitleTextureSize.cx = lround(new_w);
m_curSubtitleTextureSize.cy = lround(new_h);
}

m_pAllocator->SetMaxTextureSize(m_curSubtitleTextureSize);
}
}

m_pAllocator->SetMaxTextureSize(m_curSubtitleTextureSize);
m_pAllocator->SetCurSize(m_windowRect.Size());
m_pAllocator->SetCurVidRect(m_videoRect);

Expand Down

0 comments on commit 2aeebb7

Please sign in to comment.