-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:
brandman211 2012-05-24 17:27:45 +00:00
parent b29c9835ff
commit aad9f05310
1 changed files with 5 additions and 2 deletions

View File

@ -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()
{