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

Method ResetInternal

Source/DX9VideoProcessor.cpp:620–651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618}
619
620HRESULT CDX9VideoProcessor::ResetInternal()
621{
622 DLog(L"CDX9VideoProcessor::ResetInternal()");
623 HRESULT hr = S_OK;
624
625 g_bInitVP = true;
626
627 if (m_pFilter->m_bExclusiveScreen) {
628 ZeroMemory(&m_DisplayMode, sizeof(D3DDISPLAYMODEEX));
629 m_DisplayMode.Size = sizeof(D3DDISPLAYMODEEX);
630 HRESULT hr = m_pD3DEx->GetAdapterDisplayModeEx(m_nCurrentAdapter, &m_DisplayMode, nullptr);
631 DLog(L"Display Mode: {}x{}, {}{}", m_DisplayMode.Width, m_DisplayMode.Height, m_DisplayMode.RefreshRate, (m_DisplayMode.ScanLineOrdering == D3DSCANLINEORDERING_INTERLACED) ? 'i' : 'p');
632
633 m_d3dpp.BackBufferWidth = m_DisplayMode.Width;
634 m_d3dpp.BackBufferHeight = m_DisplayMode.Height;
635 m_d3dpp.BackBufferFormat = m_DisplayMode.Format;
636 m_d3dpp.FullScreen_RefreshRateInHz = m_DisplayMode.RefreshRate;
637 hr = m_pD3DDevEx->ResetEx(&m_d3dpp, &m_DisplayMode);
638 DLogIf(FAILED(hr), L"CDX9VideoProcessor::ResetInternal() : ResetEx(fullscreen) failed with error {}", HR2Str(hr));
639 } else {
640 hr = m_pD3DDevEx->ResetEx(&m_d3dpp, nullptr);
641 DLogIf(FAILED(hr), L"CDX9VideoProcessor::ResetInternal() : ResetEx() failed with error {}", HR2Str(hr));
642 }
643
644 if (FAILED(hr)) {
645 InitInternal(true, nullptr);
646 }
647
648 g_bInitVP = false;
649
650 return hr;
651}
652
653void CDX9VideoProcessor::ResizeInternal()
654{

Callers

nothing calls this directly

Calls 2

DLogFunction · 0.85
HR2StrFunction · 0.85

Tested by

no test coverage detected