The power of C# 5, or 6, or something

This commit is contained in:
nattthebear 2017-05-07 16:54:18 -04:00
parent c33fbfddf4
commit 999dcdaec8
1 changed files with 6 additions and 12 deletions

View File

@ -212,8 +212,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
state = RamAdapterState.IDLE;
SetCycles();
Console.WriteLine("FDS: Disk ejected");
if (DriveLightCallback != null)
DriveLightCallback(false);
DriveLightCallback?.Invoke(false);
}
/// <summary>
@ -234,8 +233,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
SetCycles();
Console.WriteLine("FDS: Disk Inserted");
originaldisk = (byte[])disk.Clone();
if (DriveLightCallback != null)
DriveLightCallback(false);
DriveLightCallback?.Invoke(false);
}
/// <summary>
@ -383,8 +381,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
state = RamAdapterState.SPINUP;
SetCycles();
//}
if (DriveLightCallback != null)
DriveLightCallback(true);
DriveLightCallback?.Invoke(true);
}
}
if ((value & 2) != 0)
@ -495,8 +492,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
state = RamAdapterState.RESET;
transferreset = false;
//numcrc = 0;
if (DriveLightCallback != null)
DriveLightCallback(false);
DriveLightCallback?.Invoke(false);
}
SetCycles();
break;
@ -509,16 +505,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
transferreset = false;
//numcrc = 0;
// Console.WriteLine("FDS: Return or Insert Complete");
if (DriveLightCallback != null)
DriveLightCallback(false);
DriveLightCallback?.Invoke(false);
break;
case RamAdapterState.SPINUP:
state = RamAdapterState.RUNNING;
SetCycles();
//transferreset = false; // this definitely does not happen.
// Console.WriteLine("FDS: Spin up complete! Disk is running");
if (DriveLightCallback != null)
DriveLightCallback(true);
DriveLightCallback?.Invoke(true);
break;
case RamAdapterState.IDLE: