Move gamedb init before single-instance check
This commit is contained in:
parent
09a39a5630
commit
9ce3771e85
|
@ -26,7 +26,6 @@ using BizHawk.Client.Common;
|
|||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Common.Base_Implementations;
|
||||
using BizHawk.Emulation.Cores;
|
||||
using BizHawk.Emulation.Cores.Arcades.MAME;
|
||||
using BizHawk.Emulation.Cores.Computers.AppleII;
|
||||
using BizHawk.Emulation.Cores.Computers.Commodore64;
|
||||
using BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES;
|
||||
|
@ -407,14 +406,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
//do this threaded stuff early so it has plenty of time to run in background
|
||||
Database.InitializeDatabase(
|
||||
bundledRoot: Path.Combine(PathUtils.ExeDirectoryPath, "gamedb"),
|
||||
userRoot: Path.Combine(PathUtils.DataDirectoryPath, "gamedb"),
|
||||
silent: true);
|
||||
BootGodDb.Initialize(Path.Combine(PathUtils.ExeDirectoryPath, "gamedb"));
|
||||
MAMEMachineDB.Initialize(Path.Combine(PathUtils.ExeDirectoryPath, "gamedb"));
|
||||
|
||||
_argParser = cliFlags;
|
||||
_getConfigPath = getConfigPath;
|
||||
GL = gl;
|
||||
|
|
|
@ -11,6 +11,7 @@ using BizHawk.Common;
|
|||
using BizHawk.Common.PathExtensions;
|
||||
using BizHawk.Client.Common;
|
||||
using BizHawk.Client.EmuHawk.CustomControls;
|
||||
using BizHawk.Emulation.Cores;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
|
@ -314,6 +315,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
var exitCode = 0;
|
||||
try
|
||||
{
|
||||
GameDBHelper.BackgroundInitAll();
|
||||
MainForm mf = new(
|
||||
cliFlags,
|
||||
workingGL,
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
using System.IO;
|
||||
|
||||
using BizHawk.Common.PathExtensions;
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores.Arcades.MAME;
|
||||
using BizHawk.Emulation.Cores.Nintendo.NES;
|
||||
|
||||
namespace BizHawk.Emulation.Cores
|
||||
{
|
||||
public static class GameDBHelper
|
||||
{
|
||||
public static void BackgroundInitAll()
|
||||
{
|
||||
var bundledGamedbPath = Path.Combine(PathUtils.ExeDirectoryPath, "gamedb");
|
||||
Database.InitializeDatabase(
|
||||
bundledRoot: bundledGamedbPath,
|
||||
userRoot: Path.Combine(PathUtils.DataDirectoryPath, "gamedb"),
|
||||
silent: true);
|
||||
BootGodDb.Initialize(bundledGamedbPath);
|
||||
MAMEMachineDB.Initialize(bundledGamedbPath);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue