Remove explicit lua restart within LoadRomInternal

The position of this restart is dangerous as it may pass in a Dispose()'d core. This is pointless too as later on the Tool Manager handles restarting all tools.

Similarly, remove the explicit restart of the Debugger, no point in doing this as the Tool Manager will restart the debugger just fine anyways (the restart removes breakpoints from the debugger's internal list but doesn't remove them core side, which they should have been removed anyways from being Dispose()'d)
This commit is contained in:
CasualPokePlayer 2022-04-22 20:03:30 -07:00 committed by GitHub
parent 8ea09eebf5
commit a08116f2d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 12 deletions

View File

@ -3744,11 +3744,6 @@ namespace BizHawk.Client.EmuHawk
loader.OnLoadSettings += CoreSettings;
loader.OnLoadSyncSettings += CoreSyncSettings;
if (Tools.IsLoaded<GenericDebugger>())
{
Tools.Restart<GenericDebugger>();
}
// this also happens in CloseGame(). But it needs to happen here since if we're restarting with the same core,
// any settings changes that we made need to make it back to config before we try to instantiate that core with
// the new settings objects
@ -3887,13 +3882,6 @@ namespace BizHawk.Client.EmuHawk
Console.WriteLine("Core reported BoardID: \"{0}\"", Emulator.AsBoardInfo().BoardName);
}
// restarts the lua console if a different rom is loaded.
// im not really a fan of how this is done..
if (Config.RecentRoms.Empty || Config.RecentRoms.MostRecent != openAdvancedArgs)
{
Tools.Restart<LuaConsole>();
}
Config.RecentRoms.Add(openAdvancedArgs);
JumpLists.AddRecentItem(openAdvancedArgs, ioa.DisplayName);