From: <sag...@us...> - 2014-10-03 13:05:03
|
Revision: 4359 http://sourceforge.net/p/modplug/code/4359 Author: saga-games Date: 2014-10-03 13:04:56 +0000 (Fri, 03 Oct 2014) Log Message: ----------- [New] Can now also drag&drop folders full of song files or VSTs [Mod] OpenMPT: Version is now 1.24.00.06 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/Mptrack.cpp Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-10-03 12:42:05 UTC (rev 4358) +++ trunk/OpenMPT/common/versionNumber.h 2014-10-03 13:04:56 UTC (rev 4359) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 24 #define VER_MINOR 00 -#define VER_MINORMINOR 05 +#define VER_MINORMINOR 06 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2014-10-03 12:42:05 UTC (rev 4358) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2014-10-03 13:04:56 UTC (rev 4359) @@ -64,6 +64,28 @@ CDocument *CModDocTemplate::OpenDocumentFile(const mpt::PathString &filename, BOOL addToMru, BOOL makeVisible) //------------------------------------------------------------------------------------------------------------ { + if(::PathIsDirectoryW(filename.AsNative().c_str())) + { + CDocument *pDoc = nullptr; + mpt::PathString path = filename; + if(!path.HasTrailingSlash()) path += MPT_PATHSTRING("\\"); + HANDLE hFind; + WIN32_FIND_DATAW wfd; + MemsetZero(wfd); + if((hFind = FindFirstFileW((path + MPT_PATHSTRING("*.*")).AsNative().c_str(), &wfd)) != INVALID_HANDLE_VALUE) + { + do + { + if(wcscmp(wfd.cFileName, L"..") && wcscmp(wfd.cFileName, L".")) + { + pDoc = OpenDocumentFile(path + mpt::PathString::FromNative(wfd.cFileName), addToMru, makeVisible); + } + } while (FindNextFileW(hFind, &wfd)); + FindClose(hFind); + } + return pDoc; + } + if(!mpt::PathString::CompareNoCase(filename.GetFileExt(), MPT_PATHSTRING(".dll"))) { CVstPluginManager *pPluginManager = theApp.GetPluginManager(); @@ -1371,11 +1393,9 @@ } // Call plugins idle routine for open editor - DWORD curTime = timeGetTime(); - // TODO: is it worth the overhead of checking that 10ms have passed, - // or should we just do it on every idle message? if (m_pPluginManager) { + DWORD curTime = timeGetTime(); //rewbs.vstCompliance: call @ 50Hz if (curTime - m_dwLastPluginIdleCall > 20) //20ms since last call? { @@ -1470,7 +1490,7 @@ ::SetTextColor(hdc, GetSysColor((bDisabled) ? COLOR_GRAYTEXT : COLOR_BTNTEXT)); ::SetBkMode(hdc, TRANSPARENT); HGDIOBJ oldfont = ::SelectObject(hdc, CMainFrame::GetGUIFont()); - ::DrawText(hdc, lpszText, -1, &rect, dwFlags | DT_SINGLELINE | DT_NOPREFIX); + ::DrawTextA(hdc, lpszText, -1, &rect, dwFlags | DT_SINGLELINE | DT_NOPREFIX); ::SelectObject(hdc, oldfont); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |