diff --git a/src/BizHawk.Client.EmuHawk/Program.cs b/src/BizHawk.Client.EmuHawk/Program.cs index 3486bfd2d1..3a61f32e6e 100644 --- a/src/BizHawk.Client.EmuHawk/Program.cs +++ b/src/BizHawk.Client.EmuHawk/Program.cs @@ -316,6 +316,9 @@ namespace BizHawk.Client.EmuHawk try { GameDBHelper.BackgroundInitAll(); +#if BIZHAWKBUILD_RUN_ONLY_GAMEDB_INIT + GameDBHelper.WaitForThreadAndQuickTest(); +#else MainForm mf = new( cliFlags, workingGL, @@ -362,6 +365,7 @@ namespace BizHawk.Client.EmuHawk movieSession.Movie.Save(); } } +#endif } catch (Exception e) when (!Debugger.IsAttached) { diff --git a/src/BizHawk.Emulation.Cores/GameDBHelper.cs b/src/BizHawk.Emulation.Cores/GameDBHelper.cs index e1c7f8afb3..a7aafbf1ff 100644 --- a/src/BizHawk.Emulation.Cores/GameDBHelper.cs +++ b/src/BizHawk.Emulation.Cores/GameDBHelper.cs @@ -1,5 +1,6 @@ using System.IO; +using BizHawk.Common; using BizHawk.Common.PathExtensions; using BizHawk.Emulation.Common; using BizHawk.Emulation.Cores.Arcades.MAME; @@ -19,5 +20,13 @@ namespace BizHawk.Emulation.Cores BootGodDb.Initialize(bundledGamedbPath); MAMEMachineDB.Initialize(bundledGamedbPath); } + + public static void WaitForThreadAndQuickTest() + { + RomStatus StatusFor(string hashDigest) + => Database.CheckDatabase(hashDigest)?.Status ?? RomStatus.NotInDatabase; + Console.WriteLine(StatusFor(SHA1Checksum.EmptyFile)); // NotInDatabase + Console.WriteLine(StatusFor("3064E664D34859649B67559F0ED0C2FFD6948031")); // BadDump + } } }