MCPcopy Create free account
hub / github.com/Aleksoid1978/VideoRenderer / UpdateDisplayInfo

Method UpdateDisplayInfo

Source/VideoRenderer.cpp:600–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

598}
599
600void CMpcVideoRenderer::UpdateDisplayInfo()
601{
602 const HMONITOR hMonPrimary = MonitorFromPoint(CPoint(0, 0), MONITOR_DEFAULTTOPRIMARY);
603
604 MONITORINFOEXW mi = { sizeof(mi) };
605 GetMonitorInfoW(m_hMon, (MONITORINFO*)&mi);
606
607 bool ret = GetDisplayConfig(mi.szDevice, m_DisplayConfig);
608 if (m_hMon == hMonPrimary) {
609 m_bPrimaryDisplay = true;
610 } else {
611 m_bPrimaryDisplay = false;
612 }
613
614 m_VideoProcessor->SetDisplayInfo(m_DisplayConfig, m_bPrimaryDisplay, m_bExclusiveScreen);
615}
616
617void CMpcVideoRenderer::OnDisplayModeChange(const bool bReset/* = false*/)
618{

Callers 1

InitSwapChainMethod · 0.80

Calls 2

GetDisplayConfigFunction · 0.85
SetDisplayInfoMethod · 0.80

Tested by

no test coverage detected