mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
fix: 优化 Desktop Duplication 的流畅度
This commit is contained in:
parent
164c746425
commit
1e293ca685
1 changed files with 4 additions and 2 deletions
|
|
@ -234,8 +234,10 @@ FrameSourceBase::UpdateState DesktopDuplicationFrameSource::Update() {
|
|||
return UpdateState::NoUpdate;
|
||||
}
|
||||
|
||||
App::GetInstance().GetRenderer().GetD3DDC()->CopySubresourceRegion(
|
||||
_output.Get(), 0, 0, 0, 0, d3dRes.Get(), 0, &_frameInMonitor);
|
||||
const auto& d3dDC = App::GetInstance().GetRenderer().GetD3DDC();
|
||||
d3dDC->CopySubresourceRegion(_output.Get(), 0, 0, 0, 0, d3dRes.Get(), 0, &_frameInMonitor);
|
||||
// 强制 GPU 立即复制,因为此函数退出后该纹理即失效
|
||||
d3dDC->Flush();
|
||||
|
||||
_firstFrame = false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue