From 54ba1e12ebd4963da89cbf0a8eae3b8d3b597ecf Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 18 Feb 2020 11:11:59 -0600 Subject: [PATCH] set get only properties in Emulation.Cores, and a few other simplfiications --- BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs | 4 +- .../Computers/MSX/MSX.IInputPollable.cs | 2 +- BizHawk.Emulation.Cores/Computers/MSX/MSX.cs | 8 +- .../Consoles/Coleco/ColecoControllerDeck.cs | 4 +- .../Consoles/Coleco/ColecoControllers.cs | 153 +++++++----------- .../Consoles/Nintendo/GBA/VBANext.cs | 4 +- .../N64/NativeApi/mupen64plusCoreApi.cs | 2 +- .../Consoles/Nintendo/NES/NES.IDriveLight.cs | 2 +- .../Consoles/Nintendo/NES/NES.cs | 2 +- .../Consoles/Nintendo/QuickNES/QuickNES.cs | 2 +- .../Nintendo/SNES/LibsnesControllerDeck.cs | 2 +- .../Nintendo/SNES/SNESGraphicsDecoder.cs | 24 +-- .../Consoles/Sega/PicoDrive/PicoDrive.cs | 2 +- .../Consoles/Sega/SMS/SMS.IInputPollable.cs | 2 +- .../Consoles/Sega/SMS/SMS.cs | 2 - .../Libretro/LibretroCore.cs | 8 +- BizHawk.Emulation.Cores/Waterbox/ElfRunner.cs | 2 +- BizHawk.Emulation.Cores/Waterbox/Heap.cs | 2 +- BizHawk.Emulation.Cores/Waterbox/MapHeap.cs | 2 +- BizHawk.Emulation.Cores/Waterbox/PeWrapper.cs | 12 +- 20 files changed, 104 insertions(+), 137 deletions(-) diff --git a/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs b/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs index 5b54902378..4aeb168c1e 100644 --- a/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs +++ b/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs @@ -85,8 +85,8 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME #region Properties - public CoreComm CoreComm { get; private set; } - public IEmulatorServiceProvider ServiceProvider { get; private set; } + public CoreComm CoreComm { get; } + public IEmulatorServiceProvider ServiceProvider { get; } public ControllerDefinition ControllerDefinition => MAMEController; public string SystemId => "MAME"; public int[] GetVideoBuffer() => _frameBuffer; diff --git a/BizHawk.Emulation.Cores/Computers/MSX/MSX.IInputPollable.cs b/BizHawk.Emulation.Cores/Computers/MSX/MSX.IInputPollable.cs index 266653a80d..74beb32162 100644 --- a/BizHawk.Emulation.Cores/Computers/MSX/MSX.IInputPollable.cs +++ b/BizHawk.Emulation.Cores/Computers/MSX/MSX.IInputPollable.cs @@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Computers.MSX set => _isLag = value; } - public IInputCallbackSystem InputCallbacks { get; private set; } + public IInputCallbackSystem InputCallbacks { get; } = new InputCallbackSystem(); public int _lagCount = 0; public bool _lagged = true; diff --git a/BizHawk.Emulation.Cores/Computers/MSX/MSX.cs b/BizHawk.Emulation.Cores/Computers/MSX/MSX.cs index 268d152029..16dbe783bd 100644 --- a/BizHawk.Emulation.Cores/Computers/MSX/MSX.cs +++ b/BizHawk.Emulation.Cores/Computers/MSX/MSX.cs @@ -77,18 +77,16 @@ namespace BizHawk.Emulation.Cores.Computers.MSX SetupMemoryDomains(); - InputCallbacks = new InputCallbackSystem(); - Header_Length = LibMSX.MSX_getheaderlength(MSX_Pntr); Disasm_Length = LibMSX.MSX_getdisasmlength(MSX_Pntr); Reg_String_Length = LibMSX.MSX_getregstringlength(MSX_Pntr); - StringBuilder new_header = new StringBuilder(Header_Length); - LibMSX.MSX_getheader(MSX_Pntr, new_header, Header_Length); + var newHeader = new StringBuilder(Header_Length); + LibMSX.MSX_getheader(MSX_Pntr, newHeader, Header_Length); Console.WriteLine(Header_Length + " " + Disasm_Length + " " + Reg_String_Length); - Tracer = new TraceBuffer { Header = new_header.ToString() }; + Tracer = new TraceBuffer { Header = newHeader.ToString() }; var serviceProvider = ServiceProvider as BasicServiceProvider; serviceProvider.Register(Tracer); diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllerDeck.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllerDeck.cs index 457cfd7388..bd482414bb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllerDeck.cs +++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllerDeck.cs @@ -79,8 +79,8 @@ namespace BizHawk.Emulation.Cores.ColecoVision ser.EndSection(); } - public IPort Port1 { get; private set; } - public IPort Port2 { get; private set; } + public IPort Port1 { get; } + public IPort Port2 { get; } private static Dictionary _controllerTypes = null; diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllers.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllers.cs index ae3eea6c39..3c1ad6ece7 100644 --- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllers.cs +++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllers.cs @@ -36,7 +36,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision }; } - public byte Read(IController c, bool left_mode, bool updateWheel, float wheelAngle) + public byte Read(IController c, bool leftMode, bool updateWheel, float wheelAngle) { return 0x7F; // needs checking } @@ -50,10 +50,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision public int PortNum { get; } - public float UpdateWheel(IController c) - { - return 0; - } + public float UpdateWheel(IController c) => 0; } [DisplayName("ColecoVision Basic Controller")] @@ -76,36 +73,36 @@ namespace BizHawk.Emulation.Cores.ColecoVision { if (leftMode) { - byte retval = 0x7F; - if (c.IsPressed(Definition.BoolButtons[0])) retval &= 0xFE; - if (c.IsPressed(Definition.BoolButtons[1])) retval &= 0xFD; - if (c.IsPressed(Definition.BoolButtons[2])) retval &= 0xFB; - if (c.IsPressed(Definition.BoolButtons[3])) retval &= 0xF7; - if (c.IsPressed(Definition.BoolButtons[4])) retval &= 0x3F; - return retval; + byte retVal = 0x7F; + if (c.IsPressed(Definition.BoolButtons[0])) retVal &= 0xFE; + if (c.IsPressed(Definition.BoolButtons[1])) retVal &= 0xFD; + if (c.IsPressed(Definition.BoolButtons[2])) retVal &= 0xFB; + if (c.IsPressed(Definition.BoolButtons[3])) retVal &= 0xF7; + if (c.IsPressed(Definition.BoolButtons[4])) retVal &= 0x3F; + return retVal; } else { - byte retval = 0xF; + byte retVal = 0xF; // 0x00; - if (c.IsPressed(Definition.BoolButtons[14])) retval = 0x01; - if (c.IsPressed(Definition.BoolButtons[10])) retval = 0x02; - if (c.IsPressed(Definition.BoolButtons[11])) retval = 0x03; + if (c.IsPressed(Definition.BoolButtons[14])) retVal = 0x01; + if (c.IsPressed(Definition.BoolButtons[10])) retVal = 0x02; + if (c.IsPressed(Definition.BoolButtons[11])) retVal = 0x03; // 0x04; - if (c.IsPressed(Definition.BoolButtons[13])) retval = 0x05; - if (c.IsPressed(Definition.BoolButtons[16])) retval = 0x06; - if (c.IsPressed(Definition.BoolButtons[8])) retval = 0x07; + if (c.IsPressed(Definition.BoolButtons[13])) retVal = 0x05; + if (c.IsPressed(Definition.BoolButtons[16])) retVal = 0x06; + if (c.IsPressed(Definition.BoolButtons[8])) retVal = 0x07; // 0x08; - if (c.IsPressed(Definition.BoolButtons[17])) retval = 0x09; - if (c.IsPressed(Definition.BoolButtons[6])) retval = 0x0A; - if (c.IsPressed(Definition.BoolButtons[15])) retval = 0x0B; - if (c.IsPressed(Definition.BoolButtons[9])) retval = 0x0C; - if (c.IsPressed(Definition.BoolButtons[7])) retval = 0x0D; - if (c.IsPressed(Definition.BoolButtons[12])) retval = 0x0E; + if (c.IsPressed(Definition.BoolButtons[17])) retVal = 0x09; + if (c.IsPressed(Definition.BoolButtons[6])) retVal = 0x0A; + if (c.IsPressed(Definition.BoolButtons[15])) retVal = 0x0B; + if (c.IsPressed(Definition.BoolButtons[9])) retVal = 0x0C; + if (c.IsPressed(Definition.BoolButtons[7])) retVal = 0x0D; + if (c.IsPressed(Definition.BoolButtons[12])) retVal = 0x0E; - if (c.IsPressed(Definition.BoolButtons[5]) == false) retval |= 0x40; - retval |= 0x30; // always set these bits - return retval; + if (c.IsPressed(Definition.BoolButtons[5]) == false) retVal |= 0x40; + retVal |= 0x30; // always set these bits + return retVal; } } @@ -124,10 +121,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision "Key 6", "Key 7", "Key 8", "Key 9", "Pound", "Star" }; - public float UpdateWheel(IController c) - { - return 0; - } + public float UpdateWheel(IController c) => 0; } [DisplayName("Turbo Controller")] @@ -154,24 +148,14 @@ namespace BizHawk.Emulation.Cores.ColecoVision { if (leftMode) { - - byte retval = 0x4F; + byte retVal = 0x4F; - if (c.IsPressed(Definition.BoolButtons[0])) retval &= 0x3F; + if (c.IsPressed(Definition.BoolButtons[0])) retVal &= 0x3F; float x = c.GetFloat(Definition.FloatControls[0]); float y = c.GetFloat(Definition.FloatControls[1]); - float angle; - - if (updateWheel) - { - angle = wheelAngle; - } - else - { - angle = CalcDirection(x, y); - } + var angle = updateWheel ? wheelAngle : CalcDirection(x, y); byte temp2 = 0; @@ -198,16 +182,12 @@ namespace BizHawk.Emulation.Cores.ColecoVision } - retval |= temp2; + retVal |= temp2; - return retval; + return retVal; } - else - { - byte retval = 0x7F; - return retval; - } + return 0x7F; } public void SyncState(Serializer ser) @@ -245,7 +225,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision { float x = c.GetFloat(Definition.FloatControls[0]); float y = c.GetFloat(Definition.FloatControls[1]); - return CalcDirection(x, y); + return CalcDirection(x, y); } } @@ -265,34 +245,25 @@ namespace BizHawk.Emulation.Cores.ColecoVision }; } - public int PortNum { get; private set; } + public int PortNum { get; } - public ControllerDefinition Definition { get; private set; } + public ControllerDefinition Definition { get; } public byte Read(IController c, bool left_mode, bool updateWheel, float wheelAngle) { if (left_mode) { - byte retval = 0x4F; - if (c.IsPressed(Definition.BoolButtons[0])) retval &= 0xFE; - if (c.IsPressed(Definition.BoolButtons[1])) retval &= 0xFD; - if (c.IsPressed(Definition.BoolButtons[2])) retval &= 0xFB; - if (c.IsPressed(Definition.BoolButtons[3])) retval &= 0xF7; - if (c.IsPressed(Definition.BoolButtons[4])) retval &= 0x3F; + byte retVal = 0x4F; + if (c.IsPressed(Definition.BoolButtons[0])) retVal &= 0xFE; + if (c.IsPressed(Definition.BoolButtons[1])) retVal &= 0xFD; + if (c.IsPressed(Definition.BoolButtons[2])) retVal &= 0xFB; + if (c.IsPressed(Definition.BoolButtons[3])) retVal &= 0xF7; + if (c.IsPressed(Definition.BoolButtons[4])) retVal &= 0x3F; float x = c.GetFloat(Definition.FloatControls[0]); float y = c.GetFloat(Definition.FloatControls[1]); - float angle; - - if (updateWheel) - { - angle = wheelAngle; - } - else - { - angle = CalcDirection(x, y); - } + var angle = updateWheel ? wheelAngle : CalcDirection(x, y); byte temp2 = 0; @@ -318,36 +289,36 @@ namespace BizHawk.Emulation.Cores.ColecoVision temp2 = 0x00; } - retval |= temp2; + retVal |= temp2; - return retval; + return retVal; } else { - byte retval = 0xF; + byte retVal = 0xF; // 0x00; - if (c.IsPressed(Definition.BoolButtons[14])) retval = 0x01; - if (c.IsPressed(Definition.BoolButtons[10])) retval = 0x02; - if (c.IsPressed(Definition.BoolButtons[11])) retval = 0x03; + if (c.IsPressed(Definition.BoolButtons[14])) retVal = 0x01; + if (c.IsPressed(Definition.BoolButtons[10])) retVal = 0x02; + if (c.IsPressed(Definition.BoolButtons[11])) retVal = 0x03; // 0x04; - if (c.IsPressed(Definition.BoolButtons[13])) retval = 0x05; - if (c.IsPressed(Definition.BoolButtons[16])) retval = 0x06; - if (c.IsPressed(Definition.BoolButtons[8])) retval = 0x07; + if (c.IsPressed(Definition.BoolButtons[13])) retVal = 0x05; + if (c.IsPressed(Definition.BoolButtons[16])) retVal = 0x06; + if (c.IsPressed(Definition.BoolButtons[8])) retVal = 0x07; // 0x08; - if (c.IsPressed(Definition.BoolButtons[17])) retval = 0x09; - if (c.IsPressed(Definition.BoolButtons[6])) retval = 0x0A; - if (c.IsPressed(Definition.BoolButtons[15])) retval = 0x0B; - if (c.IsPressed(Definition.BoolButtons[9])) retval = 0x0C; - if (c.IsPressed(Definition.BoolButtons[7])) retval = 0x0D; - if (c.IsPressed(Definition.BoolButtons[12])) retval = 0x0E; + if (c.IsPressed(Definition.BoolButtons[17])) retVal = 0x09; + if (c.IsPressed(Definition.BoolButtons[6])) retVal = 0x0A; + if (c.IsPressed(Definition.BoolButtons[15])) retVal = 0x0B; + if (c.IsPressed(Definition.BoolButtons[9])) retVal = 0x0C; + if (c.IsPressed(Definition.BoolButtons[7])) retVal = 0x0D; + if (c.IsPressed(Definition.BoolButtons[12])) retVal = 0x0E; // extra buttons for SAC - if (c.IsPressed(Definition.BoolButtons[18])) retval = 0x04; - if (c.IsPressed(Definition.BoolButtons[19])) retval = 0x08; + if (c.IsPressed(Definition.BoolButtons[18])) retVal = 0x04; + if (c.IsPressed(Definition.BoolButtons[19])) retVal = 0x08; - if (c.IsPressed(Definition.BoolButtons[5]) == false) retval |= 0x40; - retval |= 0x30; // always set these bits - return retval; + if (c.IsPressed(Definition.BoolButtons[5]) == false) retVal |= 0x40; + retVal |= 0x30; // always set these bits + return retVal; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs index 80f1ffa700..3c0b797434 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs @@ -132,9 +132,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA /// /// set in the ROM internal header /// - public string GameCode { get; private set; } + public string GameCode { get; } - public CoreComm CoreComm { get; private set; } + public CoreComm CoreComm { get; } public void Dispose() { diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs index c45eecf935..77386f09d2 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs @@ -472,7 +472,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi DebugStep m64pDebugStep; // DLL handles - public IntPtr CoreDll { get; private set; } + public IntPtr CoreDll { get; } public mupen64plusApi(N64 bizhawkCore, byte[] rom, VideoPluginSettings video_settings, int SaveType, int CoreType, bool DisableExpansionSlot) { diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IDriveLight.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IDriveLight.cs index 99328b668c..f3068a795c 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IDriveLight.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IDriveLight.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { public partial class NES : IDriveLight { - public bool DriveLightEnabled { get; private set; } + public bool DriveLightEnabled { get; } public bool DriveLightOn { get; private set; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs index f756a4b265..76c9937f6d 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs @@ -779,7 +779,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } } - private ITraceable Tracer { get; set; } + private ITraceable Tracer { get; } } } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs index bff14aeb69..8a725ba887 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs @@ -82,7 +82,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES static readonly LibQuickNES QN; static readonly DynamicLibraryImportResolver Resolver; - public IEmulatorServiceProvider ServiceProvider { get; private set; } + public IEmulatorServiceProvider ServiceProvider { get; } #region FPU precision diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesControllerDeck.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesControllerDeck.cs index 8a65fd9a79..ee305fa527 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesControllerDeck.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesControllerDeck.cs @@ -49,7 +49,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES private readonly ILibsnesController[] _ports; private readonly ControlDefUnMerger[] _mergers; - public ControllerDefinition Definition { get; private set; } + public ControllerDefinition Definition { get; } public LibsnesControllerDeck(LibsnesCore.SnesSyncSettings ss) { diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SNESGraphicsDecoder.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SNESGraphicsDecoder.cs index 4248f0caf3..ecc498c19f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SNESGraphicsDecoder.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SNESGraphicsDecoder.cs @@ -219,22 +219,22 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES public class OAMInfo { - public int Index { private set; get; } - public int X { private set; get; } - public int Y { private set; get; } - public int Tile { private set; get; } - public int Name { private set; get; } - public int Table { private set; get; } - public int Palette { private set; get; } - public int Priority { private set; get; } - public bool VFlip { private set; get; } - public bool HFlip { private set; get; } - public int Size { private set; get; } + public int Index { get; } + public int X { get; } + public int Y { get; } + public int Tile { get; } + public int Name { get; } + public int Table { get; } + public int Palette { get; } + public int Priority { get; } + public bool VFlip { get; } + public bool HFlip { get; } + public int Size { get; } /// /// tiledata address /// - public int Address { private set; get; } + public int Address { get; } public OAMInfo(SNESGraphicsDecoder dec, ScreenInfo si, int num) { diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/PicoDrive/PicoDrive.cs b/BizHawk.Emulation.Cores/Consoles/Sega/PicoDrive/PicoDrive.cs index 9f8f73220e..2280dae276 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/PicoDrive/PicoDrive.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/PicoDrive/PicoDrive.cs @@ -243,7 +243,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.PicoDrive #region IDriveLight - public bool DriveLightEnabled { get; private set; } + public bool DriveLightEnabled { get; } public bool DriveLightOn { get; private set; } #endregion diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IInputPollable.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IInputPollable.cs index c4c0c13329..f35f54bbe8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IInputPollable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IInputPollable.cs @@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem set => _isLag = value; } - public IInputCallbackSystem InputCallbacks { get; private set; } + public IInputCallbackSystem InputCallbacks { get; } = new InputCallbackSystem(); public int _lagCount = 0; public bool _lagged = true; diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs index ac1f184fe5..96657240a8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs @@ -192,8 +192,6 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem //this manages the linkage between the cpu and mapper callbacks so it needs running before bootup is complete ((ICodeDataLogger)this).SetCDL(null); - InputCallbacks = new InputCallbackSystem(); - Tracer = new TraceBuffer { Header = Cpu.TraceHeader }; var serviceProvider = ServiceProvider as BasicServiceProvider; diff --git a/BizHawk.Emulation.Cores/Libretro/LibretroCore.cs b/BizHawk.Emulation.Cores/Libretro/LibretroCore.cs index 54b8174666..dbb764e66d 100644 --- a/BizHawk.Emulation.Cores/Libretro/LibretroCore.cs +++ b/BizHawk.Emulation.Cores/Libretro/LibretroCore.cs @@ -79,9 +79,9 @@ namespace BizHawk.Emulation.Cores.Libretro vidBufferHandle.Free(); } - public CoreComm CoreComm { get; private set; } + public CoreComm CoreComm { get; } - public RetroDescription Description { get; private set; } + public RetroDescription Description { get; } public bool LoadData(byte[] data, string id) { @@ -123,7 +123,7 @@ namespace BizHawk.Emulation.Cores.Libretro (ServiceProvider as BasicServiceProvider).Register(resampler); } - public IEmulatorServiceProvider ServiceProvider { get; private set; } + public IEmulatorServiceProvider ServiceProvider { get; } public IDictionary GetCpuFlagsAndRegisters() { @@ -285,7 +285,7 @@ namespace BizHawk.Emulation.Cores.Libretro return definition; } - public ControllerDefinition ControllerDefinition { get; private set; } + public ControllerDefinition ControllerDefinition { get; } int timeFrameCounter; public int Frame diff --git a/BizHawk.Emulation.Cores/Waterbox/ElfRunner.cs b/BizHawk.Emulation.Cores/Waterbox/ElfRunner.cs index 17f68d3ebc..79f277ff43 100644 --- a/BizHawk.Emulation.Cores/Waterbox/ElfRunner.cs +++ b/BizHawk.Emulation.Cores/Waterbox/ElfRunner.cs @@ -378,7 +378,7 @@ namespace BizHawk.Emulation.Cores.Waterbox [AttributeUsage(AttributeTargets.Method)] private class CLibPatchAttribute : Attribute { - public string NativeName { get; private set; } + public string NativeName { get; } public CLibPatchAttribute(string nativeName) { NativeName = nativeName; diff --git a/BizHawk.Emulation.Cores/Waterbox/Heap.cs b/BizHawk.Emulation.Cores/Waterbox/Heap.cs index e1a0823b9f..ca5fbb56d3 100644 --- a/BizHawk.Emulation.Cores/Waterbox/Heap.cs +++ b/BizHawk.Emulation.Cores/Waterbox/Heap.cs @@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Cores.Waterbox /// /// name, used in identifying errors /// - public string Name { get; private set; } + public string Name { get; } /// /// total number of bytes used /// diff --git a/BizHawk.Emulation.Cores/Waterbox/MapHeap.cs b/BizHawk.Emulation.Cores/Waterbox/MapHeap.cs index 2504ca6eb4..4413954c67 100644 --- a/BizHawk.Emulation.Cores/Waterbox/MapHeap.cs +++ b/BizHawk.Emulation.Cores/Waterbox/MapHeap.cs @@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Cores.Waterbox /// /// name, used in identifying errors /// - public string Name { get; private set; } + public string Name { get; } /// /// total number of bytes allocated diff --git a/BizHawk.Emulation.Cores/Waterbox/PeWrapper.cs b/BizHawk.Emulation.Cores/Waterbox/PeWrapper.cs index 04c9f3d21f..e8969ae523 100644 --- a/BizHawk.Emulation.Cores/Waterbox/PeWrapper.cs +++ b/BizHawk.Emulation.Cores/Waterbox/PeWrapper.cs @@ -51,22 +51,22 @@ namespace BizHawk.Emulation.Cores.Waterbox private readonly byte[] _fileHash; public ulong Size { get; } - public ulong Start { get; private set; } + public ulong Start { get; } - public long LoadOffset { get; private set; } + public long LoadOffset { get; } public MemoryBlockBase Memory { get; private set; } - public IntPtr EntryPoint { get; private set; } + public IntPtr EntryPoint { get; } /// - /// for midipix-built PEs, pointer to the construtors to run during init + /// for midipix-built PEs, pointer to the constructors to run during init /// - public IntPtr CtorList { get; private set; } + public IntPtr CtorList { get; } /// /// for midipix-build PEs, pointer to the destructors to run during fini /// - public IntPtr DtorList { get; private set; } + public IntPtr DtorList { get; } // true if the seal process has completed, including .idata and .sealed set to readonly, // xorstate taken