MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / RetargetPidClone

Method RetargetPidClone

IntelPresentMon/Core/source/kernel/Overlay.cpp:556–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

554 return pNewOverlay;
555 }
556 std::unique_ptr<Overlay> Overlay::RetargetPidClone(::pmon::util::win::Process proc_)
557 {
558 pmlog_info("doing RetargetPidClone");
559
560 std::optional<Vec2I> pos;
561 if (pWindow->Standard()) {
562 pos = pWindow->GetPosition();
563 }
564
565 pm->StopTracking();
566 auto pNewOverlay = std::make_unique<Overlay>(
567 proc_,
568 std::move(pSpec),
569 pm,
570 std::make_unique<MetricPackMapper>(),
571 headless,
572 pos
573 );
574 // clear pm so that stream isn't closed when this overlay dies
575 // (because we manually close it above)
576 pm = nullptr;
577 return pNewOverlay;
578 }
579
580 const gfx::RectI& Overlay::GetTargetRect() const
581 {

Callers 3

RunTickMethod · 0.80
RegisterWindowSpawnMethod · 0.80

Calls 3

GetPositionMethod · 0.80
StandardMethod · 0.45
StopTrackingMethod · 0.45

Tested by

no test coverage detected