Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/apps
diff options
context:
space:
mode:
authorAleksoid <aleksoid@users.sourceforge.net>2010-03-06 11:10:15 +0300
committerAleksoid <aleksoid@users.sourceforge.net>2010-03-06 11:10:15 +0300
commitacd4ad4a02c404bc5d9f3b44bb7b2c8e64a1f7f4 (patch)
tree5f4850261822d8bd4963256f06f6525ec77abf62 /src/apps
parent552117f1d4d186f11fc5b256aa284c01e8bab810 (diff)
Add : statistics - add render device;
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1735 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps')
-rw-r--r--src/apps/mplayerc/DX9AllocatorPresenter.cpp26
-rw-r--r--src/apps/mplayerc/DX9AllocatorPresenter.h2
2 files changed, 25 insertions, 3 deletions
diff --git a/src/apps/mplayerc/DX9AllocatorPresenter.cpp b/src/apps/mplayerc/DX9AllocatorPresenter.cpp
index 3c0239493..eb2978132 100644
--- a/src/apps/mplayerc/DX9AllocatorPresenter.cpp
+++ b/src/apps/mplayerc/DX9AllocatorPresenter.cpp
@@ -1290,13 +1290,17 @@ UINT CDX9AllocatorPresenter::GetAdapter(IDirect3D9* pD3D, bool CreateDevice)
{
TCHAR strGUID[50];
D3DADAPTER_IDENTIFIER9 adapterIdentifier;
-
+ m_D3D9Device = _T("");
+
for(UINT adp = 0, num_adp = pD3D->GetAdapterCount(); adp < num_adp; ++adp)
{
if (pD3D->GetAdapterIdentifier(adp, 0, &adapterIdentifier) == S_OK)
{
if ((::StringFromGUID2(adapterIdentifier.DeviceIdentifier, strGUID, 50) > 0) && (s.D3D9RenderDevice == strGUID))
+ {
+ m_D3D9Device = adapterIdentifier.Description;
return adp;
+ }
}
}
}
@@ -1307,7 +1311,16 @@ UINT CDX9AllocatorPresenter::GetAdapter(IDirect3D9* pD3D, bool CreateDevice)
for(UINT adp = 0, num_adp = pD3D->GetAdapterCount(); adp < num_adp; ++adp)
{
HMONITOR hAdpMon = pD3D->GetAdapterMonitor(adp);
- if(hAdpMon == hMonitor) return adp;
+ if(hAdpMon == hMonitor)
+ {
+ if(CreateDevice)
+ {
+ D3DADAPTER_IDENTIFIER9 adapterIdentifier;
+ if (pD3D->GetAdapterIdentifier(adp, 0, &adapterIdentifier) == S_OK)
+ m_D3D9Device = adapterIdentifier.Description;
+ }
+ return adp;
+ }
}
return D3DADAPTER_DEFAULT;
@@ -3062,11 +3075,18 @@ void CDX9AllocatorPresenter::DrawStats()
strText.Format(L"%-13s: %s", GetDXVAVersion(), GetDXVADecoderDescription());
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
+
+ if(m_D3D9Device != _T(""))
+ {
+ strText = "Render device: " + m_D3D9Device;
+ DrawText(rc, strText, 1);
+ OffsetRect (&rc, 0, TextHeight);
+ }
strText.Format(L"DirectX SDK : %d", AfxGetMyApp()->GetDXSdkRelease());
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
-
+
for (int i=0; i<6; i++)
{
if (m_strStatsMsg[i][0])
diff --git a/src/apps/mplayerc/DX9AllocatorPresenter.h b/src/apps/mplayerc/DX9AllocatorPresenter.h
index 07c563bd8..d54a699d3 100644
--- a/src/apps/mplayerc/DX9AllocatorPresenter.h
+++ b/src/apps/mplayerc/DX9AllocatorPresenter.h
@@ -346,6 +346,8 @@ namespace DSObjects
LONGLONG m_LastSampleTime;
CString m_strStatsMsg[10];
+
+ CString m_D3D9Device;
public:
CDX9AllocatorPresenter(HWND hWnd, HRESULT& hr, bool bIsEVR, CString &_Error);