MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/HBAOPlus / GetDisplayResolution

Method GetDisplayResolution

samples/D3D11/src/DeviceManager.cpp:573–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571}
572
573HRESULT
574DeviceManager::GetDisplayResolution(int& width, int& height)
575{
576 if(m_hWnd != INVALID_HANDLE_VALUE)
577 {
578 HMONITOR monitor = MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTOPRIMARY);
579 MONITORINFO info;
580 info.cbSize = sizeof(MONITORINFO);
581
582 if(GetMonitorInfo(monitor, &info))
583 {
584 width = info.rcMonitor.right - info.rcMonitor.left;
585 height = info.rcMonitor.bottom - info.rcMonitor.top;
586 return S_OK;
587 }
588 }
589
590 return E_FAIL;
591}
592
593IDXGIAdapter*
594DeviceManager::GetDXGIAdapter()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected