From: <rel...@us...> - 2011-08-19 19:57:48
|
Revision: 986 http://modplug.svn.sourceforge.net/modplug/?rev=986&view=rev Author: relabsoluness Date: 2011-08-19 19:57:42 +0000 (Fri, 19 Aug 2011) Log Message: ----------- [Fix] Internal: Build fix for VC2008 (broken in r979). Modified Paths: -------------- trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/Mptrack.h Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2011-08-19 19:03:11 UTC (rev 985) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2011-08-19 19:57:42 UTC (rev 986) @@ -49,11 +49,19 @@ public: CModDocTemplate(UINT nIDResource, CRuntimeClass* pDocClass, CRuntimeClass* pFrameClass, CRuntimeClass* pViewClass): CMultiDocTemplate(nIDResource, pDocClass, pFrameClass, pViewClass) {} - virtual CDocument* OpenDocumentFile(LPCTSTR path, BOOL addToMru = TRUE, BOOL makeVisible = TRUE); + + #if (_MSC_VER < MSVC_VER_2010) + virtual CDocument* OpenDocumentFile(LPCTSTR path, BOOL makeVisible = TRUE); + #else + virtual CDocument* OpenDocumentFile(LPCTSTR path, BOOL addToMru = TRUE, BOOL makeVisible = TRUE); + #endif }; - -CDocument *CModDocTemplate::OpenDocumentFile(LPCTSTR path, BOOL addToMru, BOOL makeVisible) +#if (_MSC_VER < MSVC_VER_2010) + CDocument *CModDocTemplate::OpenDocumentFile(LPCTSTR path, BOOL makeVisible) +#else + CDocument *CModDocTemplate::OpenDocumentFile(LPCTSTR path, BOOL addToMru, BOOL makeVisible) +#endif //----------------------------------------------------------------------------------------- { if (path) @@ -71,7 +79,11 @@ } } - CDocument *pDoc = CMultiDocTemplate::OpenDocumentFile(path, addToMru, makeVisible); + #if (_MSC_VER < MSVC_VER_2010) + CDocument *pDoc = CMultiDocTemplate::OpenDocumentFile(path, makeVisible); + #else + CDocument *pDoc = CMultiDocTemplate::OpenDocumentFile(path, addToMru, makeVisible); + #endif if (pDoc) { CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); Modified: trunk/OpenMPT/mptrack/Mptrack.h =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.h 2011-08-19 19:03:11 UTC (rev 985) +++ trunk/OpenMPT/mptrack/Mptrack.h 2011-08-19 19:57:42 UTC (rev 986) @@ -127,6 +127,17 @@ static MEMORYSTATUS gMemStatus; static CDLSBank *gpDLSBanks[MAX_DLS_BANKS]; +#if (_MSC_VER < MSVC_VER_2010) + virtual CDocument* OpenDocumentFile(LPCTSTR lpszFileName, BOOL bAddToMRU = TRUE) + { + CDocument* pDoc = CWinApp::OpenDocumentFile(lpszFileName); + if (pDoc && bAddToMRU != TRUE) + RemoveMruItem(0); // This doesn't result to the same behaviour as not adding to MRU + // (if the new item got added, it might have already dropped the last item out) + return pDoc; + } +#endif + protected: CMultiDocTemplate *m_pModTemplate; CVstPluginManager *m_pPluginManager; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |