-Made it so that the log file only opens when you're actually logging. As a result, now can now at least switch games when you're not logging without getting errors.
This commit is contained in:
parent
b29c9835ff
commit
aad9f05310
|
@ -9,10 +9,15 @@ namespace BizHawk.Emulation.CPUs.Z80GB
|
|||
{
|
||||
public sealed partial class Z80
|
||||
{
|
||||
private bool logging = false;
|
||||
private TextWriter log;
|
||||
|
||||
public Z80()
|
||||
{
|
||||
InitializeTables();
|
||||
Reset();
|
||||
if (logging)
|
||||
log = File.CreateText("log.txt");
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
|
@ -27,8 +32,6 @@ namespace BizHawk.Emulation.CPUs.Z80GB
|
|||
|
||||
public Func<ushort, byte> ReadMemory;
|
||||
public Action<ushort, byte> WriteMemory;
|
||||
private bool logging = true;
|
||||
private TextWriter log = File.CreateText("log.txt");
|
||||
|
||||
public void UnregisterMemoryMapper()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue