diff options
author | Aleksoid <aleksoid@users.sourceforge.net> | 2008-06-29 06:25:40 +0400 |
---|---|---|
committer | Aleksoid <aleksoid@users.sourceforge.net> | 2008-06-29 06:25:40 +0400 |
commit | d36795712be736a7ee7be6428d42fe1ce8b34ad5 (patch) | |
tree | b51d9f9f254e8694e2f96ac9dc33119a2fd69c74 /src/apps/mplayerc/PPageOutput.cpp | |
parent | acf7773d2ffd67fc089d489bef00da8ac6d18a85 (diff) |
ADD : support Multi-Monitor configuration, select Monitor for full-screen playback
FIX : .manifest now support for x64 build
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@612 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/PPageOutput.cpp')
-rw-r--r-- | src/apps/mplayerc/PPageOutput.cpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/apps/mplayerc/PPageOutput.cpp b/src/apps/mplayerc/PPageOutput.cpp index dafd8b52e..18fef892d 100644 --- a/src/apps/mplayerc/PPageOutput.cpp +++ b/src/apps/mplayerc/PPageOutput.cpp @@ -27,6 +27,8 @@ #include "PPageOutput.h"
#include <moreuuids.h>
+#include ".\MultiMonitor\Monitors.h"
+#include ".\MultiMonitor\MultiMonitor.h"
// CPPageOutput dialog
@@ -66,6 +68,9 @@ void CPPageOutput::DoDataExchange(CDataExchange* pDX) DDX_Check(pDX, IDC_DSVMR9YUVMIXER, m_fVMR9MixerYUV);
DDX_Check(pDX, IDC_FULLSCREEN_MONITOR_CHECK, m_fD3DFullscreen);
DDX_CBIndex(pDX, IDC_EVR_BUFFERS, m_iEvrBuffers);
+
+ DDX_CBIndex(pDX, IDC_COMBO2, m_iMonitorType);
+ DDX_Control(pDX, IDC_COMBO2, m_iMonitorTypeCtrl);
}
BEGIN_MESSAGE_MAP(CPPageOutput, CPPageBase)
@@ -105,6 +110,53 @@ BOOL CPPageOutput::OnInitDialog() m_fD3DFullscreen = s.fD3DFullscreen;
m_iEvrBuffers = s.iEvrBuffers-3;
+ // Multi-Monitor code
+ CString str;
+ m_iMonitorType = 0;
+
+ CMonitor monitor;
+ CMonitors monitors;
+
+ m_iMonitorTypeCtrl.AddString(ResStr(IDS_FULLSCREENMONITOR_CURRENT));
+ m_MonitorDisplayNames.Add(_T("Current"));
+ if(s.f_hmonitor == _T("Current"))
+ {
+ m_iMonitorType = m_iMonitorTypeCtrl.GetCount()-1;
+ }
+
+ for ( int i = 0; i < monitors.GetCount(); i++ )
+ {
+ monitor = monitors.GetMonitor( i );
+ monitor.GetName(str);
+
+ if(monitor.IsMonitor())
+ {
+ DISPLAY_DEVICE displayDevice;
+ ZeroMemory(&displayDevice, sizeof(displayDevice));
+ displayDevice.cb = sizeof(displayDevice);
+ VERIFY(EnumDisplayDevices(str, 0, &displayDevice, 0));
+
+ m_iMonitorTypeCtrl.AddString(str+_T(" - ")+displayDevice.DeviceString);
+ m_MonitorDisplayNames.Add(str);
+
+ if(s.f_hmonitor == str && m_iMonitorType == 0)
+ {
+ m_iMonitorType = m_iMonitorTypeCtrl.GetCount()-1;
+ }
+ }
+ }
+
+ //(m_iMonitorTypeCtrl.GetCount() > 2) ? {GetDlgItem(IDC_COMBO2)->EnableWindow(TRUE)} : GetDlgItem(IDC_COMBO2)->EnableWindow(FALSE);
+ if(m_iMonitorTypeCtrl.GetCount() > 2)
+ {
+ GetDlgItem(IDC_COMBO2)->EnableWindow(TRUE);
+ }
+ else
+ {
+ m_iMonitorType = 0;
+ GetDlgItem(IDC_COMBO2)->EnableWindow(FALSE);
+ }
+
m_AudioRendererDisplayNames.Add(_T(""));
m_iAudioRendererTypeCtrl.AddString(_T("System Default"));
m_iAudioRendererType = 0;
@@ -224,6 +276,8 @@ BOOL CPPageOutput::OnApply() s.fD3DFullscreen = m_fD3DFullscreen ? true : false;
s.iEvrBuffers = m_iEvrBuffers+3;
+ s.f_hmonitor = m_MonitorDisplayNames[m_iMonitorType];
+
return __super::OnApply();
}
|