|
From: <man...@us...> - 2013-05-20 13:39:29
|
Revision: 2147
http://sourceforge.net/p/modplug/code/2147
Author: manxorist
Date: 2013-05-20 13:39:23 +0000 (Mon, 20 May 2013)
Log Message:
-----------
[Imp] Return all listed trackers for a MODTYPE in ModTypeToTracker instead of just the first one from modFormatInfo[].
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_gdm.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/Tables.cpp
Modified: trunk/OpenMPT/soundlib/Load_gdm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_gdm.cpp 2013-05-20 12:32:27 UTC (rev 2146)
+++ trunk/OpenMPT/soundlib/Load_gdm.cpp 2013-05-20 13:39:23 UTC (rev 2147)
@@ -158,7 +158,7 @@
InitializeGlobals();
m_nType = gdmFormatOrigin[fileHeader.originalFormat];
- madeWithTracker.Format("BWSB 2GDM %d.%d (converted from %s)", fileHeader.trackerMajorVer, fileHeader.formatMinorVer, ModTypeToTracker(GetType()));
+ madeWithTracker.Format("BWSB 2GDM %d.%d (converted from %s)", fileHeader.trackerMajorVer, fileHeader.formatMinorVer, ModTypeToTracker(GetType()).c_str());
// Song name
StringFixer::ReadString<StringFixer::maybeNullTerminated>(m_szNames[0], fileHeader.songTitle);
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2013-05-20 12:32:27 UTC (rev 2146)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2013-05-20 13:39:23 UTC (rev 2147)
@@ -527,7 +527,7 @@
static std::vector<const char *> GetSupportedExtensions(bool otherFormats);
static const char * ModTypeToString(MODTYPE modtype);
- static const char * ModTypeToTracker(MODTYPE modtype);
+ static std::string ModTypeToTracker(MODTYPE modtype);
void UpgradeModFlags();
void UpgradeSong();
Modified: trunk/OpenMPT/soundlib/Tables.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Tables.cpp 2013-05-20 12:32:27 UTC (rev 2146)
+++ trunk/OpenMPT/soundlib/Tables.cpp 2013-05-20 13:39:23 UTC (rev 2147)
@@ -162,17 +162,28 @@
}
-const char * CSoundFile::ModTypeToTracker(MODTYPE modtype)
-//--------------------------------------------------------
+std::string CSoundFile::ModTypeToTracker(MODTYPE modtype)
+//-------------------------------------------------------
{
+ std::set<std::string> retvals;
+ std::string retval;
for(size_t i = 0; i < CountOf(modFormatInfo); i++)
{
if(modFormatInfo[i].format & modtype)
{
- return modFormatInfo[i].name;
+ std::string name = modFormatInfo[i].name;
+ if(retvals.find(name) == retvals.end())
+ {
+ retvals.insert(name);
+ if(!retval.empty())
+ {
+ retval += " / ";
+ }
+ retval += name;
+ }
}
}
- return "";
+ return retval;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|