diff --git a/Common.ruleset b/Common.ruleset index f48ce1e29a..6a454aeaf8 100644 --- a/Common.ruleset +++ b/Common.ruleset @@ -454,9 +454,6 @@ - - - diff --git a/src/BizHawk.BizInvoke/BizExvoker.cs b/src/BizHawk.BizInvoke/BizExvoker.cs index 7cdcf74711..57cbf3484c 100644 --- a/src/BizHawk.BizInvoke/BizExvoker.cs +++ b/src/BizHawk.BizInvoke/BizExvoker.cs @@ -100,7 +100,7 @@ namespace BizHawk.BizInvoke public IntPtr GetProcAddrOrThrow(string entryPoint) => EntryPoints.TryGetValue(entryPoint, out var ret) ? ret : throw new InvalidOperationException($"could not find {entryPoint} in exports"); } - static readonly Dictionary Impls = new Dictionary(); + private static readonly Dictionary Impls = new Dictionary(); public static IImportResolver GetExvoker(object o, ICallingConventionAdapter a) diff --git a/src/BizHawk.Bizware.BizwareGL/ArtManager.cs b/src/BizHawk.Bizware.BizwareGL/ArtManager.cs index 2e0d2e88f6..79c19ad85b 100644 --- a/src/BizHawk.Bizware.BizwareGL/ArtManager.cs +++ b/src/BizHawk.Bizware.BizwareGL/ArtManager.cs @@ -48,7 +48,7 @@ namespace BizHawk.Bizware.BizwareGL return LoadArtInternal(new BitmapBuffer(path, new BitmapLoadOptions())); } - Art LoadArtInternal(BitmapBuffer tex) + private Art LoadArtInternal(BitmapBuffer tex) { AssertIsOpen(true); @@ -150,16 +150,16 @@ namespace BizHawk.Bizware.BizwareGL /// /// This is used to remember the original bitmap sources for art files. Once the ArtManager is closed forever, this will be purged /// - readonly Dictionary ArtLooseTextureAssociation = new Dictionary(); + private readonly Dictionary ArtLooseTextureAssociation = new Dictionary(); /// /// Physical texture resources, which exist after this ArtManager has been closed /// - readonly List ManagedTextures = new List(); + private readonly List ManagedTextures = new List(); /// /// All the Arts managed by this instance /// - readonly List ManagedArts = new List(); + private readonly List ManagedArts = new List(); } } \ No newline at end of file diff --git a/src/BizHawk.Bizware.BizwareGL/BitmapBuffer.cs b/src/BizHawk.Bizware.BizwareGL/BitmapBuffer.cs index 11c87d13d8..d57c6a4d3c 100644 --- a/src/BizHawk.Bizware.BizwareGL/BitmapBuffer.cs +++ b/src/BizHawk.Bizware.BizwareGL/BitmapBuffer.cs @@ -288,7 +288,7 @@ namespace BizHawk.Bizware.BizwareGL HasAlpha = false; } - void LoadInternal(Stream stream, Bitmap bitmap, BitmapLoadOptions options) + private void LoadInternal(Stream stream, Bitmap bitmap, BitmapLoadOptions options) { bool cleanup = options.CleanupAlpha0; bool needsPad = true; @@ -475,7 +475,7 @@ namespace BizHawk.Bizware.BizwareGL } } - void InitSize(int width, int height) + private void InitSize(int width, int height) { Pixels = new int[width * height]; Width = width; diff --git a/src/BizHawk.Bizware.BizwareGL/GdiPlusGuiRenderer.cs b/src/BizHawk.Bizware.BizwareGL/GdiPlusGuiRenderer.cs index e3f3761db9..d05d7bc95e 100644 --- a/src/BizHawk.Bizware.BizwareGL/GdiPlusGuiRenderer.cs +++ b/src/BizHawk.Bizware.BizwareGL/GdiPlusGuiRenderer.cs @@ -17,7 +17,7 @@ namespace BizHawk.Bizware.BizwareGL Owner = gl; } - readonly OpenTK.Graphics.Color4[] CornerColors = + private readonly OpenTK.Graphics.Color4[] CornerColors = { new OpenTK.Graphics.Color4(1.0f,1.0f,1.0f,1.0f), new OpenTK.Graphics.Color4(1.0f,1.0f,1.0f,1.0f), @@ -57,7 +57,7 @@ namespace BizHawk.Bizware.BizwareGL SetModulateColor(sd.Color.White); } - ImageAttributes CurrentImageAttributes; + private ImageAttributes CurrentImageAttributes; public void SetModulateColor(sd.Color color) { //white is really no color at all @@ -86,15 +86,15 @@ namespace BizHawk.Bizware.BizwareGL CurrentImageAttributes.SetColorMatrix(colorMatrix,ColorMatrixFlag.Default, ColorAdjustType.Bitmap); } - sd.Color CurrentModulateColor = sd.Color.White; + private sd.Color CurrentModulateColor = sd.Color.White; - IBlendState CurrentBlendState; + private IBlendState CurrentBlendState; public void SetBlendState(IBlendState rsBlend) { CurrentBlendState = rsBlend; } - MatrixStack _Projection, _Modelview; + private MatrixStack _Projection, _Modelview; public MatrixStack Projection { get => _Projection; @@ -194,7 +194,7 @@ namespace BizHawk.Bizware.BizwareGL DrawInternal(art, x, y, width, height); } - void PrepDraw(sd.Graphics g, Texture2d tex) + private void PrepDraw(sd.Graphics g, Texture2d tex) { var tw = tex.Opaque as GDIPTextureWrapper; //TODO - we can support bicubic for the final presentation.. @@ -237,17 +237,17 @@ namespace BizHawk.Bizware.BizwareGL g.Transform = new sd.Drawing2D.Matrix(mat.M11, mat.M12, mat.M21, mat.M22, mat.M41, mat.M42); } - unsafe void DrawInternal(Art art, float x, float y, float w, float h) + private unsafe void DrawInternal(Art art, float x, float y, float w, float h) { DrawInternal(art.BaseTexture, x, y, w, h, art.u0, art.v0, art.u1, art.v1); } - unsafe void DrawInternal(Texture2d tex, float x, float y, float w, float h) + private unsafe void DrawInternal(Texture2d tex, float x, float y, float w, float h) { DrawInternal(tex, x, y, w, h, 0, 0, 1, 1); } - unsafe void DrawInternal(Texture2d tex, float x, float y, float w, float h, float u0, float v0, float u1, float v1) + private unsafe void DrawInternal(Texture2d tex, float x, float y, float w, float h, float u0, float v0, float u1, float v1) { var g = ((dynamic) Gdi).GetCurrentGraphics() as sd.Graphics; PrepDraw(g, tex); @@ -273,7 +273,7 @@ namespace BizHawk.Bizware.BizwareGL g.Transform = new sd.Drawing2D.Matrix(); //.Reset() doesn't work ? ? } - unsafe void DrawInternal(Art art, float x, float y, float w, float h, bool fx, bool fy) + private unsafe void DrawInternal(Art art, float x, float y, float w, float h, bool fx, bool fy) { } diff --git a/src/BizHawk.Bizware.BizwareGL/GuiRenderer.cs b/src/BizHawk.Bizware.BizwareGL/GuiRenderer.cs index 7f18a7ab33..91f569fae0 100644 --- a/src/BizHawk.Bizware.BizwareGL/GuiRenderer.cs +++ b/src/BizHawk.Bizware.BizwareGL/GuiRenderer.cs @@ -50,7 +50,7 @@ namespace BizHawk.Bizware.BizwareGL CurrPipeline = DefaultPipeline = Owner.CreatePipeline(VertexLayout, vs, ps, true, "xgui"); } - readonly OpenTK.Graphics.Color4[] CornerColors = new OpenTK.Graphics.Color4[4] { + private readonly OpenTK.Graphics.Color4[] CornerColors = new OpenTK.Graphics.Color4[4] { new OpenTK.Graphics.Color4(1.0f,1.0f,1.0f,1.0f),new OpenTK.Graphics.Color4(1.0f,1.0f,1.0f,1.0f),new OpenTK.Graphics.Color4(1.0f,1.0f,1.0f,1.0f),new OpenTK.Graphics.Color4(1.0f,1.0f,1.0f,1.0f) }; @@ -114,7 +114,7 @@ namespace BizHawk.Bizware.BizwareGL Owner.SetBlendState(rsBlend); } - MatrixStack _Projection, _Modelview; + private MatrixStack _Projection, _Modelview; public MatrixStack Projection { get => _Projection; @@ -221,7 +221,7 @@ namespace BizHawk.Bizware.BizwareGL DrawInternal(art, x, y, width, height); } - unsafe void DrawInternal(Texture2d tex, float x, float y, float w, float h) + private unsafe void DrawInternal(Texture2d tex, float x, float y, float w, float h) { Art art = new Art((ArtManager)null); art.Width = w; @@ -232,7 +232,7 @@ namespace BizHawk.Bizware.BizwareGL DrawInternal(art, x, y, w, h, false, tex.IsUpsideDown); } - unsafe void DrawInternal(Art art, float x, float y, float w, float h, bool fx, bool fy) + private unsafe void DrawInternal(Art art, float x, float y, float w, float h, bool fx, bool fy) { //TEST: d3d shouldn't ever use this, it was a gl hack. maybe we can handle it some other way in gl (fix the projection? take a render-to-texture arg to the gui view transforms?) fy = false; @@ -261,7 +261,7 @@ namespace BizHawk.Bizware.BizwareGL } } - unsafe void PrepDrawSubrectInternal(Texture2d tex) + private unsafe void PrepDrawSubrectInternal(Texture2d tex) { if (sTexture != tex) { @@ -289,7 +289,7 @@ namespace BizHawk.Bizware.BizwareGL } } - unsafe void EmitRectangleInternal(float x, float y, float w, float h, float u0, float v0, float u1, float v1) + private unsafe void EmitRectangleInternal(float x, float y, float w, float h, float u0, float v0, float u1, float v1) { float* pData = stackalloc float[32]; pData[0] = x; @@ -333,7 +333,7 @@ namespace BizHawk.Bizware.BizwareGL #endif } - unsafe void DrawSubrectInternal(Texture2d tex, float x, float y, float w, float h, float u0, float v0, float u1, float v1) + private unsafe void DrawSubrectInternal(Texture2d tex, float x, float y, float w, float h, float u0, float v0, float u1, float v1) { PrepDrawSubrectInternal(tex); EmitRectangleInternal(x, y, w, h, u0, v0, u1, v1); @@ -342,14 +342,14 @@ namespace BizHawk.Bizware.BizwareGL public bool IsActive { get; private set; } public IGL Owner { get; } - readonly VertexLayout VertexLayout; - Pipeline CurrPipeline; - readonly Pipeline DefaultPipeline; + private readonly VertexLayout VertexLayout; + private Pipeline CurrPipeline; + private readonly Pipeline DefaultPipeline; //state cache - Texture2d sTexture; + private Texture2d sTexture; #if DEBUG - bool BlendStateSet; + private bool BlendStateSet; #endif //shaders are hand-coded for each platform to make sure they stay as fast as possible diff --git a/src/BizHawk.Bizware.BizwareGL/MatrixStack.cs b/src/BizHawk.Bizware.BizwareGL/MatrixStack.cs index 2590f0db56..59adbc50c9 100644 --- a/src/BizHawk.Bizware.BizwareGL/MatrixStack.cs +++ b/src/BizHawk.Bizware.BizwareGL/MatrixStack.cs @@ -29,7 +29,7 @@ namespace BizHawk.Bizware.BizwareGL public bool IsDirty; - readonly Stack stack = new Stack(); + private readonly Stack stack = new Stack(); /// /// This is made public for performance reasons, to avoid lame copies of the matrix when necessary. Don't mess it up! diff --git a/src/BizHawk.Bizware.BizwareGL/Pipeline.cs b/src/BizHawk.Bizware.BizwareGL/Pipeline.cs index 59632feb4b..bdad307bfe 100644 --- a/src/BizHawk.Bizware.BizwareGL/Pipeline.cs +++ b/src/BizHawk.Bizware.BizwareGL/Pipeline.cs @@ -38,14 +38,14 @@ namespace BizHawk.Bizware.BizwareGL /// Allows us to create PipelineUniforms on the fly, in case a non-existing one has been requested. /// Shader compilers will optimize out unused uniforms, and we wont have a record of it in the uniforms population loop /// - class SpecialWorkingDictionary : Dictionary + private class SpecialWorkingDictionary : Dictionary { public SpecialWorkingDictionary(Pipeline owner) { Owner = owner; } - Pipeline Owner; + private Pipeline Owner; public new PipelineUniform this[string key] { get @@ -63,8 +63,8 @@ namespace BizHawk.Bizware.BizwareGL } } - readonly SpecialWorkingDictionary UniformsDictionary; - IDictionary Uniforms => UniformsDictionary; + private readonly SpecialWorkingDictionary UniformsDictionary; + private IDictionary Uniforms => UniformsDictionary; public IEnumerable GetUniforms() => Uniforms.Values; diff --git a/src/BizHawk.Bizware.BizwareGL/PipelineUniform.cs b/src/BizHawk.Bizware.BizwareGL/PipelineUniform.cs index f612e0b757..842befbdcd 100644 --- a/src/BizHawk.Bizware.BizwareGL/PipelineUniform.cs +++ b/src/BizHawk.Bizware.BizwareGL/PipelineUniform.cs @@ -24,7 +24,7 @@ namespace BizHawk.Bizware.BizwareGL } public IEnumerable UniformInfos => _UniformInfos; - readonly List _UniformInfos = new List(); + private readonly List _UniformInfos = new List(); /// the first and only /// more than one exists diff --git a/src/BizHawk.Bizware.BizwareGL/RetroShader.cs b/src/BizHawk.Bizware.BizwareGL/RetroShader.cs index 999e9bea58..17ad9abdc7 100644 --- a/src/BizHawk.Bizware.BizwareGL/RetroShader.cs +++ b/src/BizHawk.Bizware.BizwareGL/RetroShader.cs @@ -133,7 +133,7 @@ namespace BizHawk.Bizware.BizwareGL public IGL Owner { get; } - readonly VertexLayout VertexLayout; + private readonly VertexLayout VertexLayout; public Pipeline Pipeline; } } \ No newline at end of file diff --git a/src/BizHawk.Bizware.BizwareGL/Shader.cs b/src/BizHawk.Bizware.BizwareGL/Shader.cs index 12b18bb66a..5e8b7ff587 100644 --- a/src/BizHawk.Bizware.BizwareGL/Shader.cs +++ b/src/BizHawk.Bizware.BizwareGL/Shader.cs @@ -20,7 +20,7 @@ namespace BizHawk.Bizware.BizwareGL public bool Available { get; private set; } public string Errors { get; set; } - int RefCount; + private int RefCount; public void Release() { diff --git a/src/BizHawk.Bizware.BizwareGL/TexAtlas.cs b/src/BizHawk.Bizware.BizwareGL/TexAtlas.cs index 3dad7a55a1..59e2a0f084 100644 --- a/src/BizHawk.Bizware.BizwareGL/TexAtlas.cs +++ b/src/BizHawk.Bizware.BizwareGL/TexAtlas.cs @@ -210,7 +210,7 @@ namespace BizHawk.Bizware.BizwareGL } /// Computes the ratio of used surface area. - float Occupancy() + private float Occupancy() { int totalSurfaceArea = binWidth * binHeight; int usedSurfaceArea = UsedSurfaceArea(root); diff --git a/src/BizHawk.Bizware.BizwareGL/VertexLayout.cs b/src/BizHawk.Bizware.BizwareGL/VertexLayout.cs index a9b6f5bae4..2bafa40b86 100644 --- a/src/BizHawk.Bizware.BizwareGL/VertexLayout.cs +++ b/src/BizHawk.Bizware.BizwareGL/VertexLayout.cs @@ -24,7 +24,7 @@ namespace BizHawk.Bizware.BizwareGL public object Opaque { get; } public IGL Owner { get; } - int RefCount; + private int RefCount; public void Release() { @@ -78,7 +78,7 @@ namespace BizHawk.Bizware.BizwareGL } public MyDictionary Items { get; } - bool Closed = false; + private bool Closed = false; } } \ No newline at end of file diff --git a/src/BizHawk.Client.DiscoHawk/DiscoHawk.cs b/src/BizHawk.Client.DiscoHawk/DiscoHawk.cs index 43c7df4bf7..dc52f8f3af 100644 --- a/src/BizHawk.Client.DiscoHawk/DiscoHawk.cs +++ b/src/BizHawk.Client.DiscoHawk/DiscoHawk.cs @@ -18,7 +18,7 @@ using BizHawk.Emulation.DiscSystem; namespace BizHawk.Client.DiscoHawk { - static class Program + internal static class Program { static Program() { @@ -39,7 +39,7 @@ namespace BizHawk.Client.DiscoHawk } [STAThread] - static void Main(string[] args) + private static void Main(string[] args) { SubMain(args); } @@ -58,7 +58,7 @@ namespace BizHawk.Client.DiscoHawk public static extern bool FreeLibrary(IntPtr hModule); } - static void SubMain(string[] args) + private static void SubMain(string[] args) { // MICROSOFT BROKE DRAG AND DROP IN WINDOWS 7. IT DOESN'T WORK ANYMORE // WELL, OBVIOUSLY IT DOES SOMETIMES. I DON'T REMEMBER THE DETAILS OR WHY WE HAD TO DO THIS SHIT @@ -114,16 +114,17 @@ namespace BizHawk.Client.DiscoHawk //declared here instead of a more usual place to avoid dependencies on the more usual place #if WINDOWS [DllImport("kernel32.dll", SetLastError = true)] - static extern bool SetDllDirectory(string lpPathName); + private static extern bool SetDllDirectory(string lpPathName); [DllImport("kernel32.dll", EntryPoint = "DeleteFileW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true)] - static extern bool DeleteFileW([MarshalAs(UnmanagedType.LPWStr)]string lpFileName); - static void RemoveMOTW(string path) + private static extern bool DeleteFileW([MarshalAs(UnmanagedType.LPWStr)]string lpFileName); + + private static void RemoveMOTW(string path) { DeleteFileW($"{path}:Zone.Identifier"); } - static void WhackAllMOTW(string dllDir) + private static void WhackAllMOTW(string dllDir) { var todo = new Queue(new[] { new DirectoryInfo(dllDir) }); while (todo.Count > 0) diff --git a/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs b/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs index e02465c2ba..fe7914b6ca 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs @@ -68,8 +68,8 @@ namespace BizHawk.Client.EmuHawk // thread communication // synchronized queue with custom messages // it seems like there are 99999 ways to do everything in C#, so i'm sure this is not the best - System.Collections.Concurrent.BlockingCollection threadQ; - System.Threading.Thread workerT; + private System.Collections.Concurrent.BlockingCollection threadQ; + private System.Threading.Thread workerT; private void threadproc() { @@ -562,7 +562,7 @@ namespace BizHawk.Client.EmuHawk { } - unsafe class AviWriterSegment : IDisposable + private unsafe class AviWriterSegment : IDisposable { static AviWriterSegment() { @@ -627,7 +627,7 @@ namespace BizHawk.Client.EmuHawk private static bool FAILED(int hr) => hr < 0; - static unsafe int AVISaveOptions(IntPtr stream, ref AVIWriterImports.AVICOMPRESSOPTIONS opts, IntPtr owner) + private static unsafe int AVISaveOptions(IntPtr stream, ref AVIWriterImports.AVICOMPRESSOPTIONS opts, IntPtr owner) { fixed (AVIWriterImports.AVICOMPRESSOPTIONS* _popts = &opts) { @@ -638,7 +638,7 @@ namespace BizHawk.Client.EmuHawk } } - Parameters parameters; + private Parameters parameters; /// unmanaged call failed public void OpenFile(string destPath, Parameters parameters, CodecToken videoCodecToken) @@ -861,7 +861,7 @@ namespace BizHawk.Client.EmuHawk } } - unsafe void FlushBufferedAudio() + private unsafe void FlushBufferedAudio() { int todo = outStatus.audio_buffered_shorts; int todo_realsamples = todo / 2; diff --git a/src/BizHawk.Client.EmuHawk/AVOut/FFmpegDownloaderForm.cs b/src/BizHawk.Client.EmuHawk/AVOut/FFmpegDownloaderForm.cs index 06397e4d3a..3656b9d1a9 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/FFmpegDownloaderForm.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/FFmpegDownloaderForm.cs @@ -23,17 +23,17 @@ namespace BizHawk.Client.EmuHawk if (OSTailoredCode.IsUnixHost) textBox1.Text = string.Join("\n", textBox1.Text.Split('\n').Take(3)) + $"\n\n(Linux user: Create a symlink with the below filename pointing to the ffmpeg binary with version {FFmpegService.Version}.)"; } - int pct = 0; - bool exiting = false; - bool succeeded = false; - bool failed = false; + private int pct = 0; + private bool exiting = false; + private bool succeeded = false; + private bool failed = false; - void ThreadProc() + private void ThreadProc() { Download(); } - void Download() + private void Download() { //the temp file is owned by this thread var fn = TempFileManager.GetTempFilename("ffmpeg_download", ".7z", false); diff --git a/src/BizHawk.Client.EmuHawk/AVOut/GifWriter.cs b/src/BizHawk.Client.EmuHawk/AVOut/GifWriter.cs index 4f4496e542..bb70b0059e 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/GifWriter.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/GifWriter.cs @@ -141,12 +141,12 @@ namespace BizHawk.Client.EmuHawk /// /// precooked gif header /// - static byte[] GifAnimation = { 33, 255, 11, 78, 69, 84, 83, 67, 65, 80, 69, 50, 46, 48, 3, 1, 0, 0, 0 }; + private static byte[] GifAnimation = { 33, 255, 11, 78, 69, 84, 83, 67, 65, 80, 69, 50, 46, 48, 3, 1, 0, 0, 0 }; /// /// little endian frame length in 10ms units /// - byte[] Delay = {100, 0}; + private byte[] Delay = {100, 0}; public void AddFrame(IVideoProvider source) { diff --git a/src/BizHawk.Client.EmuHawk/AVOut/NutMuxer.cs b/src/BizHawk.Client.EmuHawk/AVOut/NutMuxer.cs index 7ceb6034cd..e84877247a 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/NutMuxer.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/NutMuxer.cs @@ -107,7 +107,7 @@ namespace BizHawk.Client.EmuHawk /// /// variable length value, unsigned /// - static void WriteVarU(int v, Stream stream) + private static void WriteVarU(int v, Stream stream) { if (v < 0) { @@ -141,7 +141,7 @@ namespace BizHawk.Client.EmuHawk /// /// arbitrary sequence of bytes with length prepended /// - static void WriteBytes(byte[] b, Stream stream) + private static void WriteBytes(byte[] b, Stream stream) { WriteVarU(b.Length, stream); stream.Write(b, 0, b.Length); @@ -338,7 +338,7 @@ namespace BizHawk.Client.EmuHawk // audio packets waiting to be written private readonly Queue _audioQueue; - readonly ReusableBufferPool _bufferPool = new ReusableBufferPool(12); + private readonly ReusableBufferPool _bufferPool = new ReusableBufferPool(12); /// /// write out the main header diff --git a/src/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs b/src/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs index 9083b6ae3e..2a67e5bd12 100644 --- a/src/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs +++ b/src/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs @@ -106,7 +106,7 @@ namespace BizHawk.Client.EmuHawk // ReSharper disable once UnusedAutoPropertyAccessor.Local [RequiredService] - IEmulator Emulator { get; set; } + private IEmulator Emulator { get; set; } protected override string WindowTitleStatic => "Core Features"; diff --git a/src/BizHawk.Client.EmuHawk/CustomControls/ExceptionBox.cs b/src/BizHawk.Client.EmuHawk/CustomControls/ExceptionBox.cs index b526c96192..12da757f54 100644 --- a/src/BizHawk.Client.EmuHawk/CustomControls/ExceptionBox.cs +++ b/src/BizHawk.Client.EmuHawk/CustomControls/ExceptionBox.cs @@ -20,7 +20,7 @@ namespace BizHawk.Client.EmuHawk DoCopy(); } - void DoCopy() + private void DoCopy() { string txt = txtException.Text; Clipboard.SetText(txt); @@ -67,7 +67,7 @@ namespace BizHawk.Client.EmuHawk } //http://stackoverflow.com/questions/2636065/alpha-in-forecolor - class MyLabel : Label + private class MyLabel : Label { protected override void OnPaint(PaintEventArgs e) { diff --git a/src/BizHawk.Client.EmuHawk/CustomControls/MiscControls.cs b/src/BizHawk.Client.EmuHawk/CustomControls/MiscControls.cs index 29fd1ec9ae..dfb7df8e68 100644 --- a/src/BizHawk.Client.EmuHawk/CustomControls/MiscControls.cs +++ b/src/BizHawk.Client.EmuHawk/CustomControls/MiscControls.cs @@ -18,14 +18,14 @@ namespace BizHawk.Client.EmuHawk public class CustomCheckBox : CheckBox { - Color _checkBackColor = SystemColors.Control; + private Color _checkBackColor = SystemColors.Control; public Color CheckBackColor { get => _checkBackColor; set { _checkBackColor = value; Refresh(); } } - bool? _forceChecked; + private bool? _forceChecked; public bool? ForceChecked { get => _forceChecked; diff --git a/src/BizHawk.Client.EmuHawk/CustomControls/MsgBox.cs b/src/BizHawk.Client.EmuHawk/CustomControls/MsgBox.cs index 114517b740..89f6bec8b3 100644 --- a/src/BizHawk.Client.EmuHawk/CustomControls/MsgBox.cs +++ b/src/BizHawk.Client.EmuHawk/CustomControls/MsgBox.cs @@ -10,7 +10,7 @@ namespace BizHawk.Client.EmuHawk.CustomControls /// /// A customizable Dialog box with 3 buttons, custom icon, and checkbox. /// - partial class MsgBox : Form + internal partial class MsgBox : Form { private readonly Icon _msgIcon; private static readonly int FormYMargin = UIHelper.ScaleY(10); diff --git a/src/BizHawk.Client.EmuHawk/CustomControls/ViewportPanel.cs b/src/BizHawk.Client.EmuHawk/CustomControls/ViewportPanel.cs index 70146a5be0..0a64ac8011 100644 --- a/src/BizHawk.Client.EmuHawk/CustomControls/ViewportPanel.cs +++ b/src/BizHawk.Client.EmuHawk/CustomControls/ViewportPanel.cs @@ -12,9 +12,9 @@ namespace BizHawk.Client.EmuHawk /// public class RetainedViewportPanel : Control { - Thread threadPaint; - EventWaitHandle ewh; - volatile bool killSignal; + private Thread threadPaint; + private EventWaitHandle ewh; + private volatile bool killSignal; public Func ReleaseCallback; @@ -57,7 +57,7 @@ namespace BizHawk.Client.EmuHawk public bool ScaleImage = true; - void DoPaint() + private void DoPaint() { if (bmp != null) { @@ -86,7 +86,7 @@ namespace BizHawk.Client.EmuHawk CleanupDisposeQueue(); } - void PaintProc() + private void PaintProc() { for (; ; ) { @@ -101,7 +101,7 @@ namespace BizHawk.Client.EmuHawk } } - void CleanupDisposeQueue() + private void CleanupDisposeQueue() { lock (this) { @@ -116,9 +116,9 @@ namespace BizHawk.Client.EmuHawk } } - Queue DisposeQueue = new Queue(); + private Queue DisposeQueue = new Queue(); - void SignalPaint() + private void SignalPaint() { if (threadPaint == null) DoPaint(); @@ -139,7 +139,7 @@ namespace BizHawk.Client.EmuHawk SignalPaint(); } - Bitmap bmp; + private Bitmap bmp; /// bit of a hack; use at your own risk /// you probably shouldn't modify this? diff --git a/src/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs b/src/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs index 5a3c5b2fdd..23f64547c0 100644 --- a/src/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs +++ b/src/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs @@ -460,7 +460,7 @@ namespace BizHawk.Client.EmuHawk UpdateSourceInternal(job); } - Filters.BaseFilter CreateCoreScreenControl() + private Filters.BaseFilter CreateCoreScreenControl() { if (GlobalWin.Emulator is MelonDS nds) { @@ -529,7 +529,7 @@ namespace BizHawk.Client.EmuHawk public int VsyncDenominator => throw new InvalidOperationException(); } - void FixRatio(float x, float y, int inw, int inh, out int outW, out int outH) + private void FixRatio(float x, float y, int inw, int inh, out int outW, out int outH) { float ratio = x / y; if (ratio <= 1) diff --git a/src/BizHawk.Client.EmuHawk/DisplayManager/Filters/Gui.cs b/src/BizHawk.Client.EmuHawk/DisplayManager/Filters/Gui.cs index e2bb7f1f98..7e6fed28e1 100644 --- a/src/BizHawk.Client.EmuHawk/DisplayManager/Filters/Gui.cs +++ b/src/BizHawk.Client.EmuHawk/DisplayManager/Filters/Gui.cs @@ -177,22 +177,22 @@ namespace BizHawk.Client.EmuHawk.Filters public IGL GL; public IGuiRenderer GuiRenderer; - MelonDS nds; + private MelonDS nds; //TODO: actually use this - bool nop = false; + private bool nop = false; //matrices used for transforming screens - Matrix4 matTop, matBot; - Matrix4 matTopInvert, matBotInvert; + private Matrix4 matTop, matBot; + private Matrix4 matTopInvert, matBotInvert; //final output area size - Size outputSize; + private Size outputSize; - static float Round(float f) { return (float)Math.Round(f); } + private static float Round(float f) { return (float)Math.Round(f); } //TODO: put somewhere in extension methods useful for fixing deficiencies in opentk matrix types - static Vector2 Transform(Matrix4 m, Vector2 v) + private static Vector2 Transform(Matrix4 m, Vector2 v) { var r = new Vector4(v.X,v.Y,0,1) * m; return new Vector2(r.X, r.Y); @@ -210,7 +210,7 @@ namespace BizHawk.Client.EmuHawk.Filters DeclareInput(SurfaceDisposition.Texture); } - void CrunchNumbers() + private void CrunchNumbers() { MatrixStack top = new MatrixStack(), bot = new MatrixStack(); diff --git a/src/BizHawk.Client.EmuHawk/DisplayManager/Filters/Retro.cs b/src/BizHawk.Client.EmuHawk/DisplayManager/Filters/Retro.cs index b044eebdac..e53e7d9f67 100644 --- a/src/BizHawk.Client.EmuHawk/DisplayManager/Filters/Retro.cs +++ b/src/BizHawk.Client.EmuHawk/DisplayManager/Filters/Retro.cs @@ -17,7 +17,8 @@ namespace BizHawk.Client.EmuHawk.Filters public class RetroShaderChain : IDisposable { private static readonly Regex RxInclude = new Regex(@"^(\s)?\#include(\s)+(""|<)(.*)?(""|>)", RegexOptions.Multiline | RegexOptions.IgnoreCase); - static string ResolveIncludes(string content, string baseDirectory) + + private static string ResolveIncludes(string content, string baseDirectory) { for (; ; ) { diff --git a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/GLControlWrapper_SlimDX9.cs b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/GLControlWrapper_SlimDX9.cs index 9eea2876f3..ff768ff367 100644 --- a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/GLControlWrapper_SlimDX9.cs +++ b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/GLControlWrapper_SlimDX9.cs @@ -22,7 +22,7 @@ namespace BizHawk.Client.EmuHawk public bool Vsync; - void GLControlWrapper_SlimDX_Resize(object sender, EventArgs e) + private void GLControlWrapper_SlimDX_Resize(object sender, EventArgs e) { _sdx.RefreshControlSwapChain(this); } diff --git a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/GraphicsControl.cs b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/GraphicsControl.cs index cde35a4ed8..effc3a96c8 100644 --- a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/GraphicsControl.cs +++ b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/GraphicsControl.cs @@ -45,7 +45,7 @@ namespace BizHawk.Client.EmuHawk /// public bool MainWindow; - void GraphicsControl_Paint(object sender, PaintEventArgs e) + private void GraphicsControl_Paint(object sender, PaintEventArgs e) { OnPaint(e); } @@ -53,7 +53,7 @@ namespace BizHawk.Client.EmuHawk public readonly IGL IGL; private readonly IGraphicsControl _igc; - readonly Control _managed; + private readonly Control _managed; public virtual void SetVsync(bool state) { _igc.SetVsync(state); } public virtual void SwapBuffers() { _igc.SwapBuffers(); } diff --git a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_GdiPlus.cs b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_GdiPlus.cs index b86cf79e88..7ee5a8b119 100644 --- a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_GdiPlus.cs +++ b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_GdiPlus.cs @@ -67,8 +67,9 @@ namespace BizHawk.Client.EmuHawk //TODO for real } - class MyBlendState : IBlendState { } - static readonly MyBlendState _rsBlendNoneVerbatim = new MyBlendState(), _rsBlendNoneOpaque = new MyBlendState(), _rsBlendNormal = new MyBlendState(); + private class MyBlendState : IBlendState { } + + private static readonly MyBlendState _rsBlendNoneVerbatim = new MyBlendState(), _rsBlendNoneOpaque = new MyBlendState(), _rsBlendNormal = new MyBlendState(); public IBlendState BlendNoneCopy => _rsBlendNoneVerbatim; public IBlendState BlendNoneOpaque => _rsBlendNoneOpaque; @@ -268,7 +269,7 @@ namespace BizHawk.Client.EmuHawk { } - IGL_GdiPlus Gdi; + private IGL_GdiPlus Gdi; /// /// the control associated with this render target (if any) @@ -388,7 +389,7 @@ namespace BizHawk.Client.EmuHawk } } - Graphics _CurrentOffscreenGraphics; + private Graphics _CurrentOffscreenGraphics; public Graphics GetCurrentGraphics() { diff --git a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_SlimDX9.cs b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_SlimDX9.cs index 2591c6bc09..0b3385f2af 100644 --- a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_SlimDX9.cs +++ b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_SlimDX9.cs @@ -17,8 +17,8 @@ namespace BizHawk.Client.EmuHawk { public class IGL_SlimDX9 : IGL { - const int D3DERR_DEVICELOST = -2005530520; - const int D3DERR_DEVICENOTRESET = -2005530519; + private const int D3DERR_DEVICELOST = -2005530520; + private const int D3DERR_DEVICENOTRESET = -2005530519; private static Direct3D _d3d; internal Device Dev; diff --git a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_TK.cs b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_TK.cs index fb093d958a..fbaee47271 100644 --- a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_TK.cs +++ b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_TK.cs @@ -635,13 +635,13 @@ namespace BizHawk.Client.EmuHawk //------------------ - INativeWindow OffscreenNativeWindow; - IGraphicsContext GraphicsContext; + private INativeWindow OffscreenNativeWindow; + private IGraphicsContext GraphicsContext; //--------------- //my utility methods - GLControl CastControl(swf.Control swfControl) + private GLControl CastControl(swf.Control swfControl) { GLControl glc = swfControl as GLControl; if (glc == null) @@ -649,7 +649,7 @@ namespace BizHawk.Client.EmuHawk return glc; } - Shader CreateShader(ShaderType type, string source, string entry, bool required) + private Shader CreateShader(ShaderType type, string source, string entry, bool required) { var sw = new ShaderWrapper(); string info = ""; @@ -670,7 +670,7 @@ namespace BizHawk.Client.EmuHawk return ret; } - bool CompileShaderSimple(int sid, string source, bool required) + private bool CompileShaderSimple(int sid, string source, bool required) { bool success = true; ErrorCode errcode; @@ -716,7 +716,7 @@ namespace BizHawk.Client.EmuHawk return success; } - void UnbindVertexAttributes() + private void UnbindVertexAttributes() { //HAMNUTS: //its not clear how many bindings we'll have to disable before we can enable the ones we need.. @@ -727,7 +727,7 @@ namespace BizHawk.Client.EmuHawk currBindings.Clear(); } - unsafe void MyBindArrayData(VertexLayout layout, void* pData) + private unsafe void MyBindArrayData(VertexLayout layout, void* pData) { UnbindVertexAttributes(); @@ -798,7 +798,7 @@ namespace BizHawk.Client.EmuHawk PurgeStateCache(); } - void CreateRenderStates() + private void CreateRenderStates() { _rsBlendNoneVerbatim = new CacheBlendState( false, @@ -816,14 +816,15 @@ namespace BizHawk.Client.EmuHawk BlendingFactorSrc.One, BlendEquationMode.FuncAdd, BlendingFactorDest.Zero); } - CacheBlendState _rsBlendNoneVerbatim, _rsBlendNoneOpaque, _rsBlendNormal; + private CacheBlendState _rsBlendNoneVerbatim, _rsBlendNoneOpaque, _rsBlendNormal; //state caches - int sActiveTexture; - VertexLayout sStateCurrentVertexLayout; - VertexLayout sStatePendingVertexLayout; - HashSet sVertexAttribEnables = new HashSet(); - void PurgeStateCache() + private int sActiveTexture; + private VertexLayout sStateCurrentVertexLayout; + private VertexLayout sStatePendingVertexLayout; + private HashSet sVertexAttribEnables = new HashSet(); + + private void PurgeStateCache() { sStateCurrentVertexLayout = null; sStatePendingVertexLayout = null; diff --git a/src/BizHawk.Client.EmuHawk/Input/GamePad.cs b/src/BizHawk.Client.EmuHawk/Input/GamePad.cs index 45bcb1a8f9..8e0ed9649b 100644 --- a/src/BizHawk.Client.EmuHawk/Input/GamePad.cs +++ b/src/BizHawk.Client.EmuHawk/Input/GamePad.cs @@ -92,7 +92,7 @@ namespace BizHawk.Client.EmuHawk private readonly Joystick _joystick; private JoystickState _state = new JoystickState(); - GamePad(Joystick joystick, int index) + private GamePad(Joystick joystick, int index) { _joystick = joystick; PlayerNumber = index + 1; diff --git a/src/BizHawk.Client.EmuHawk/Input/GamePad360.cs b/src/BizHawk.Client.EmuHawk/Input/GamePad360.cs index 722cae0f9b..043b321dc4 100644 --- a/src/BizHawk.Client.EmuHawk/Input/GamePad360.cs +++ b/src/BizHawk.Client.EmuHawk/Input/GamePad360.cs @@ -15,7 +15,7 @@ namespace BizHawk.Client.EmuHawk private static readonly List Devices = new List(); private static readonly bool IsAvailable; - delegate uint XInputGetStateExProcDelegate(uint dwUserIndex, out XINPUT_STATE state); + private delegate uint XInputGetStateExProcDelegate(uint dwUserIndex, out XINPUT_STATE state); private static readonly XInputGetStateExProcDelegate XInputGetStateExProc; @@ -123,7 +123,7 @@ namespace BizHawk.Client.EmuHawk public int PlayerNumber => (int)_index0 + 1; - GamePad360(uint index0, Controller c) + private GamePad360(uint index0, Controller c) { this._index0 = index0; _controller = c; diff --git a/src/BizHawk.Client.EmuHawk/Input/IPCKeyInput.cs b/src/BizHawk.Client.EmuHawk/Input/IPCKeyInput.cs index ec59956e1d..b4389ce871 100644 --- a/src/BizHawk.Client.EmuHawk/Input/IPCKeyInput.cs +++ b/src/BizHawk.Client.EmuHawk/Input/IPCKeyInput.cs @@ -19,7 +19,7 @@ namespace BizHawk.Client.EmuHawk private static readonly List PendingEventList = new List(); private static readonly List EventList = new List(); - static void IPCThread() + private static void IPCThread() { string pipeName = $"bizhawk-pid-{System.Diagnostics.Process.GetCurrentProcess().Id}-IPCKeyInput"; diff --git a/src/BizHawk.Client.EmuHawk/Throttle.cs b/src/BizHawk.Client.EmuHawk/Throttle.cs index aa8ae167d9..4951d1db51 100644 --- a/src/BizHawk.Client.EmuHawk/Throttle.cs +++ b/src/BizHawk.Client.EmuHawk/Throttle.cs @@ -11,9 +11,9 @@ namespace BizHawk.Client.EmuHawk { public class Throttle { - int lastSkipRate; - int framesToSkip; - int framesSkipped; + private int lastSkipRate; + private int framesToSkip; + private int framesSkipped; public bool skipNextFrame; //if the emulator is paused then we don't need to behave as if unthrottled @@ -129,7 +129,7 @@ namespace BizHawk.Client.EmuHawk } } - static ulong GetCurTime() + private static ulong GetCurTime() { if (tmethod == 1) return (ulong)Stopwatch.GetTimestamp(); @@ -137,13 +137,13 @@ namespace BizHawk.Client.EmuHawk return (ulong)Environment.TickCount; } - static readonly Func TimeBeginPeriod = OSTailoredCode.IsUnixHost + private static readonly Func TimeBeginPeriod = OSTailoredCode.IsUnixHost ? u => u : (Func) Win32Imports.timeBeginPeriod; - static readonly int tmethod; - static readonly ulong afsfreq; - static readonly ulong tfreq; + private static readonly int tmethod; + private static readonly ulong afsfreq; + private static readonly ulong tfreq; static Throttle() { @@ -170,7 +170,7 @@ namespace BizHawk.Client.EmuHawk SetSpeedPercent(target_pct); } - int pct = -1; + private int pct = -1; public void SetSpeedPercent(int percent) { //Console.WriteLine($"throttle set percent {percent}"); @@ -183,17 +183,17 @@ namespace BizHawk.Client.EmuHawk AutoFrameSkip_IgnorePreviousDelay(); } - ulong core_desiredfps; - ulong desiredfps; - float desiredspf; + private ulong core_desiredfps; + private ulong desiredfps; + private float desiredspf; - ulong ltime; - ulong beginticks, endticks, preThrottleEndticks; - float fSkipFrames; - float fSkipFramesError; - int lastSkip; - float lastError; - float integral; + private ulong ltime; + private ulong beginticks, endticks, preThrottleEndticks; + private float fSkipFrames; + private float fSkipFramesError; + private int lastSkip; + private float lastError; + private float integral; public void AutoFrameSkip_IgnorePreviousDelay() { @@ -205,12 +205,12 @@ namespace BizHawk.Client.EmuHawk fSkipFrames *= 0.5f; } - void AutoFrameSkip_BeforeThrottle() + private void AutoFrameSkip_BeforeThrottle() { preThrottleEndticks = GetCurTime(); } - void AutoFrameSkip_NextFrame() + private void AutoFrameSkip_NextFrame() { endticks = GetCurTime(); @@ -264,7 +264,7 @@ namespace BizHawk.Client.EmuHawk beginticks = GetCurTime(); } - int AutoFrameSkip_GetSkipAmount(int min, int max) + private int AutoFrameSkip_GetSkipAmount(int min, int max) { int rv = (int)fSkipFrames; fSkipFramesError += fSkipFrames - rv; @@ -306,7 +306,7 @@ namespace BizHawk.Client.EmuHawk return rv; } - void SpeedThrottle(Sound sound, bool paused) + private void SpeedThrottle(Sound sound, bool paused) { AutoFrameSkip_BeforeThrottle(); diff --git a/src/BizHawk.Client.EmuHawk/tools/BatchRun.cs b/src/BizHawk.Client.EmuHawk/tools/BatchRun.cs index 57431cf8c3..409a7aa4d4 100644 --- a/src/BizHawk.Client.EmuHawk/tools/BatchRun.cs +++ b/src/BizHawk.Client.EmuHawk/tools/BatchRun.cs @@ -100,7 +100,7 @@ namespace BizHawk.Client.EmuHawk this.Invoke(() => _thread = null); } - void br_OnProgress(object sender, BatchRunner.ProgressEventArgs e) + private void br_OnProgress(object sender, BatchRunner.ProgressEventArgs e) { this.Invoke(() => ProgressUpdate(e.Completed, e.Total)); e.ShouldCancel = false; diff --git a/src/BizHawk.Client.EmuHawk/tools/CDL.cs b/src/BizHawk.Client.EmuHawk/tools/CDL.cs index 855c1d2f4f..eb62aed46c 100644 --- a/src/BizHawk.Client.EmuHawk/tools/CDL.cs +++ b/src/BizHawk.Client.EmuHawk/tools/CDL.cs @@ -49,7 +49,7 @@ namespace BizHawk.Client.EmuHawk [RequiredService] private IMemoryDomains MemoryDomains { get; set; } - ICodeDataLogger _icdlogger; + private ICodeDataLogger _icdlogger; [RequiredService] private ICodeDataLogger CodeDataLogger @@ -306,7 +306,7 @@ namespace BizHawk.Client.EmuHawk RecentSubMenu.DropDownItems.AddRange(_recent.RecentMenu(LoadFile, "Session")); } - void NewFileLogic() + private void NewFileLogic() { _cdl = new CodeDataLog(); CodeDataLogger.NewCDL(_cdl); @@ -355,7 +355,7 @@ namespace BizHawk.Client.EmuHawk LoadFile(file.FullName); } - void RunSave() + private void RunSave() { _recent.Add(_currentFilename); using var fs = new FileStream(_currentFilename, FileMode.Create, FileAccess.Write); @@ -382,7 +382,7 @@ namespace BizHawk.Client.EmuHawk /// /// returns false if the operation was canceled /// - bool RunSaveAs() + private bool RunSaveAs() { var file = SaveFileDialog( _currentFilename, @@ -467,7 +467,7 @@ namespace BizHawk.Client.EmuHawk } } - void ShutdownCDL() + private void ShutdownCDL() { _cdl = null; CodeDataLogger?.SetCDL(null); diff --git a/src/BizHawk.Client.EmuHawk/tools/GB/GBGPUView.cs b/src/BizHawk.Client.EmuHawk/tools/GB/GBGPUView.cs index f933dfe3ac..8921ca2cbd 100644 --- a/src/BizHawk.Client.EmuHawk/tools/GB/GBGPUView.cs +++ b/src/BizHawk.Client.EmuHawk/tools/GB/GBGPUView.cs @@ -110,7 +110,7 @@ namespace BizHawk.Client.EmuHawk /// top left origin on 32bit bitmap /// pitch of bitmap in 4 byte units /// 4 palette colors - static unsafe void DrawTile(byte* tile, int* dest, int pitch, int* pal) + private static unsafe void DrawTile(byte* tile, int* dest, int pitch, int* pal) { for (int y = 0; y < 8; y++) { @@ -139,7 +139,7 @@ namespace BizHawk.Client.EmuHawk /// 4 palette colors /// true to flip horizontally /// true to flip vertically - static unsafe void DrawTileHv(byte* tile, int* dest, int pitch, int* pal, bool hFlip, bool vFlip) + private static unsafe void DrawTileHv(byte* tile, int* dest, int pitch, int* pal, bool hFlip, bool vFlip) { if (vFlip) dest += pitch * 7; @@ -180,7 +180,7 @@ namespace BizHawk.Client.EmuHawk /// base tiledata location. second bank tiledata assumed to be @+8k /// true if tileindexes are s8 (not u8) /// 8 palettes (4 colors each) - static unsafe void DrawBgCgb(Bitmap b, IntPtr _map, IntPtr tiles, bool wrap, IntPtr _pal) + private static unsafe void DrawBgCgb(Bitmap b, IntPtr _map, IntPtr tiles, bool wrap, IntPtr _pal) { var lockData = b.LockBits(new Rectangle(0, 0, 256, 256), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); byte* map = (byte*)_map; @@ -335,7 +335,7 @@ namespace BizHawk.Client.EmuHawk /// bitmap to draw to. should be numpals x 4 /// start of palettes /// number of palettes (not colors) - static unsafe void DrawPal(Bitmap b, IntPtr _pal, int numpals) + private static unsafe void DrawPal(Bitmap b, IntPtr _pal, int numpals) { var lockData = b.LockBits(new Rectangle(0, 0, numpals, 4), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); int* dest = (int*)lockData.Scan0; @@ -355,7 +355,7 @@ namespace BizHawk.Client.EmuHawk b.UnlockBits(lockData); } - void ScanlineCallback(byte lcdc) + private void ScanlineCallback(byte lcdc) { using (_memory.EnterExit()) { @@ -486,7 +486,7 @@ namespace BizHawk.Client.EmuHawk private void radioButtonRefreshScanline_CheckedChanged(object sender, EventArgs e) { ComputeRefreshValues(); } private void radioButtonRefreshManual_CheckedChanged(object sender, EventArgs e) { ComputeRefreshValues(); } - void ComputeRefreshValues() + private void ComputeRefreshValues() { if (radioButtonRefreshFrame.Checked) { @@ -642,7 +642,7 @@ namespace BizHawk.Client.EmuHawk } } - unsafe void TileMouseover(int x, int y, bool secondBank) + private unsafe void TileMouseover(int x, int y, bool secondBank) { using (_memory.EnterExit()) { @@ -669,7 +669,7 @@ namespace BizHawk.Client.EmuHawk } } - unsafe void TileMapMouseover(int x, int y, bool win) + private unsafe void TileMapMouseover(int x, int y, bool win) { using (_memory.EnterExit()) { @@ -714,7 +714,7 @@ namespace BizHawk.Client.EmuHawk } } - unsafe void SpriteMouseover(int x, int y) + private unsafe void SpriteMouseover(int x, int y) { using (_memory.EnterExit()) { diff --git a/src/BizHawk.Client.EmuHawk/tools/GBA/GBAGPUView.cs b/src/BizHawk.Client.EmuHawk/tools/GBA/GBAGPUView.cs index 9f9aa82d0b..6faccfeb6f 100644 --- a/src/BizHawk.Client.EmuHawk/tools/GBA/GBAGPUView.cs +++ b/src/BizHawk.Client.EmuHawk/tools/GBA/GBAGPUView.cs @@ -121,7 +121,7 @@ namespace BizHawk.Client.EmuHawk } } - unsafe void DrawTextNameTable16(int* dest, int pitch, ushort* nametable, byte* tiles) + private unsafe void DrawTextNameTable16(int* dest, int pitch, ushort* nametable, byte* tiles) { for (int ty = 0; ty < 32; ty++) { @@ -136,7 +136,7 @@ namespace BizHawk.Client.EmuHawk } } - unsafe void DrawTextNameTable256(int* dest, int pitch, ushort* nametable, byte* tiles) + private unsafe void DrawTextNameTable256(int* dest, int pitch, ushort* nametable, byte* tiles) { for (int ty = 0; ty < 32; ty++) { @@ -151,7 +151,7 @@ namespace BizHawk.Client.EmuHawk } } - unsafe void DrawTextNameTable(int* dest, int pitch, ushort* nametable, byte* tiles, bool eightbit) + private unsafe void DrawTextNameTable(int* dest, int pitch, ushort* nametable, byte* tiles, bool eightbit) { if (eightbit) DrawTextNameTable256(dest, pitch, nametable, tiles); @@ -159,7 +159,7 @@ namespace BizHawk.Client.EmuHawk DrawTextNameTable16(dest, pitch, nametable, tiles); } - unsafe void DrawTextBG(int n, MobileBmpView mbv) + private unsafe void DrawTextBG(int n, MobileBmpView mbv) { ushort bgcnt = ((ushort*)_mmio)[4 + n]; int ssize = bgcnt >> 14; @@ -218,7 +218,7 @@ namespace BizHawk.Client.EmuHawk mbv.BmpView.Refresh(); } - unsafe void DrawAffineBG(int n, MobileBmpView mbv) + private unsafe void DrawAffineBG(int n, MobileBmpView mbv) { ushort bgcnt = ((ushort*)_mmio)[4 + n]; int ssize = bgcnt >> 14; @@ -254,7 +254,7 @@ namespace BizHawk.Client.EmuHawk mbv.BmpView.Refresh(); } - unsafe void DrawM3BG(MobileBmpView mbv) + private unsafe void DrawM3BG(MobileBmpView mbv) { mbv.ChangeAllSizes(240, 160); Bitmap bmp = mbv.BmpView.Bmp; @@ -280,7 +280,7 @@ namespace BizHawk.Client.EmuHawk mbv.BmpView.Refresh(); } - unsafe void DrawM4BG(MobileBmpView mbv, bool secondFrame) + private unsafe void DrawM4BG(MobileBmpView mbv, bool secondFrame) { mbv.ChangeAllSizes(240, 160); Bitmap bmp = mbv.BmpView.Bmp; @@ -307,7 +307,7 @@ namespace BizHawk.Client.EmuHawk mbv.BmpView.Refresh(); } - unsafe void DrawM5BG(MobileBmpView mbv, bool secondFrame) + private unsafe void DrawM5BG(MobileBmpView mbv, bool secondFrame) { mbv.ChangeAllSizes(160, 128); Bitmap bmp = mbv.BmpView.Bmp; @@ -332,7 +332,7 @@ namespace BizHawk.Client.EmuHawk private static readonly int[, ,] SpriteSizes = { { { 1, 1 }, { 2, 2 }, { 4, 4 }, { 8, 8 } }, { { 2, 1 }, { 4, 1 }, { 4, 2 }, { 8, 4 } }, { { 1, 2 }, { 1, 4 }, { 2, 4 }, { 4, 8 } } }; - unsafe void DrawSprite(int* dest, int pitch, ushort* sprite, byte* tiles, bool twodee) + private unsafe void DrawSprite(int* dest, int pitch, ushort* sprite, byte* tiles, bool twodee) { ushort attr0 = sprite[0]; ushort attr1 = sprite[1]; @@ -409,7 +409,7 @@ namespace BizHawk.Client.EmuHawk } } - unsafe void DrawSprites(MobileBmpView mbv) + private unsafe void DrawSprites(MobileBmpView mbv) { mbv.BmpView.ChangeBitmapSize(1024, 512); Bitmap bmp = mbv.BmpView.Bmp; @@ -442,7 +442,7 @@ namespace BizHawk.Client.EmuHawk mbv.BmpView.Refresh(); } - unsafe void DrawPalette(MobileBmpView mbv, bool sprite) + private unsafe void DrawPalette(MobileBmpView mbv, bool sprite) { mbv.BmpView.ChangeBitmapSize(16, 16); Bitmap bmp = mbv.BmpView.Bmp; @@ -465,7 +465,7 @@ namespace BizHawk.Client.EmuHawk mbv.BmpView.Refresh(); } - unsafe void DrawTileRange(int* dest, int pitch, byte* tiles, ushort* palette, int tw, int th, bool eightbit) + private unsafe void DrawTileRange(int* dest, int pitch, byte* tiles, ushort* palette, int tw, int th, bool eightbit) { for (int ty = 0; ty < th; ty++) { @@ -489,7 +489,7 @@ namespace BizHawk.Client.EmuHawk } } - unsafe void DrawSpriteTiles(MobileBmpView mbv, bool tophalfonly, bool eightbit) + private unsafe void DrawSpriteTiles(MobileBmpView mbv, bool tophalfonly, bool eightbit) { int tw = eightbit ? 16 : 32; int th = tophalfonly ? 16 : 32; @@ -516,7 +516,7 @@ namespace BizHawk.Client.EmuHawk mbv.BmpView.Refresh(); } - unsafe void DrawBGTiles(MobileBmpView mbv, bool eightbit) + private unsafe void DrawBGTiles(MobileBmpView mbv, bool eightbit) { int tw = eightbit ? 32 : 64; int th = 32; diff --git a/src/BizHawk.Client.EmuHawk/tools/Genesis/VDPViewer.cs b/src/BizHawk.Client.EmuHawk/tools/Genesis/VDPViewer.cs index cb0862f09b..1b48a99e60 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Genesis/VDPViewer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Genesis/VDPViewer.cs @@ -82,7 +82,7 @@ namespace BizHawk.Client.EmuHawk bv.Refresh(); } - unsafe void DrawPalettes(int* pal) + private unsafe void DrawPalettes(int* pal) { var lockData = bmpViewPal.Bmp.LockBits(new Rectangle(0, 0, 16, 4), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); int pitch = lockData.Stride / sizeof(int); @@ -98,7 +98,7 @@ namespace BizHawk.Client.EmuHawk bmpViewPal.Refresh(); } - unsafe void DrawTiles() + private unsafe void DrawTiles() { var lockData = bmpViewTiles.Bmp.LockBits(new Rectangle(0, 0, 512, 256), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); int pitch = lockData.Stride / sizeof(int); diff --git a/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs b/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs index 45fb50e092..18ade913e5 100644 --- a/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs +++ b/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs @@ -1386,7 +1386,7 @@ namespace BizHawk.Client.EmuHawk FindNextMenuItem.Enabled = !string.IsNullOrWhiteSpace(_findStr); } - string MakeCopyExportString(bool export) + private string MakeCopyExportString(bool export) { // make room for an array with _secondaryHighlightedAddresses and optionally HighlightedAddress long[] addresses = new long[_secondaryHighlightedAddresses.Count + (_highlightedAddress.HasValue ? 1 : 0)]; diff --git a/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.cs b/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.cs index 66b8a2b72f..f379de7a6e 100644 --- a/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.cs @@ -44,7 +44,7 @@ namespace BizHawk.Client.EmuHawk bmpViewSPPal.Refresh(); } - static unsafe void Draw16x16(byte* src, int* dest, int pitch, int* pal) + private static unsafe void Draw16x16(byte* src, int* dest, int pitch, int* pal) { int inc = pitch - 16; dest -= inc; @@ -56,7 +56,7 @@ namespace BizHawk.Client.EmuHawk } } - static unsafe void Draw8x8(byte* src, int* dest, int pitch, int* pal) + private static unsafe void Draw8x8(byte* src, int* dest, int pitch, int* pal) { int inc = pitch - 8; dest -= inc; @@ -68,7 +68,7 @@ namespace BizHawk.Client.EmuHawk } } - unsafe void DrawSprites() + private unsafe void DrawSprites() { Viewer.GetGpuData(checkBoxVDC2.Checked ? 1 : 0, view => { @@ -90,7 +90,7 @@ namespace BizHawk.Client.EmuHawk }); } - unsafe void DrawBacks() + private unsafe void DrawBacks() { Viewer.GetGpuData(checkBoxVDC2.Checked ? 1 : 0, view => { @@ -112,7 +112,7 @@ namespace BizHawk.Client.EmuHawk }); } - unsafe void DrawPalettes() + private unsafe void DrawPalettes() { Viewer.GetGpuData(checkBoxVDC2.Checked ? 1 : 0, view => { @@ -122,7 +122,7 @@ namespace BizHawk.Client.EmuHawk }); } - static unsafe void DrawPalette(Bitmap bmp, int* pal) + private static unsafe void DrawPalette(Bitmap bmp, int* pal) { var lockData = bmp.LockBits(new Rectangle(0, 0, 256, 256), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); diff --git a/src/BizHawk.Client.EmuHawk/tools/SMS/VDPViewer.cs b/src/BizHawk.Client.EmuHawk/tools/SMS/VDPViewer.cs index 6087827674..369a9461ea 100644 --- a/src/BizHawk.Client.EmuHawk/tools/SMS/VDPViewer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/SMS/VDPViewer.cs @@ -31,7 +31,7 @@ namespace BizHawk.Client.EmuHawk protected override void GeneralUpdate() => UpdateBefore(); - static unsafe void Draw8x8(byte* src, int* dest, int pitch, int* pal) + private static unsafe void Draw8x8(byte* src, int* dest, int pitch, int* pal) { int inc = pitch - 8; dest -= inc; @@ -43,7 +43,7 @@ namespace BizHawk.Client.EmuHawk } } - static unsafe void Draw8x8hv(byte* src, int* dest, int pitch, int* pal, bool hflip, bool vflip) + private static unsafe void Draw8x8hv(byte* src, int* dest, int pitch, int* pal, bool hflip, bool vflip) { int incX = hflip ? -1 : 1; int incY = vflip ? -pitch : pitch; @@ -63,7 +63,7 @@ namespace BizHawk.Client.EmuHawk } } - unsafe void DrawTiles(int *pal) + private unsafe void DrawTiles(int *pal) { var lockData = bmpViewTiles.Bmp.LockBits(new Rectangle(0, 0, 256, 128), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); int* dest = (int*)lockData.Scan0; @@ -84,7 +84,7 @@ namespace BizHawk.Client.EmuHawk bmpViewTiles.Refresh(); } - unsafe void DrawBG(int* pal) + private unsafe void DrawBG(int* pal) { int bgHeight = Vdp.FrameHeight == 192 ? 224 : 256; int maxTile = bgHeight * 4; @@ -120,7 +120,7 @@ namespace BizHawk.Client.EmuHawk bmpViewBG.Refresh(); } - unsafe void DrawPal(int* pal) + private unsafe void DrawPal(int* pal) { var lockData = bmpViewPalette.Bmp.LockBits(new Rectangle(0, 0, 16, 2), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); int* dest = (int*)lockData.Scan0; diff --git a/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.cs b/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.cs index 7c1c9a6437..2bc05c8cf3 100644 --- a/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.cs +++ b/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.cs @@ -38,7 +38,7 @@ namespace BizHawk.Client.EmuHawk { public unsafe partial class SNESGraphicsDebugger : ToolFormBase, IToolFormAutoConfig { - readonly List displayTypeItems = new List(); + private readonly List displayTypeItems = new List(); [RequiredService] private LibsnesCore Emulator { get; set; } @@ -122,7 +122,7 @@ namespace BizHawk.Client.EmuHawk return bpp == 0 ? "---" : bpp.ToString(); } - string FormatVramAddress(int address) + private string FormatVramAddress(int address) { int excess = address & 1023; return excess != 0 @@ -169,7 +169,7 @@ namespace BizHawk.Client.EmuHawk suppression = false; } - void SyncCore() + private void SyncCore() { if (currentSnesCore != Emulator) { @@ -334,7 +334,7 @@ namespace BizHawk.Client.EmuHawk } } - eDisplayType CurrDisplaySelection => (comboDisplayType.SelectedValue as eDisplayType?).Value; + private eDisplayType CurrDisplaySelection => (comboDisplayType.SelectedValue as eDisplayType?).Value; //todo - something smarter to cycle through bitmaps without repeatedly trashing them (use the dispose callback on the viewer) private void RenderView() @@ -479,15 +479,17 @@ namespace BizHawk.Client.EmuHawk } } - enum eDisplayType + private enum eDisplayType { BG1 = 1, BG2 = 2, BG3 = 3, BG4 = 4, OBJTiles0, OBJTiles1, Tiles2bpp, Tiles4bpp, Tiles8bpp, TilesMode7, TilesMode7Ext, TilesMode7DC, Sprites, OBJ, BG1Screen = 101, BG2Screen = 102, BG3Screen = 103, BG4Screen = 104 } - static bool IsDisplayTypeBG(eDisplayType type) { return type == eDisplayType.BG1 || type == eDisplayType.BG2 || type == eDisplayType.BG3 || type == eDisplayType.BG4; } - static bool IsDisplayTypeOBJ(eDisplayType type) { return type == eDisplayType.OBJTiles0 || type == eDisplayType.OBJTiles1; } - static int DisplayTypeBGNum(eDisplayType type) { if(IsDisplayTypeBG(type)) return (int)type; else return -1; } - static SNESGraphicsDecoder.BGMode BGModeForDisplayType(eDisplayType type) + + private static bool IsDisplayTypeBG(eDisplayType type) { return type == eDisplayType.BG1 || type == eDisplayType.BG2 || type == eDisplayType.BG3 || type == eDisplayType.BG4; } + private static bool IsDisplayTypeOBJ(eDisplayType type) { return type == eDisplayType.OBJTiles0 || type == eDisplayType.OBJTiles1; } + private static int DisplayTypeBGNum(eDisplayType type) { if(IsDisplayTypeBG(type)) return (int)type; else return -1; } + + private static SNESGraphicsDecoder.BGMode BGModeForDisplayType(eDisplayType type) { switch (type) { @@ -548,7 +550,7 @@ namespace BizHawk.Client.EmuHawk UpdateToolsLoadstate(); } - bool suppression = false; + private bool suppression = false; private void rbBGX_CheckedChanged(object sender, EventArgs e) { if (suppression) return; @@ -599,13 +601,13 @@ namespace BizHawk.Client.EmuHawk return ret; } - Rectangle GetPaletteRegion(SNESGraphicsDecoder.PaletteSelection sel) + private Rectangle GetPaletteRegion(SNESGraphicsDecoder.PaletteSelection sel) { int start = sel.start, num = sel.size; return GetPaletteRegion(start, num); } - void DrawPaletteRegion(Graphics g, Color color, Rectangle region) + private void DrawPaletteRegion(Graphics g, Color color, Rectangle region) { int cellTotalSize = (paletteCellSize + paletteCellSpacing); @@ -827,7 +829,7 @@ namespace BizHawk.Client.EmuHawk //cd.ShowDialog(this); } - void SyncViewerSize() + private void SyncViewerSize() { viewer.Size = check2x.Checked ? new Size(1024, 1024) : new Size(512, 512); } @@ -1011,7 +1013,7 @@ namespace BizHawk.Client.EmuHawk } } - void HandleTileViewMouseOver(int pxacross, int pxtall, int bpp, int tx, int ty) + private void HandleTileViewMouseOver(int pxacross, int pxtall, int bpp, int tx, int ty) { int tileStride = pxacross / 8; int tilesTall = pxtall / 8; @@ -1072,7 +1074,7 @@ namespace BizHawk.Client.EmuHawk SetTab(tpOBJ); } - void SetTab(TabPage tpSet) + private void SetTab(TabPage tpSet) { //doesnt work well //foreach (var tp in tabctrlDetails.TabPages) @@ -1084,7 +1086,7 @@ namespace BizHawk.Client.EmuHawk } } - void UpdateViewerMouseover(Point loc) + private void UpdateViewerMouseover(Point loc) { using (gd.EnterExit()) { @@ -1279,7 +1281,7 @@ namespace BizHawk.Client.EmuHawk RenderTileView(); } - void RefreshBGENCheckStatesFromConfig() + private void RefreshBGENCheckStatesFromConfig() { var s = Emulator.GetSettings(); checkEN0_BG1.Checked = s.ShowBG1_0; diff --git a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ZXSpectrumSchema.cs b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ZXSpectrumSchema.cs index d1c25a18c0..8fb668642f 100644 --- a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ZXSpectrumSchema.cs +++ b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ZXSpectrumSchema.cs @@ -7,7 +7,7 @@ namespace BizHawk.Client.EmuHawk { [Schema("ZXSpectrum")] // ReSharper disable once UnusedMember.Global - class ZxSpectrumSchema : IVirtualPadSchema + internal class ZxSpectrumSchema : IVirtualPadSchema { public IEnumerable GetPadSchemas(IEmulator core) { diff --git a/src/BizHawk.Common/DeepEquality.cs b/src/BizHawk.Common/DeepEquality.cs index c1719a3b8b..b1decac1f2 100644 --- a/src/BizHawk.Common/DeepEquality.cs +++ b/src/BizHawk.Common/DeepEquality.cs @@ -49,7 +49,7 @@ namespace BizHawk.Common } } - static MethodInfo ArrayEqualsGeneric = typeof(DeepEquality).GetMethod("ArrayEquals", BindingFlags.NonPublic | BindingFlags.Static); + private static MethodInfo ArrayEqualsGeneric = typeof(DeepEquality).GetMethod("ArrayEquals", BindingFlags.NonPublic | BindingFlags.Static); /// test if two objects and are equal, field-by-field (with deep inspection of each field) /// is an array with rank > 1 or is a non-zero-indexed array diff --git a/src/BizHawk.Common/TempFileManager.cs b/src/BizHawk.Common/TempFileManager.cs index ef8a329e35..5f0b75fa1c 100644 --- a/src/BizHawk.Common/TempFileManager.cs +++ b/src/BizHawk.Common/TempFileManager.cs @@ -61,7 +61,7 @@ namespace BizHawk.Common } } - static void ThreadProc() + private static void ThreadProc() { // squirrely logic, trying not to create garbage var knownTempDirs = new HashSet(); @@ -120,7 +120,7 @@ namespace BizHawk.Common { } - static Thread thread; + private static Thread thread; public static void HelperSetTempPath(string path) { diff --git a/src/BizHawk.Emulation.Common/Database/Database.cs b/src/BizHawk.Emulation.Common/Database/Database.cs index 244065410a..b65878e46a 100644 --- a/src/BizHawk.Emulation.Common/Database/Database.cs +++ b/src/BizHawk.Emulation.Common/Database/Database.cs @@ -13,12 +13,12 @@ namespace BizHawk.Emulation.Common { public static class Database { - static Dictionary DB = new Dictionary(); + private static Dictionary DB = new Dictionary(); /// /// blocks until the DB is done loading /// - static EventWaitHandle acquire = new EventWaitHandle(false, EventResetMode.ManualReset); + private static EventWaitHandle acquire = new EventWaitHandle(false, EventResetMode.ManualReset); private static string RemoveHashType(string hash) { @@ -89,9 +89,9 @@ namespace BizHawk.Emulation.Common File.AppendAllText(path, sb.ToString()); } - static bool initialized = false; + private static bool initialized = false; - static void initializeWork(string path) + private static void initializeWork(string path) { //reminder: this COULD be done on several threads, if it takes even longer using var reader = new StreamReader(new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read)); diff --git a/src/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj b/src/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj index 511a7cb059..e1ea18ca17 100644 --- a/src/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj +++ b/src/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj @@ -2,6 +2,7 @@ true + $(NoWarn);SA1400 netstandard2.0