Add setup for profiling gamedb
simply build with `-p:MachineExtraCompilationFlag=BIZHAWKBUILD_RUN_ONLY_GAMEDB_INIT`
This commit is contained in:
parent
4678d90646
commit
6f3fd9740e
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue