BizHawk is a multi-system emulator written in C#. BizHawk provides nice features for casual gamers such as full screen, and joypad support in addition to full rerecording and debugging tools for all system cores.
The code looks to be very old, so I'm wondering if this is still sensible today. One potential issue caused by this can be seen in #3724 where the additional Restart call was not expected by the tool and caused double initialization.
In general I would expect a Restart method to be called whenever the tool needs to be restarted, and not on its initial load. It's possible external tools now depend on this restart method being called, but I'd still like to consider removing this call as I don't believe it makes sense as is.
This is intended. Tools (bundled or external) can't always finish initialisation during the constructor, as they may require some service but services don't get populated until after the ctor returns.
In
ToolManager.Load
, any tool that is created is firstRestart
ed and thenShow
n: https://github.com/TASEmulators/BizHawk/blob/2c6129fb683e94daf1098502a93ce66ca0932c3b/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs#L148-L150The code looks to be very old, so I'm wondering if this is still sensible today. One potential issue caused by this can be seen in #3724 where the additional
Restart
call was not expected by the tool and caused double initialization.In general I would expect a Restart method to be called whenever the tool needs to be restarted, and not on its initial load. It's possible external tools now depend on this restart method being called, but I'd still like to consider removing this call as I don't believe it makes sense as is.