-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
|
public sealed partial class Z80
|
||||||
{
|
{
|
||||||
|
private bool logging = false;
|
||||||
|
private TextWriter log;
|
||||||
|
|
||||||
public Z80()
|
public Z80()
|
||||||
{
|
{
|
||||||
InitializeTables();
|
InitializeTables();
|
||||||
Reset();
|
Reset();
|
||||||
|
if (logging)
|
||||||
|
log = File.CreateText("log.txt");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Reset()
|
public void Reset()
|
||||||
|
@ -27,8 +32,6 @@ namespace BizHawk.Emulation.CPUs.Z80GB
|
||||||
|
|
||||||
public Func<ushort, byte> ReadMemory;
|
public Func<ushort, byte> ReadMemory;
|
||||||
public Action<ushort, byte> WriteMemory;
|
public Action<ushort, byte> WriteMemory;
|
||||||
private bool logging = true;
|
|
||||||
private TextWriter log = File.CreateText("log.txt");
|
|
||||||
|
|
||||||
public void UnregisterMemoryMapper()
|
public void UnregisterMemoryMapper()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue