diff options
author | sansnom05 <sansnom05@users.sourceforge.net> | 2010-12-16 16:53:08 +0300 |
---|---|---|
committer | sansnom05 <sansnom05@users.sourceforge.net> | 2010-12-16 16:53:08 +0300 |
commit | f0d88a6ff96770b10031dcc59447cca2c7dbc91c (patch) | |
tree | e188e4e733fcf6fc9b00dc349618c19f4d47a7c9 /src/apps/mplayerc/OpenCapDeviceDlg.cpp | |
parent | 5067b0b48d4d15b24669c8032b28e90e45202801 (diff) |
legacy branch: merge r2662-r2759
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/branches/legacy@2778 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/OpenCapDeviceDlg.cpp')
-rw-r--r-- | src/apps/mplayerc/OpenCapDeviceDlg.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/apps/mplayerc/OpenCapDeviceDlg.cpp b/src/apps/mplayerc/OpenCapDeviceDlg.cpp index 6d901e592..bf2332bdb 100644 --- a/src/apps/mplayerc/OpenCapDeviceDlg.cpp +++ b/src/apps/mplayerc/OpenCapDeviceDlg.cpp @@ -311,6 +311,8 @@ BOOL COpenCapDeviceDlg::OnInitDialog() {
__super::OnInitDialog();
+ AppSettings& s = AfxGetAppSettings();
+
AddAnchor(m_vidctrl, TOP_LEFT, TOP_RIGHT);
AddAnchor(m_audctrl, TOP_LEFT, TOP_RIGHT);
AddAnchor(m_countryctrl, TOP_LEFT, TOP_RIGHT);
@@ -319,15 +321,15 @@ BOOL COpenCapDeviceDlg::OnInitDialog() CRect r;
GetWindowRect(r);
- CSize s = r.Size();
- SetMinTrackSize(s);
- s.cx = 1000;
- SetMaxTrackSize(s);
+ CSize size = r.Size();
+ SetMinTrackSize(size);
+ size.cx = 1000;
+ SetMaxTrackSize(size);
CString dummy = _T("dummy");
- CString vidstr = AfxGetApp()->GetProfileString(_T("Capture"), _T("VidDispName"), dummy);
- CString audstr = AfxGetApp()->GetProfileString(_T("Capture"), _T("AudDispName"), dummy);
- long country = AfxGetApp()->GetProfileInt(_T("Capture"), _T("Country"), 1);
+ CString vidstr = s.strAnalogVideo;
+ CString audstr = s.strAnalogAudio;
+ int country = s.iAnalogCountry;
int iSel = vidstr == dummy ? 0 : -1;
@@ -471,22 +473,24 @@ void COpenCapDeviceDlg::OnBnClickedOk() {
UpdateData();
+ AppSettings& s = AfxGetAppSettings();
+
if(m_vidctrl.GetCurSel() >= 0)
{
m_vidstr = m_vidnames[m_vidctrl.GetCurSel()];
- AfxGetApp()->WriteProfileString(_T("Capture"), _T("VidDispName"), m_vidstr);
+ s.strAnalogVideo = m_vidstr;
}
if(m_audctrl.GetCurSel() >= 0)
{
m_audstr = m_audnames[m_audctrl.GetCurSel()];
- AfxGetApp()->WriteProfileString(_T("Capture"), _T("AudDispName"), m_audstr);
+ s.strAnalogAudio = m_audstr;
}
if(m_countryctrl.GetCurSel() >= 0)
{
m_country = ((cc_t*)m_countryctrl.GetItemDataPtr(m_countryctrl.GetCurSel()))->code;
- AfxGetApp()->WriteProfileInt(_T("Capture"), _T("Country"), m_country);
+ s.iAnalogCountry = m_country;
}
OnOK();
|