fixed loading the mame 0.162 dat's using the 'machine' xml node.

This commit is contained in:
gjefferyes
2015-06-10 09:45:03 -05:00
parent b368f33351
commit 32f67308fa
3 changed files with 20 additions and 19 deletions

View File

@@ -28,20 +28,16 @@ namespace ROMVault2.DatReaders
XmlNodeList dirNodeList = doc.DocumentElement.SelectNodes("dir");
if (dirNodeList != null)
{
for (int i = 0; i < dirNodeList.Count; i++)
{
LoadDirFromDat(ref tDat, dirNodeList[i], thisFileType);
}
foreach (XmlNode dirNode in dirNodeList)
LoadDirFromDat(ref tDat, dirNode, thisFileType);
}
XmlNodeList gameNodeList = doc.DocumentElement.SelectNodes("game");
if (gameNodeList != null)
{
for (int i = 0; i < gameNodeList.Count; i++)
{
LoadGameFromDat(ref tDat, gameNodeList[i], thisFileType);
}
foreach (XmlNode gameNode in gameNodeList)
LoadGameFromDat(ref tDat, gameNode, thisFileType);
}
return true;
@@ -60,22 +56,27 @@ namespace ROMVault2.DatReaders
XmlNodeList dirNodeList = doc.DocumentElement.SelectNodes("dir");
if (dirNodeList != null)
{
for (int i = 0; i < dirNodeList.Count; i++)
{
LoadDirFromDat(ref tDat, dirNodeList[i], thisFileType);
}
foreach (XmlNode dirNode in dirNodeList)
LoadDirFromDat(ref tDat, dirNode, thisFileType);
}
XmlNodeList gameNodeList = doc.DocumentElement.SelectNodes("game");
if (gameNodeList != null)
{
for (int i = 0; i < gameNodeList.Count; i++)
foreach (XmlNode gameNode in gameNodeList)
LoadGameFromDat(ref tDat, gameNode, thisFileType);
}
XmlNodeList machineNodeList = doc.DocumentElement.SelectNodes("machine");
if (machineNodeList != null)
{
LoadGameFromDat(ref tDat, gameNodeList[i], thisFileType);
}
foreach (XmlNode machineNode in machineNodeList)
LoadGameFromDat(ref tDat, machineNode, thisFileType);
}
return true;
}

View File

@@ -15,7 +15,7 @@ namespace ROMVault2
//public static UsernamePassword Up;
public static readonly Encoding Enc = Encoding.GetEncoding(28591);
public const string Version = "2.2";
public const int SubVersion = 1;
public const int SubVersion = 2;
public static string ErrorMessage;
public static string URL;

View File

@@ -35,7 +35,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Stage\</OutputPath>
<OutputPath>..\..\Stage\</OutputPath>
<DefineConstants>TRACE;DEBUG;UNMANAGED;COMPRESS;LZMA_STREAM;DOTNET20</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>