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