From a5d7c98dafe6068eeabc099df4c2e3881d4368ac Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 15 Dec 2019 11:50:21 -0600 Subject: [PATCH] some gpgx code cleanups --- .../Consoles/Sega/gpgx64/GPGX.ITraceable.cs | 12 ++++-------- BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs | 9 ++++----- BizHawk.sln.DotSettings | 3 +++ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ITraceable.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ITraceable.cs index 52e2dc7e76..63acf307a0 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ITraceable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ITraceable.cs @@ -1,15 +1,12 @@ -using BizHawk.Emulation.Common; -using System; -using System.Collections.Generic; -using System.Text; - +using System.Text; using BizHawk.Common.NumberExtensions; +using BizHawk.Emulation.Common; namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx { public partial class GPGX { - private readonly ITraceable Tracer; + private readonly ITraceable _tracer; public class GPGXTraceBuffer : CallbackBasedTraceBuffer { @@ -23,8 +20,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx { var regs = DebuggableCore.GetCpuFlagsAndRegisters(); uint pc = (uint)regs["M68K PC"].Value; - int length; - var disasm = Disassembler.Disassemble(MemoryDomains.SystemBus, pc & 0xFFFFFF, out length); + var disasm = Disassembler.Disassemble(MemoryDomains.SystemBus, pc & 0xFFFFFF, out _); var traceInfo = new TraceInfo { diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs index 2c507c30ca..d47ac6f60a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Runtime.InteropServices; using BizHawk.Common.BizInvoke; @@ -152,8 +151,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx InitMemCallbacks(); KillMemCallbacks(); - Tracer = new GPGXTraceBuffer(this, MemoryDomains, this); - (ServiceProvider as BasicServiceProvider).Register(Tracer); + _tracer = new GPGXTraceBuffer(this, MemoryDomains, this); + (ServiceProvider as BasicServiceProvider).Register(_tracer); } _romfile = null; @@ -385,7 +384,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx return (LibGPGX.INPUT_DEVICE[])input.dev.Clone(); } - public bool IsMegaCD { get { return _cds != null; } } + public bool IsMegaCD => _cds != null; public class VDPView : IMonitor { @@ -429,6 +428,6 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx return new VDPView(v, _elf); } - public DisplayType Region { get; private set; } + public DisplayType Region { get; } } } diff --git a/BizHawk.sln.DotSettings b/BizHawk.sln.DotSettings index bb273a4635..ba09cb2c36 100644 --- a/BizHawk.sln.DotSettings +++ b/BizHawk.sln.DotSettings @@ -83,6 +83,7 @@ GBC GG GL + GPGX ID II IO @@ -276,6 +277,7 @@ True True True + True True True True @@ -291,6 +293,7 @@ True True True + True True True True