File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -341,6 +341,10 @@ BEGIN_MESSAGE_MAP(CPlayerDoc, CDocument)
341341END_MESSAGE_MAP()
342342
343343
344+ const TCHAR szPlayerInitFlags[] = _T(" PlayerInitFlags" );
345+ const TCHAR szMaximalResolution[] = _T(" MaximalResolution" );
346+ const TCHAR szUsingSAN[] = _T(" UsingSAN" );
347+
344348// CPlayerDoc construction/destruction
345349
346350CPlayerDoc::CPlayerDoc ()
@@ -350,10 +354,22 @@ CPlayerDoc::CPlayerDoc()
350354 std::bind(&CPlayerDoc::getVideoSpeed, this ))))
351355{
352356 m_frameDecoder->setDecoderListener (this );
357+
358+ if (auto pApp = AfxGetApp ())
359+ {
360+ m_maximalResolution = !!pApp->GetProfileInt (szPlayerInitFlags, szMaximalResolution, false );
361+ m_bUsingSAN = !!pApp->GetProfileInt (szPlayerInitFlags, szUsingSAN, true );
362+ }
353363}
354364
355365CPlayerDoc::~CPlayerDoc ()
356366{
367+ if (auto pApp = AfxGetApp ())
368+ {
369+ pApp->WriteProfileInt (szPlayerInitFlags, szMaximalResolution, m_maximalResolution);
370+ pApp->WriteProfileInt (szPlayerInitFlags, szUsingSAN, m_bUsingSAN);
371+ }
372+
357373 onDestructing ();
358374
359375 ASSERT (framePositionChanged.empty ());
You can’t perform that action at this time.
0 commit comments