Add ability to disable renaming of sets

This commit is contained in:
Matt Nadareski
2016-03-24 13:23:13 -07:00
parent 3c740a3f6b
commit 18ab82846e

View File

@@ -13,6 +13,7 @@ namespace DATabase
private int _system; private int _system;
private int _source; private int _source;
private string _connectionString; private string _connectionString;
private bool _norename;
private bool _old; private bool _old;
// Private required variables // Private required variables
@@ -28,11 +29,12 @@ namespace DATabase
get { return _source; } get { return _source; }
} }
public Generate(int system, int source, string connectionString, bool old = false) public Generate(int system, int source, string connectionString, bool norename = false, bool old = false)
{ {
_system = system; _system = system;
_source = source; _source = source;
_connectionString = connectionString; _connectionString = connectionString;
_norename = norename;
_old = old; _old = old;
_headers = new Dictionary<int, string>(); _headers = new Dictionary<int, string>();
@@ -313,11 +315,14 @@ JOIN checksums
continue; continue;
} }
// Rename the game associated if it's still valid // Rename the game associated if it's still valid and we allow renames
if (!_norename)
{
temp.Game = temp.Game + temp.Game = temp.Game +
(sysmerged ? " [" + temp.Manufacturer + " - " + temp.System + "]" : "") + (sysmerged ? " [" + temp.Manufacturer + " - " + temp.System + "]" : "") +
(srcmerged ? " [" + temp.Source + "]" : ""); (srcmerged ? " [" + temp.Source + "]" : "");
} }
}
roms.Add(temp); roms.Add(temp);
} }