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
diff options
context:
space:
mode:
authorkinddragon <kinddragon@users.sourceforge.net>2010-05-16 07:28:20 +0400
committerkinddragon <kinddragon@users.sourceforge.net>2010-05-16 07:28:20 +0400
commit3a990e7f323a3f68c286ad8b3395c681368ff46b (patch)
treea96dec63048cae679d740631faea62eeacc5043b /src/apps/mplayerc/mplayerc.cpp
parent670469f93b6e0c5655a8efa092173b1e65102951 (diff)
"Touch Window From Inside" fixed
Added auto saving position every 30 seconds Some minor format changes git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1885 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/mplayerc.cpp')
-rw-r--r--src/apps/mplayerc/mplayerc.cpp29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/apps/mplayerc/mplayerc.cpp b/src/apps/mplayerc/mplayerc.cpp
index ea0776d06..bf26c2fee 100644
--- a/src/apps/mplayerc/mplayerc.cpp
+++ b/src/apps/mplayerc/mplayerc.cpp
@@ -1582,7 +1582,6 @@ void CMPlayerCApp::Settings::ResetPositions()
nCurrentFilePosition = -1;
}
-
DVD_POSITION* CMPlayerCApp::Settings::CurrentDVDPosition()
{
if (nCurrentDvdPosition != -1)
@@ -2632,7 +2631,6 @@ void CMPlayerCApp::Settings::UpdateData(bool fSave)
// CASIMIR666 : fin nouveaux settings
-
// TODO: sort shaders by label
m_shadercombine = pApp->GetProfileString(_T("Shaders"), _T("Combine"), _T(""));
@@ -2644,6 +2642,32 @@ void CMPlayerCApp::Settings::UpdateData(bool fSave)
}
}
+void CMPlayerCApp::Settings::SaveCurrentFilePosition( )
+{
+ CWinApp* pApp = AfxGetApp();
+ CString strFilePos;
+ CString strValue;
+ int i = nCurrentFilePosition;
+
+ strFilePos.Format (_T("File Name %d"), i);
+ pApp->WriteProfileString(IDS_R_SETTINGS, strFilePos, FilePosition[i].strFile);
+ strFilePos.Format (_T("File Position %d"), i);
+ strValue.Format (_T("%I64d"), FilePosition[i].llPosition);
+ pApp->WriteProfileString(IDS_R_SETTINGS, strFilePos, strValue);
+}
+
+void CMPlayerCApp::Settings::SaveCurrentDVDPosition( )
+{
+ CWinApp* pApp = AfxGetApp();
+ CString strDVDPos;
+ CString strValue;
+ int i = nCurrentDvdPosition;
+
+ strDVDPos.Format (_T("DVD Position %d"), i);
+ strValue = SerializeHex((BYTE*)&DvdPosition[i], sizeof(DVD_POSITION));
+ pApp->WriteProfileString(IDS_R_SETTINGS, strDVDPos, strValue);
+}
+
__int64 CMPlayerCApp::Settings::ConvertTimeToMSec(CString& time)
{
__int64 Sec = 0;
@@ -2903,7 +2927,6 @@ CDVBChannel* CMPlayerCApp::Settings::FindChannelByPref(int nPrefNumber)
return NULL;
}
-
// CMPlayerCApp::Settings::CRecentFileAndURLList
CMPlayerCApp::Settings::CRecentFileAndURLList::CRecentFileAndURLList(UINT nStart, LPCTSTR lpszSection,