From 5689d69bfbd945545e4c616c0970f8afcb444bcc Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Sun, 24 May 2020 13:55:52 +1000 Subject: [PATCH] Make gamedb's WriteLine flooding conditional on DEBUG --- src/BizHawk.Emulation.Common/Database/Database.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/BizHawk.Emulation.Common/Database/Database.cs b/src/BizHawk.Emulation.Common/Database/Database.cs index 3b5e78e589..e528d35896 100644 --- a/src/BizHawk.Emulation.Common/Database/Database.cs +++ b/src/BizHawk.Emulation.Common/Database/Database.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; using System.Text; @@ -54,12 +55,12 @@ namespace BizHawk.Emulation.Common var filename = Path.Combine(path, line); if (File.Exists(filename)) { - Console.WriteLine("loading external game database {0}", line); + Debug.WriteLine("loading external game database {0}", line); LoadDatabase(filename); } else { - Console.WriteLine("BENIGN: missing external game database {0}", line); + Debug.WriteLine("BENIGN: missing external game database {0}", line); } } @@ -146,16 +147,18 @@ namespace BizHawk.Emulation.Common ForcedCore = items.Length >= 8 ? items[7].ToLowerInvariant() : "" }; +#if DEBUG if (DB.ContainsKey(game.Hash)) { Console.WriteLine("gamedb: Multiple hash entries {0}, duplicate detected on \"{1}\" and \"{2}\"", game.Hash, game.Name, DB[game.Hash].Name); } +#endif DB[game.Hash] = game; } catch { - Console.WriteLine($"Error parsing database entry: {line}"); + Debug.WriteLine($"Error parsing database entry: {line}"); } } }