diff --git a/ROMVault2/DatReaders/DatXMLReader.cs b/ROMVault2/DatReaders/DatXMLReader.cs
index d421215..5371896 100644
--- a/ROMVault2/DatReaders/DatXMLReader.cs
+++ b/ROMVault2/DatReaders/DatXMLReader.cs
@@ -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++)
- {
- LoadGameFromDat(ref tDat, gameNodeList[i], thisFileType);
- }
+ foreach (XmlNode gameNode in gameNodeList)
+ LoadGameFromDat(ref tDat, gameNode, thisFileType);
}
+ XmlNodeList machineNodeList = doc.DocumentElement.SelectNodes("machine");
+
+ if (machineNodeList != null)
+ {
+ foreach (XmlNode machineNode in machineNodeList)
+ LoadGameFromDat(ref tDat, machineNode, thisFileType);
+ }
+
+
return true;
}
@@ -149,7 +150,7 @@ namespace ROMVault2.DatReaders
}
val = VarFix.String(packingNode.Attributes.GetNamedItem("dir")).ToLower(); // noautodir , nogame
if (!String.IsNullOrEmpty(val))
- tDat.AddData(RvDat.DatData.DirSetup,val);
+ tDat.AddData(RvDat.DatData.DirSetup, val);
}
}
diff --git a/ROMVault2/Program.cs b/ROMVault2/Program.cs
index 98403f1..e91778d 100644
--- a/ROMVault2/Program.cs
+++ b/ROMVault2/Program.cs
@@ -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;
diff --git a/ROMVault2/ROMVault2.csproj b/ROMVault2/ROMVault2.csproj
index d08bdeb..08f50fc 100644
--- a/ROMVault2/ROMVault2.csproj
+++ b/ROMVault2/ROMVault2.csproj
@@ -35,7 +35,7 @@
true
full
false
- Stage\
+ ..\..\Stage\
TRACE;DEBUG;UNMANAGED;COMPRESS;LZMA_STREAM;DOTNET20
prompt
4