From 3ea71a2dda118b0cadd43c75ee6a577d01f5c6a9 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Sat, 8 May 2021 07:10:42 +1000 Subject: [PATCH] EXTERMINATE SPACES --- src/BizHawk.BizInvoke/BizInvoker.cs | 5 +++-- src/BizHawk.BizInvoke/MemoryBlockWindowsPal.cs | 17 ++++++++++++----- src/BizHawk.Bizware.BizwareGL/ArtManager.cs | 2 +- src/BizHawk.Bizware.BizwareGL/AttribUsage.cs | 2 +- src/BizHawk.Bizware.BizwareGL/BitmapBuffer.cs | 2 +- .../BitmapLoadOptions.cs | 2 +- .../GDIPlusGuiRenderer.cs | 11 +++++------ src/BizHawk.Bizware.BizwareGL/IGL.cs | 2 +- src/BizHawk.Bizware.BizwareGL/TexAtlas.cs | 2 +- src/BizHawk.Bizware.DirectX/IGL_SlimDX9.cs | 2 +- src/BizHawk.Bizware.OpenTK3/GuiRenderer.cs | 10 +++++----- src/BizHawk.Bizware.OpenTK3/IGL_TK.cs | 10 +++++----- .../Api/Classes/JoypadApi.cs | 8 ++++---- .../Api/Classes/MemoryApi.cs | 2 +- .../DisplayManager/Filters/BaseFilter.cs | 4 ++-- .../DisplayManager/Filters/Gui.cs | 2 +- .../DisplayManager/Filters/Retro.cs | 2 +- .../SwappableDisplaySurfaceSet.cs | 2 +- src/BizHawk.Client.Common/OpenAdvanced.cs | 4 ++-- src/BizHawk.Client.Common/RomGame.cs | 10 +++++----- .../Sound/Utilities/BufferedAsync.cs | 10 +++++----- .../cheats/GbaGameSharkDecoder.cs | 2 +- src/BizHawk.Client.Common/config/Binding.cs | 2 +- .../config/ConfigEnums.cs | 4 ++-- .../config/PathEntryCollectionExtensions.cs | 2 +- .../config/SaveStateConfig.cs | 4 ++-- .../inputAdapters/AutoPattern.cs | 2 +- .../inputAdapters/InputManager.cs | 4 ++-- .../inputAdapters/UDLRController.cs | 2 +- .../lua/LuaHelperLibs/NESLuaLibrary.cs | 2 +- .../movie/PlatformFrameRates.cs | 2 +- .../movie/SubtitleList.cs | 2 +- .../movie/import/MmvImport.cs | 2 +- .../movie/import/PjmImport.cs | 4 ++-- .../movie/tasproj/IStateManager.cs | 2 +- .../movie/tasproj/StateDictionary.cs | 2 +- .../movie/tasproj/ZwinderStateManager.cs | 2 +- .../rewind/ZwinderBuffer.cs | 2 +- src/BizHawk.Client.Common/tools/CheatList.cs | 2 +- .../tools/Interfaces/IToolForm.cs | 2 +- src/BizHawk.Client.DiscoHawk/About.cs | 2 +- src/BizHawk.Client.DiscoHawk/MainDiscoForm.cs | 2 +- src/BizHawk.Client.EmuHawk/AVOut/AVSync.cs | 6 +++--- src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs | 2 +- .../AVOut/FFmpegWriterForm.cs | 2 +- .../BizBoxInfoControl.cs | 2 +- .../ControlRenderer/GdiPlusRenderer.cs | 2 +- .../CustomControls/ExceptionBox.cs | 2 +- .../CustomControls/InputRoll/InputRoll.cs | 2 +- .../CustomControls/InputWidget.cs | 2 +- .../CustomControls/MiscControls.cs | 2 +- .../DisplayManager/DisplayManager.cs | 2 +- .../Extensions/ToolExtensions.cs | 2 +- .../GraphicsImplementations/IGL_GdiPlus.cs | 4 ++-- src/BizHawk.Client.EmuHawk/IControlMainform.cs | 4 ++-- src/BizHawk.Client.EmuHawk/Input/Input.cs | 4 ++-- src/BizHawk.Client.EmuHawk/MainForm.Events.cs | 4 ++-- .../MainForm.FileLoader.cs | 8 ++++---- src/BizHawk.Client.EmuHawk/MainForm.Hotkey.cs | 18 +++++++++--------- src/BizHawk.Client.EmuHawk/MainForm.cs | 10 +++++----- src/BizHawk.Client.EmuHawk/QuickBmpFile.cs | 4 ++-- .../config/DisplayConfig.cs | 2 +- .../config/FirmwaresConfig.cs | 12 ++++++------ .../config/Messages/ColorRow.cs | 4 ++-- .../config/Messages/MessageConfig.cs | 6 +++--- .../config/Messages/MessageRow.cs | 2 +- .../config/N64/N64VideoPluginconfig.cs | 2 +- .../config/PSX/PSXOptions.cs | 2 +- .../ZXSpectrum/ZXSpectrumJoystickSettings.cs | 2 +- .../ZXSpectrum/ZXSpectrumNonSyncSettings.cs | 2 +- src/BizHawk.Client.EmuHawk/movie/PlayMovie.cs | 2 +- .../tools/BasicBot/BasicBot.cs | 2 +- src/BizHawk.Client.EmuHawk/tools/CDL.cs | 2 +- .../tools/Cheats/CheatEdit.cs | 8 ++++---- .../tools/Cheats/Cheats.cs | 2 +- .../tools/Debugger/GenericDebugger.cs | 2 +- .../tools/HexEditor/HexEditor.cs | 8 ++++---- .../tools/Lua/LuaCanvas.cs | 2 +- .../tools/Lua/LuaConsole.cs | 11 +++++------ .../tools/Macros/MacroInput.cs | 2 +- .../tools/Macros/MovieZone.cs | 6 +++--- .../tools/NES/PaletteViewer.cs | 4 ++-- .../tools/PCE/PCESoundDebugger.cs | 4 ++-- .../tools/PCE/PCETileViewer.cs | 2 +- .../tools/SNES/SNESGraphicsDebugger.cs | 6 +++--- .../tools/TAStudio/BookmarksBranchesBox.cs | 4 ++-- .../tools/TAStudio/TAStudio.ListView.cs | 2 +- .../tools/TAStudio/TAStudio.MenuItems.cs | 2 +- .../tools/TAStudio/TAStudio.cs | 6 +++--- .../tools/ToolManager.cs | 2 +- src/BizHawk.Common/Bit.cs | 2 +- src/BizHawk.Common/CustomCollections.cs | 2 +- src/BizHawk.Common/Log.cs | 2 +- .../BasicServiceProvider.cs | 4 ++-- .../CallbackBasedTraceBuffer.cs | 8 ++++---- .../Base Implementations/CodeDataLog.cs | 4 ++-- .../ControllerDefinition.cs | 2 +- .../MemoryBasedInputCallbackSystem.cs | 4 ++-- .../Base Implementations/MemoryDomainStream.cs | 2 +- .../Database/FirmwareDatabase.cs | 2 +- src/BizHawk.Emulation.Common/Extensions.cs | 2 +- .../Interfaces/IEmulator.cs | 2 +- .../Interfaces/IEmulatorServiceProvider.cs | 4 ++-- .../Interfaces/IInputCallbackSystem.cs | 2 +- .../Interfaces/IMemoryCallbackSystem.cs | 4 ++-- .../Interfaces/Services/ICodeDataLogger.cs | 2 +- .../Interfaces/Services/IMemoryDomains.cs | 2 +- .../Interfaces/Services/ISettable.cs | 2 +- src/BizHawk.Emulation.DiscSystem/Disc.cs | 2 +- .../DiscFormats/Blobs/Blob_ECM.cs | 6 +++--- .../DiscFormats/Blobs/RiffMaster.cs | 6 +++--- .../DiscFormats/CCD_format.cs | 6 +++--- .../DiscFormats/CUE/CUE_Compile.cs | 4 ++-- .../DiscFormats/CUE/CUE_Load.cs | 2 +- .../DiscFormats/CUE/CUE_Synths.cs | 2 +- .../DiscFormats/CUE/CUE_Types.cs | 4 ++-- .../DiscFormats/CUE/CueFileResolver.cs | 2 +- .../DiscFormats/MDS_Format.cs | 13 ++++++------- src/BizHawk.Emulation.DiscSystem/DiscHasher.cs | 2 +- .../DiscIdentifier.cs | 6 +++--- .../DiscMountJob.MednaDisc.cs | 2 +- .../DiscMountJob.cs | 2 +- .../DiscMountPolicy.cs | 8 ++++---- .../DiscSectorReader.cs | 2 +- src/BizHawk.Emulation.DiscSystem/DiscStream.cs | 4 ++-- .../DiscStructure.cs | 4 ++-- src/BizHawk.Emulation.DiscSystem/DiscSubQ.cs | 8 ++++---- src/BizHawk.Emulation.DiscSystem/DiscTOC.cs | 2 +- .../Internal/Algorithms/ECM.cs | 16 ++++++++-------- ...ynthesize_DiscStructure_From_DiscTOC_Job.cs | 2 +- ...ynthesize_DiscTOC_From_RawTOCEntries_Job.cs | 2 +- .../Internal/SectorSynth.cs | 6 ++---- 132 files changed, 262 insertions(+), 259 deletions(-) diff --git a/src/BizHawk.BizInvoke/BizInvoker.cs b/src/BizHawk.BizInvoke/BizInvoker.cs index a22138319e..e40b40ae1f 100644 --- a/src/BizHawk.BizInvoke/BizInvoker.cs +++ b/src/BizHawk.BizInvoke/BizInvoker.cs @@ -389,8 +389,9 @@ namespace BizHawk.BizInvoke il.Emit(OpCodes.Ldarg_0); il.Emit(OpCodes.Ldfld, field); - il.EmitCalli(OpCodes.Calli, - nativeCall, + il.EmitCalli( + OpCodes.Calli, + nativeCall, returnType == typeof(bool) ? typeof(byte) : returnType, // undo winapi style bool garbage paramLoadInfos.Select(p => p.NativeType).ToArray()); diff --git a/src/BizHawk.BizInvoke/MemoryBlockWindowsPal.cs b/src/BizHawk.BizInvoke/MemoryBlockWindowsPal.cs index bf19f65872..bc6774b85f 100644 --- a/src/BizHawk.BizInvoke/MemoryBlockWindowsPal.cs +++ b/src/BizHawk.BizInvoke/MemoryBlockWindowsPal.cs @@ -61,8 +61,11 @@ namespace BizHawk.BizInvoke AllocationType flAllocationType, MemoryProtection flProtect); [DllImport("kernel32.dll", SetLastError = true)] - public static extern bool VirtualProtect(UIntPtr lpAddress, UIntPtr dwSize, - MemoryProtection flNewProtect, out MemoryProtection lpflOldProtect); + public static extern bool VirtualProtect( + UIntPtr lpAddress, + UIntPtr dwSize, + MemoryProtection flNewProtect, + out MemoryProtection lpflOldProtect); [Flags] public enum AllocationType : uint @@ -123,9 +126,13 @@ namespace BizHawk.BizInvoke public static extern bool UnmapViewOfFile(IntPtr lpBaseAddress); [DllImport("kernel32.dll")] - public static extern IntPtr MapViewOfFileEx(IntPtr hFileMappingObject, - FileMapAccessType dwDesiredAccess, uint dwFileOffsetHigh, uint dwFileOffsetLow, - UIntPtr dwNumberOfBytesToMap, IntPtr lpBaseAddress); + public static extern IntPtr MapViewOfFileEx( + IntPtr hFileMappingObject, + FileMapAccessType dwDesiredAccess, + uint dwFileOffsetHigh, + uint dwFileOffsetLow, + UIntPtr dwNumberOfBytesToMap, + IntPtr lpBaseAddress); [Flags] public enum FileMapAccessType : uint diff --git a/src/BizHawk.Bizware.BizwareGL/ArtManager.cs b/src/BizHawk.Bizware.BizwareGL/ArtManager.cs index 1e9ec21bb5..75609d7eff 100644 --- a/src/BizHawk.Bizware.BizwareGL/ArtManager.cs +++ b/src/BizHawk.Bizware.BizwareGL/ArtManager.cs @@ -62,7 +62,7 @@ namespace BizHawk.Bizware.BizwareGL /// /// Closes this instance for for further resource loading. Will result in a texture atlasing operation. /// If the close operation is forever, then internal backup copies of resources will be freed, but it can never be reopened. - /// This function may take some time to run, as it is + /// This function may take some time to run, as it is /// public void Close(bool forever = true) { diff --git a/src/BizHawk.Bizware.BizwareGL/AttribUsage.cs b/src/BizHawk.Bizware.BizwareGL/AttribUsage.cs index 4208a9d7eb..414022d96d 100644 --- a/src/BizHawk.Bizware.BizwareGL/AttribUsage.cs +++ b/src/BizHawk.Bizware.BizwareGL/AttribUsage.cs @@ -3,7 +3,7 @@ public enum AttribUsage { Unspecified, - Position, + Position, Color0, Texcoord0, Texcoord1, } diff --git a/src/BizHawk.Bizware.BizwareGL/BitmapBuffer.cs b/src/BizHawk.Bizware.BizwareGL/BitmapBuffer.cs index f048f0812f..c4f6b72d9a 100644 --- a/src/BizHawk.Bizware.BizwareGL/BitmapBuffer.cs +++ b/src/BizHawk.Bizware.BizwareGL/BitmapBuffer.cs @@ -525,7 +525,7 @@ namespace BizHawk.Bizware.BizwareGL return; } - //note: we lock it as 32bpp even if the bitmap is 24bpp so we can write to it more conveniently. + //note: we lock it as 32bpp even if the bitmap is 24bpp so we can write to it more conveniently. var bmpdata = bmp.LockBits(new Rectangle(0, 0, Width, Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); if(bmpdata.Stride == bmpdata.Width*4) diff --git a/src/BizHawk.Bizware.BizwareGL/BitmapLoadOptions.cs b/src/BizHawk.Bizware.BizwareGL/BitmapLoadOptions.cs index 7c1291d63e..d8168e075c 100644 --- a/src/BizHawk.Bizware.BizwareGL/BitmapLoadOptions.cs +++ b/src/BizHawk.Bizware.BizwareGL/BitmapLoadOptions.cs @@ -16,7 +16,7 @@ namespace BizHawk.Bizware.BizwareGL public bool TransparentPalette0 = true; /// - /// Specifies whether (r,g,b,0) pixels shall be turned into (0,0,0,0). + /// Specifies whether (r,g,b,0) pixels shall be turned into (0,0,0,0). /// This is useful for cleaning up junk which you might not know you had littering purely transparent areas, which can mess up a lot of stuff during rendering. /// public bool CleanupAlpha0 = true; diff --git a/src/BizHawk.Bizware.BizwareGL/GDIPlusGuiRenderer.cs b/src/BizHawk.Bizware.BizwareGL/GDIPlusGuiRenderer.cs index 4dccf11b14..6c19373173 100644 --- a/src/BizHawk.Bizware.BizwareGL/GDIPlusGuiRenderer.cs +++ b/src/BizHawk.Bizware.BizwareGL/GDIPlusGuiRenderer.cs @@ -65,12 +65,11 @@ namespace BizHawk.Bizware.BizwareGL float[][] colorMatrixElements = { - new float[] {r, 0, 0, 0, 0}, - new float[] {0, g, 0, 0, 0}, - new float[] {0, 0, b, 0, 0}, - new float[] {0, 0, 0, a, 0}, - new float[] {0, 0, 0, 0, 1} - + new float[] { r, 0, 0, 0, 0 }, + new float[] { 0, g, 0, 0, 0 }, + new float[] { 0, 0, b, 0, 0 }, + new float[] { 0, 0, 0, a, 0 }, + new float[] { 0, 0, 0, 0, 1 }, }; var colorMatrix = new ColorMatrix(colorMatrixElements); diff --git a/src/BizHawk.Bizware.BizwareGL/IGL.cs b/src/BizHawk.Bizware.BizwareGL/IGL.cs index 996464c4de..c47ea82e63 100644 --- a/src/BizHawk.Bizware.BizwareGL/IGL.cs +++ b/src/BizHawk.Bizware.BizwareGL/IGL.cs @@ -9,7 +9,7 @@ namespace BizHawk.Bizware.BizwareGL /// This is a wrapper over OpenGL and direct3d to give a uniform interface /// TODO - This really needs to be split up into an internal and a user interface. so many of the functions are made to support the smart wrappers /// Maybe make a method that returns an interface used for advanced methods (and IGL_TK could implement that as well and just "return this:") - /// + /// /// NOTE: THIS SHOULD NOT BE ASSUMED TO BE THREAD SAFE! Make a new IGL if you want to use it in a new thread. I hope that will work... /// public interface IGL : IDisposable diff --git a/src/BizHawk.Bizware.BizwareGL/TexAtlas.cs b/src/BizHawk.Bizware.BizwareGL/TexAtlas.cs index 07a66090e6..c79bdbb1a7 100644 --- a/src/BizHawk.Bizware.BizwareGL/TexAtlas.cs +++ b/src/BizHawk.Bizware.BizwareGL/TexAtlas.cs @@ -132,7 +132,7 @@ namespace BizHawk.Bizware.BizwareGL private class RectangleBinPack { /** A node of a binary tree. Each node represents a rectangular area of the texture - we surface. Internal nodes store rectangles of used data, whereas leaf nodes track + we surface. Internal nodes store rectangles of used data, whereas leaf nodes track rectangles of free space. All the rectangles stored in the tree are disjoint. */ public class Node { diff --git a/src/BizHawk.Bizware.DirectX/IGL_SlimDX9.cs b/src/BizHawk.Bizware.DirectX/IGL_SlimDX9.cs index 6744f8ec37..58c27be42f 100644 --- a/src/BizHawk.Bizware.DirectX/IGL_SlimDX9.cs +++ b/src/BizHawk.Bizware.DirectX/IGL_SlimDX9.cs @@ -375,7 +375,7 @@ namespace BizHawk.Bizware.DirectX switch(item.Usage) { case AttribUsage.Position: - usage = DeclarationUsage.Position; + usage = DeclarationUsage.Position; break; case AttribUsage.Texcoord0: usage = DeclarationUsage.TextureCoordinate; diff --git a/src/BizHawk.Bizware.OpenTK3/GuiRenderer.cs b/src/BizHawk.Bizware.OpenTK3/GuiRenderer.cs index 034970cd8b..67b26890ef 100644 --- a/src/BizHawk.Bizware.OpenTK3/GuiRenderer.cs +++ b/src/BizHawk.Bizware.OpenTK3/GuiRenderer.cs @@ -12,7 +12,7 @@ using sd = System.Drawing; namespace BizHawk.Bizware.OpenTK3 { /// - /// A simple renderer useful for rendering GUI stuff. + /// A simple renderer useful for rendering GUI stuff. /// When doing GUI rendering, run everything through here (if you need a GL feature not done through here, run it through here first) /// Call Begin, then draw, then End, and don't use other Renderers or GL calls in the meantime, unless you know what you're doing. /// This can perform batching (well.. maybe not yet), which is occasionally necessary for drawing large quantities of things. @@ -241,10 +241,10 @@ namespace BizHawk.Bizware.OpenTK3 else { v0 = art.v0; v1 = art.v1; } float[] data = new float[32] { - x,y, u0,v0, CornerColors[0].X, CornerColors[0].Y, CornerColors[0].Z, CornerColors[0].W, - x+art.Width,y, u1,v0, CornerColors[1].X, CornerColors[1].Y, CornerColors[1].Z, CornerColors[1].W, - x,y+art.Height, u0,v1, CornerColors[2].X, CornerColors[2].Y, CornerColors[2].Z, CornerColors[2].W, - x+art.Width,y+art.Height, u1,v1, CornerColors[3].X, CornerColors[3].Y, CornerColors[3].Z, CornerColors[3].W, + x,y, u0,v0, CornerColors[0].X, CornerColors[0].Y, CornerColors[0].Z, CornerColors[0].W, + x+art.Width,y, u1,v0, CornerColors[1].X, CornerColors[1].Y, CornerColors[1].Z, CornerColors[1].W, + x,y+art.Height, u0,v1, CornerColors[2].X, CornerColors[2].Y, CornerColors[2].Z, CornerColors[2].W, + x+art.Width,y+art.Height, u1,v1, CornerColors[3].X, CornerColors[3].Y, CornerColors[3].Z, CornerColors[3].W, }; Texture2d tex = art.BaseTexture; diff --git a/src/BizHawk.Bizware.OpenTK3/IGL_TK.cs b/src/BizHawk.Bizware.OpenTK3/IGL_TK.cs index cc553d87c3..0a166c6412 100644 --- a/src/BizHawk.Bizware.OpenTK3/IGL_TK.cs +++ b/src/BizHawk.Bizware.OpenTK3/IGL_TK.cs @@ -35,7 +35,7 @@ using VertexAttribPointerType = OpenTK.Graphics.OpenGL.VertexAttribPointerType; namespace BizHawk.Bizware.OpenTK3 { /// - /// OpenTK implementation of the BizwareGL.IGL interface. + /// OpenTK implementation of the BizwareGL.IGL interface. /// TODO - can we have more than one of these? could be dangerous. such dangerous things to be possibly reconsidered are marked with HAMNUTS /// TODO - if we have any way of making contexts, we also need a way of freeing it, and then we can cleanup our dictionaries /// @@ -76,7 +76,7 @@ namespace BizHawk.Bizware.OpenTK3 MakeDefaultCurrent(); //this is important for reasons unknown - GraphicsContext.LoadAll(); + GraphicsContext.LoadAll(); //misc initialization CreateRenderStates(); @@ -395,7 +395,7 @@ namespace BizHawk.Bizware.OpenTK3 public void SetPipelineUniform(PipelineUniform uniform, bool value) { - GL.Uniform1((int)uniform.Sole.Opaque, value ? 1 : 0); + GL.Uniform1((int) uniform.Sole.Opaque, value ? 1 : 0); } public unsafe void SetPipelineUniformMatrix(PipelineUniform uniform, Matrix4 mat, bool transpose) @@ -826,12 +826,12 @@ namespace BizHawk.Bizware.OpenTK3 private void CreateRenderStates() { _rsBlendNoneVerbatim = new CacheBlendState( - false, + false, BizGL.BlendingFactorSrc.One, BizGL.BlendEquationMode.FuncAdd, BizGL.BlendingFactorDest.Zero, BizGL.BlendingFactorSrc.One, BizGL.BlendEquationMode.FuncAdd, BizGL.BlendingFactorDest.Zero); _rsBlendNoneOpaque = new CacheBlendState( - false, + false, BizGL.BlendingFactorSrc.One, BizGL.BlendEquationMode.FuncAdd, BizGL.BlendingFactorDest.Zero, BizGL.BlendingFactorSrc.ConstantAlpha, BizGL.BlendEquationMode.FuncAdd, BizGL.BlendingFactorDest.Zero); diff --git a/src/BizHawk.Client.Common/Api/Classes/JoypadApi.cs b/src/BizHawk.Client.Common/Api/Classes/JoypadApi.cs index 1a1f175e52..33663b4d81 100644 --- a/src/BizHawk.Client.Common/Api/Classes/JoypadApi.cs +++ b/src/BizHawk.Client.Common/Api/Classes/JoypadApi.cs @@ -69,10 +69,10 @@ namespace BizHawk.Client.Common if (state == null) _inputManager.ButtonOverrideAdapter.UnSet(buttonToSet); else _inputManager.ButtonOverrideAdapter.SetButton(buttonToSet, state.Value); - //"Overrides" is a gross line of code in that flushes overrides into the current controller. - //That's not really the way it was meant to work which was that it should pull all its values through the filters before ever using them. - //Of course the code that does that is in the main loop and the lua API wouldnt know how to do it. - //I regret the whole hotkey filter chain OOP soup approach. Anyway, the code that + //"Overrides" is a gross line of code in that flushes overrides into the current controller. + //That's not really the way it was meant to work which was that it should pull all its values through the filters before ever using them. + //Of course the code that does that is in the main loop and the lua API wouldnt know how to do it. + //I regret the whole hotkey filter chain OOP soup approach. Anyway, the code that //in a crude, CRUDE, *CRUDE* approximation of what the main loop does, we need to pull the physical input again before it's freshly overridded //but really, everything the main loop does needs to be done here again. diff --git a/src/BizHawk.Client.Common/Api/Classes/MemoryApi.cs b/src/BizHawk.Client.Common/Api/Classes/MemoryApi.cs index b08a5ea469..3d184d73c3 100644 --- a/src/BizHawk.Client.Common/Api/Classes/MemoryApi.cs +++ b/src/BizHawk.Client.Common/Api/Classes/MemoryApi.cs @@ -187,7 +187,7 @@ namespace BizHawk.Client.Common public void SetBigEndian(bool enabled = true) => _isBigEndian = enabled; - public List GetMemoryDomainList() => + public List GetMemoryDomainList() => DomainList .Select(domain => domain.Name) .ToList(); diff --git a/src/BizHawk.Client.Common/DisplayManager/Filters/BaseFilter.cs b/src/BizHawk.Client.Common/DisplayManager/Filters/BaseFilter.cs index ebd6bedd2c..fc452ba3b0 100644 --- a/src/BizHawk.Client.Common/DisplayManager/Filters/BaseFilter.cs +++ b/src/BizHawk.Client.Common/DisplayManager/Filters/BaseFilter.cs @@ -5,8 +5,8 @@ using BizHawk.Client.Common.FilterManager; using BizHawk.Bizware.BizwareGL; // Here's how to make a filter: -// 1. Reset your state entirely in Initialize(). -// The filter will be re-initialized several times while the chain is getting worked out, but not re-instantiated. +// 1. Reset your state entirely in Initialize(). +// The filter will be re-initialized several times while the chain is getting worked out, but not re-instantiated. // This is sort of annoying, but there's pretty good reasons for it (some external process has created the filters and set parameters needed to govern their chaining and surface properties) // 2. In Initialize(), be sure to use DeclareInput // (something about PresizeInput()) diff --git a/src/BizHawk.Client.Common/DisplayManager/Filters/Gui.cs b/src/BizHawk.Client.Common/DisplayManager/Filters/Gui.cs index dc2e5a1b34..c2b2a2f8ac 100644 --- a/src/BizHawk.Client.Common/DisplayManager/Filters/Gui.cs +++ b/src/BizHawk.Client.Common/DisplayManager/Filters/Gui.cs @@ -51,7 +51,7 @@ namespace BizHawk.Client.Common.Filters float widthScale = (float)targetWidth / sourceWidth; float heightScale = (float)targetHeight / sourceHeight; - if (maintainAspect + if (maintainAspect // zero 20-jul-2014 - hacks upon hacks, this function needs rewriting && !maintainInteger ) diff --git a/src/BizHawk.Client.Common/DisplayManager/Filters/Retro.cs b/src/BizHawk.Client.Common/DisplayManager/Filters/Retro.cs index f1a463ee32..9b4bfdf65b 100644 --- a/src/BizHawk.Client.Common/DisplayManager/Filters/Retro.cs +++ b/src/BizHawk.Client.Common/DisplayManager/Filters/Retro.cs @@ -287,7 +287,7 @@ namespace BizHawk.Client.Common.Filters // apply all parameters to this shader.. even if it was meant for other shaders. kind of lame. if(Parameters != null) - { + { foreach (var kvp in Parameters) { if (kvp.Value is float value) diff --git a/src/BizHawk.Client.Common/DisplayManager/SwappableDisplaySurfaceSet.cs b/src/BizHawk.Client.Common/DisplayManager/SwappableDisplaySurfaceSet.cs index 515c3f885f..17b2d6ad13 100644 --- a/src/BizHawk.Client.Common/DisplayManager/SwappableDisplaySurfaceSet.cs +++ b/src/BizHawk.Client.Common/DisplayManager/SwappableDisplaySurfaceSet.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; namespace BizHawk.Client.Common { /// - /// encapsulates thread-safe concept of pending/current display surfaces, reusing buffers where matching + /// encapsulates thread-safe concept of pending/current display surfaces, reusing buffers where matching /// sizes are available and keeping them cleaned up when they don't seem like they'll need to be used anymore /// public class SwappableDisplaySurfaceSet diff --git a/src/BizHawk.Client.Common/OpenAdvanced.cs b/src/BizHawk.Client.Common/OpenAdvanced.cs index c13933d424..f68dd4a76d 100644 --- a/src/BizHawk.Client.Common/OpenAdvanced.cs +++ b/src/BizHawk.Client.Common/OpenAdvanced.cs @@ -112,8 +112,8 @@ namespace BizHawk.Client.Common // you might think ideally we'd fetch the libretro core name from the core info inside it // but that would involve spinning up excess libretro core instances, which probably isn't good for stability, no matter how much we wish otherwise, not to mention slow. // moreover it's kind of complicated here, - // and finally, I think the DisplayName should really be file-based in all cases, since the user is going to be loading cores by filename and - // this is related to the recent roms filename management. + // and finally, I think the DisplayName should really be file-based in all cases, since the user is going to be loading cores by filename and + // this is related to the recent roms filename management. // so, leave it. public OpenAdvanced_LibretroNoGame() { diff --git a/src/BizHawk.Client.Common/RomGame.cs b/src/BizHawk.Client.Common/RomGame.cs index 244b157100..f9f4b02d6e 100644 --- a/src/BizHawk.Client.Common/RomGame.cs +++ b/src/BizHawk.Client.Common/RomGame.cs @@ -37,7 +37,7 @@ namespace BizHawk.Client.Common // read the entire contents of the file into memory. // unfortunate in the case of large files, but that's what we've got to work with for now. - // if we're offset exactly 512 bytes from a 1024-byte boundary, + // if we're offset exactly 512 bytes from a 1024-byte boundary, // assume we have a header of that size. Otherwise, assume it's just all rom. // Other 'recognized' header sizes may need to be added. int headerOffset = fileLength % BankSize; @@ -56,8 +56,8 @@ namespace BizHawk.Client.Common stream.Position = 0; stream.Read(FileData, 0, fileLength); - // if there was no header offset, RomData is equivalent to FileData - // (except in cases where the original interleaved file data is necessary.. in that case we'll have problems.. + // if there was no header offset, RomData is equivalent to FileData + // (except in cases where the original interleaved file data is necessary.. in that case we'll have problems.. // but this whole architecture is not going to withstand every peculiarity and be fast as well. if (headerOffset == 0) { @@ -67,7 +67,7 @@ namespace BizHawk.Client.Common file.Extension == ".pzx" || file.Extension == ".csw" || file.Extension == ".wav" || file.Extension == ".cdt") { // these are not roms. unfortunately if treated as such there are certain edge-cases - // where a header offset is detected. This should mitigate this issue until a cleaner solution is found + // where a header offset is detected. This should mitigate this issue until a cleaner solution is found // (-Asnivor) RomData = FileData; } @@ -120,7 +120,7 @@ namespace BizHawk.Client.Common private static byte[] DeInterleaveSMD(byte[] source) { - // SMD files are interleaved in pages of 16k, with the first 8k containing all + // SMD files are interleaved in pages of 16k, with the first 8k containing all // odd bytes and the second 8k containing all even bytes. int size = source.Length; if (size > 0x400000) diff --git a/src/BizHawk.Client.Common/Sound/Utilities/BufferedAsync.cs b/src/BizHawk.Client.Common/Sound/Utilities/BufferedAsync.cs index d3d54343ae..14795ab897 100644 --- a/src/BizHawk.Client.Common/Sound/Utilities/BufferedAsync.cs +++ b/src/BizHawk.Client.Common/Sound/Utilities/BufferedAsync.cs @@ -7,11 +7,11 @@ namespace BizHawk.Client.Common { // Generates SEMI-synchronous sound, or "buffered asynchronous" sound. - // This class will try as hard as it can to request the correct number of samples on each frame and then + // This class will try as hard as it can to request the correct number of samples on each frame and then // send them out to the sound card as it needs them. // However, it has minimum/maximum buffer targets and will request smaller or larger frames if it has to. - // The ultimate goal of this strategy is to make MOST frames 100% correct, and if errors must occur, + // The ultimate goal of this strategy is to make MOST frames 100% correct, and if errors must occur, // concentrate it on a single frame, rather than distribute small errors across most frames, as // distributing error to most frames tends to result in persistently distorted audio, especially when // sample playback is involved. @@ -19,13 +19,13 @@ namespace BizHawk.Client.Common /* * Why use this, when each core has it's own Async sound output? - * + * * It is true that each emulation core provides its own async sound output, either through directly * rendering to arbitrary buffers (pce not TurboCD, sms), or using one of the metaspus (nes, TurboCD). - * + * * Unfortunately, the vecna metaspu is not perfect, and for maintaining near-realtime playback (the usual * situation which we want to optimize for), it simply sounds better with a BufferedAsync on top of it. - * + * * TODO: BufferedAsync has some hard coded parameters that assume FPS = 60. make that more generalized. * TODO: For systems that _really_ don't need BufferedAsync (pce not turbocd, sms), make a way to signal * that and then bypass the BufferedAsync. diff --git a/src/BizHawk.Client.Common/cheats/GbaGameSharkDecoder.cs b/src/BizHawk.Client.Common/cheats/GbaGameSharkDecoder.cs index 21e9d6f4a4..cbe0ffee3f 100644 --- a/src/BizHawk.Client.Common/cheats/GbaGameSharkDecoder.cs +++ b/src/BizHawk.Client.Common/cheats/GbaGameSharkDecoder.cs @@ -4,7 +4,7 @@ using System.Linq; namespace BizHawk.Client.Common.cheats { - // TODO: + // TODO: public static class GbaGameSharkDecoder { private static readonly uint[] GameSharkSeeds = { 0x09F4FBBDU, 0x9681884AU, 0x352027E9U, 0xF3DEE5A7U }; diff --git a/src/BizHawk.Client.Common/config/Binding.cs b/src/BizHawk.Client.Common/config/Binding.cs index 20db714a52..29266e2f8e 100644 --- a/src/BizHawk.Client.Common/config/Binding.cs +++ b/src/BizHawk.Client.Common/config/Binding.cs @@ -9,7 +9,7 @@ using System.Linq; // public string DisplayName; // public string Bindings; // } -// ...also. We should consider using something other than DisplayName for keying, maybe make a KEYNAME distinct from displayname. +// ...also. We should consider using something other than DisplayName for keying, maybe make a KEYNAME distinct from displayname. // displayname is OK for now though. namespace BizHawk.Client.Common { diff --git a/src/BizHawk.Client.Common/config/ConfigEnums.cs b/src/BizHawk.Client.Common/config/ConfigEnums.cs index 070de52122..d3246350b2 100644 --- a/src/BizHawk.Client.Common/config/ConfigEnums.cs +++ b/src/BizHawk.Client.Common/config/ConfigEnums.cs @@ -20,10 +20,10 @@ public enum EDispManagerAR { None, - System, + System, // actually, custom SIZE (fixme on major release) - Custom, + Custom, CustomRatio } diff --git a/src/BizHawk.Client.Common/config/PathEntryCollectionExtensions.cs b/src/BizHawk.Client.Common/config/PathEntryCollectionExtensions.cs index a9add21bfe..6b4d288afa 100644 --- a/src/BizHawk.Client.Common/config/PathEntryCollectionExtensions.cs +++ b/src/BizHawk.Client.Common/config/PathEntryCollectionExtensions.cs @@ -48,7 +48,7 @@ namespace BizHawk.Client.Common /// public static PathEntry EntryWithFallback(this PathEntryCollection collection, string pathType, string systemId) { - return (collection[systemId, pathType] + return (collection[systemId, pathType] ?? collection[systemId, "Base"]) ?? collection["Global", "Base"]; } diff --git a/src/BizHawk.Client.Common/config/SaveStateConfig.cs b/src/BizHawk.Client.Common/config/SaveStateConfig.cs index bd53a707e4..00482c2de6 100644 --- a/src/BizHawk.Client.Common/config/SaveStateConfig.cs +++ b/src/BizHawk.Client.Common/config/SaveStateConfig.cs @@ -5,8 +5,8 @@ public const int DefaultCompressionLevelNormal = 1; public SaveStateType Type { get; set; } = SaveStateType.Binary; public int CompressionLevelNormal { get; set; } = DefaultCompressionLevelNormal; - public const int DefaultCompressionLevelRewind = 0; // this isn't actually used yet - public int CompressionLevelRewind { get; set; } = DefaultCompressionLevelRewind; // this isn't actually used yet + public const int DefaultCompressionLevelRewind = 0; // this isn't actually used yet + public int CompressionLevelRewind { get; set; } = DefaultCompressionLevelRewind; // this isn't actually used yet public bool MakeBackups { get; set; } = true; public bool SaveScreenshot { get; set; } = true; public int BigScreenshotSize { get; set; } = 128 * 1024; diff --git a/src/BizHawk.Client.Common/inputAdapters/AutoPattern.cs b/src/BizHawk.Client.Common/inputAdapters/AutoPattern.cs index 830ed2767f..b1a832c0c3 100644 --- a/src/BizHawk.Client.Common/inputAdapters/AutoPattern.cs +++ b/src/BizHawk.Client.Common/inputAdapters/AutoPattern.cs @@ -7,7 +7,7 @@ } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// A simple on/off pattern. /// public AutoPatternBool(int on, int off, bool skipLag = true, int offset = 0, int loop = 0) diff --git a/src/BizHawk.Client.Common/inputAdapters/InputManager.cs b/src/BizHawk.Client.Common/inputAdapters/InputManager.cs index f319b9cd30..f93bef998e 100644 --- a/src/BizHawk.Client.Common/inputAdapters/InputManager.cs +++ b/src/BizHawk.Client.Common/inputAdapters/InputManager.cs @@ -14,10 +14,10 @@ namespace BizHawk.Client.Common public class InputManager { // the original source controller, bound to the user, sort of the "input" port for the chain, i think - public Controller ActiveController { get; set; } // TODO: private setter, add a method that takes both controllers in + public Controller ActiveController { get; set; } // TODO: private setter, add a method that takes both controllers in // rapid fire version on the user controller, has its own key bindings and is OR'ed against ActiveController - public AutofireController AutoFireController { get; set; } // TODO: private setter, add a method that takes both controllers in + public AutofireController AutoFireController { get; set; } // TODO: private setter, add a method that takes both controllers in // the "output" port for the controller chain. public CopyControllerAdapter ControllerOutput { get; } = new CopyControllerAdapter(); diff --git a/src/BizHawk.Client.Common/inputAdapters/UDLRController.cs b/src/BizHawk.Client.Common/inputAdapters/UDLRController.cs index d2d1c188ab..d65810f162 100644 --- a/src/BizHawk.Client.Common/inputAdapters/UDLRController.cs +++ b/src/BizHawk.Client.Common/inputAdapters/UDLRController.cs @@ -6,7 +6,7 @@ using BizHawk.Emulation.Common; namespace BizHawk.Client.Common { /// - /// Filters input for things called Up and Down while considering the client's AllowUD_LR option. + /// Filters input for things called Up and Down while considering the client's AllowUD_LR option. /// This is a bit gross but it is unclear how to do it more nicely /// public class UdlrControllerAdapter : IInputAdapter diff --git a/src/BizHawk.Client.Common/lua/LuaHelperLibs/NESLuaLibrary.cs b/src/BizHawk.Client.Common/lua/LuaHelperLibs/NESLuaLibrary.cs index 03b4367ed7..ea46bca551 100644 --- a/src/BizHawk.Client.Common/lua/LuaHelperLibs/NESLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/LuaHelperLibs/NESLuaLibrary.cs @@ -12,7 +12,7 @@ namespace BizHawk.Client.Common [Description("Functions related specifically to Nes Cores")] public sealed class NESLuaLibrary : LuaLibraryBase { - // TODO: + // TODO: // perhaps with the new core config system, one could // automatically bring out all of the settings to a lua table, with names. that // would be completely arbitrary and would remove the whole requirement for this mess diff --git a/src/BizHawk.Client.Common/movie/PlatformFrameRates.cs b/src/BizHawk.Client.Common/movie/PlatformFrameRates.cs index b77ca040d5..cefc7ecc45 100644 --- a/src/BizHawk.Client.Common/movie/PlatformFrameRates.cs +++ b/src/BizHawk.Client.Common/movie/PlatformFrameRates.cs @@ -41,7 +41,7 @@ namespace BizHawk.Client.Common // RetroEdit: I don't like how this is cycles per second instead of FPS. // It probably should be moved to a separate place. ["GB_Clock"] = 2097152.0, - ["GBA"] = 262144.0 / 4389.0, // 59.7275005696 + ["GBA"] = 262144.0 / 4389.0, // 59.7275005696 ["GEN"] = 53693175 / (3420.0 * 262), ["GEN_PAL"] = 53203424 / (3420.0 * 313), diff --git a/src/BizHawk.Client.Common/movie/SubtitleList.cs b/src/BizHawk.Client.Common/movie/SubtitleList.cs index 0c3d1f6d3b..d2a19bd63e 100644 --- a/src/BizHawk.Client.Common/movie/SubtitleList.cs +++ b/src/BizHawk.Client.Common/movie/SubtitleList.cs @@ -43,7 +43,7 @@ namespace BizHawk.Client.Common message += subParts[i] + ' '; } - Add(new Subtitle + Add(new Subtitle { Frame = int.Parse(subParts[1]), X = int.Parse(subParts[2]), diff --git a/src/BizHawk.Client.Common/movie/import/MmvImport.cs b/src/BizHawk.Client.Common/movie/import/MmvImport.cs index dca03161bd..e9c6d5e133 100644 --- a/src/BizHawk.Client.Common/movie/import/MmvImport.cs +++ b/src/BizHawk.Client.Common/movie/import/MmvImport.cs @@ -134,7 +134,7 @@ namespace BizHawk.Client.Common.movie.import if (player == 1) { - controllers["Pause"] = + controllers["Pause"] = (((controllerState >> 6) & 0x1) != 0 && !isGameGear) || (((controllerState >> 7) & 0x1) != 0 && isGameGear); } diff --git a/src/BizHawk.Client.Common/movie/import/PjmImport.cs b/src/BizHawk.Client.Common/movie/import/PjmImport.cs index e0ccc1fd51..db496dd050 100644 --- a/src/BizHawk.Client.Common/movie/import/PjmImport.cs +++ b/src/BizHawk.Client.Common/movie/import/PjmImport.cs @@ -152,7 +152,7 @@ namespace BizHawk.Client.Common // 024: UInt32 cheatListOffset // 028: UInt32 cdRomIdOffset - // Source format is just the first up-to-8 alphanumeric characters of the CD label, + // Source format is just the first up-to-8 alphanumeric characters of the CD label, // so not so useful. br.ReadBytes(20); @@ -172,7 +172,7 @@ namespace BizHawk.Client.Common var settings = new Octoshock.SyncSettings(); var controllers = new SimpleController(); settings.FIOConfig.Devices8 = new[] - { + { info.Player1Type, OctoshockDll.ePeripheralType.None, OctoshockDll.ePeripheralType.None, OctoshockDll.ePeripheralType.None, info.Player2Type, diff --git a/src/BizHawk.Client.Common/movie/tasproj/IStateManager.cs b/src/BizHawk.Client.Common/movie/tasproj/IStateManager.cs index 46126a1abb..042e01cfe9 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/IStateManager.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/IStateManager.cs @@ -18,7 +18,7 @@ namespace BizHawk.Client.Common ZwinderStateManagerSettings Settings { get; } /// - /// Requests that the current emulator state be captured + /// Requests that the current emulator state be captured /// Unless force is true, the state may or may not be captured depending on the logic employed by "green-zone" management /// void Capture(int frame, IStatable source, bool force = false); diff --git a/src/BizHawk.Client.Common/movie/tasproj/StateDictionary.cs b/src/BizHawk.Client.Common/movie/tasproj/StateDictionary.cs index f067894c7d..b565d7ef06 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/StateDictionary.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/StateDictionary.cs @@ -8,7 +8,7 @@ using BizHawk.Common; namespace BizHawk.Client.Common { internal class TempFileStateDictionary : IDictionary, IDisposable - { + { private readonly IDictionary _streams = new Dictionary(); public byte[] this[int key] diff --git a/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManager.cs b/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManager.cs index c429fa3584..b281139404 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManager.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManager.cs @@ -356,7 +356,7 @@ namespace BizHawk.Client.Common state.GetReadStream().CopyTo(s); AddStateCache(state.Frame); }, - index2 => + index2 => { var state2 = _recent.GetState(index2); StateCache.Remove(state2.Frame); diff --git a/src/BizHawk.Client.Common/rewind/ZwinderBuffer.cs b/src/BizHawk.Client.Common/rewind/ZwinderBuffer.cs index bb009bc3d6..789a54e134 100644 --- a/src/BizHawk.Client.Common/rewind/ZwinderBuffer.cs +++ b/src/BizHawk.Client.Common/rewind/ZwinderBuffer.cs @@ -354,7 +354,7 @@ namespace BizHawk.Client.Common private sealed class SaveStateStream : Stream, ISpanStream { /// - /// + /// /// /// The ringbuffer to write into /// Offset into the buffer to start writing (and treat as position 0 in the stream) diff --git a/src/BizHawk.Client.Common/tools/CheatList.cs b/src/BizHawk.Client.Common/tools/CheatList.cs index 0e91594db7..7d2059a648 100644 --- a/src/BizHawk.Client.Common/tools/CheatList.cs +++ b/src/BizHawk.Client.Common/tools/CheatList.cs @@ -223,7 +223,7 @@ namespace BizHawk.Client.Common public bool IsActive(MemoryDomain domain, long address) { - return _cheatList.Any(cheat => + return _cheatList.Any(cheat => !cheat.IsSeparator && cheat.Enabled && cheat.Domain == domain diff --git a/src/BizHawk.Client.Common/tools/Interfaces/IToolForm.cs b/src/BizHawk.Client.Common/tools/Interfaces/IToolForm.cs index 4568b33403..92448ceeff 100644 --- a/src/BizHawk.Client.Common/tools/Interfaces/IToolForm.cs +++ b/src/BizHawk.Client.Common/tools/Interfaces/IToolForm.cs @@ -34,7 +34,7 @@ void Restart(); /// - /// This gives the opportunity for the tool dialog to ask the user to save changes (such is necessary when + /// This gives the opportunity for the tool dialog to ask the user to save changes (such is necessary when /// This tool dialog edits a file. Returning false will tell the client the user wants to cancel the given action, /// Return false to tell the client to back out of an action (such as closing the emulator) /// diff --git a/src/BizHawk.Client.DiscoHawk/About.cs b/src/BizHawk.Client.DiscoHawk/About.cs index 3e9bb8c280..38c7a0708a 100644 --- a/src/BizHawk.Client.DiscoHawk/About.cs +++ b/src/BizHawk.Client.DiscoHawk/About.cs @@ -13,7 +13,7 @@ namespace BizHawk.Client.DiscoHawk private void richTextBox1_LinkClicked(object sender, LinkClickedEventArgs e) { - System.Diagnostics.Process.Start(e.LinkText); + System.Diagnostics.Process.Start(e.LinkText); } private void button1_Click(object sender, EventArgs e) diff --git a/src/BizHawk.Client.DiscoHawk/MainDiscoForm.cs b/src/BizHawk.Client.DiscoHawk/MainDiscoForm.cs index 09f29a1b3a..4049dfb40a 100644 --- a/src/BizHawk.Client.DiscoHawk/MainDiscoForm.cs +++ b/src/BizHawk.Client.DiscoHawk/MainDiscoForm.cs @@ -11,7 +11,7 @@ namespace BizHawk.Client.DiscoHawk public partial class MainDiscoForm : Form { // Release TODO: - // An input (queue) list + // An input (queue) list // An outputted list showing new file name // Progress bar should show file being converted // Add disc button, which puts it on the progress cue (converts it) diff --git a/src/BizHawk.Client.EmuHawk/AVOut/AVSync.cs b/src/BizHawk.Client.EmuHawk/AVOut/AVSync.cs index 09e50ccc40..e9e681f264 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/AVSync.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/AVSync.cs @@ -184,10 +184,10 @@ namespace BizHawk.Client.EmuHawk { // this writer will never support this capability - // but it needs to for syncless recorder, otherwise it won't work at all - if (W is SynclessRecorder) + // but it needs to for syncless recorder, otherwise it won't work at all + if (W is SynclessRecorder) { - W.SetFrame(frame); + W.SetFrame(frame); } } diff --git a/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs b/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs index 968e2173fa..690db00c05 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs @@ -13,7 +13,7 @@ using BizHawk.Emulation.Common; // some helpful p/invoke from http://www.codeproject.com/KB/audio-video/Motion_Detection.aspx?msg=1142967 namespace BizHawk.Client.EmuHawk { - [VideoWriter("vfwavi", "AVI writer", + [VideoWriter("vfwavi", "AVI writer", "Uses the Microsoft AVIFIL32 system to write .avi files. Audio is uncompressed; Video can be compressed with any installed VCM codec. Splits on 2G and resolution change.")] internal class AviWriter : IVideoWriter { diff --git a/src/BizHawk.Client.EmuHawk/AVOut/FFmpegWriterForm.cs b/src/BizHawk.Client.EmuHawk/AVOut/FFmpegWriterForm.cs index f48aab9e91..995fb014cc 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/FFmpegWriterForm.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/FFmpegWriterForm.cs @@ -173,7 +173,7 @@ namespace BizHawk.Client.EmuHawk config.FFmpegFormat = ret.ToString(); if (ret.Custom) { - ret.Commandline = + ret.Commandline = config.FFmpegCustomCommand = dlg.textBox1.Text; diff --git a/src/BizHawk.Client.EmuHawk/BizBoxInfoControl.cs b/src/BizHawk.Client.EmuHawk/BizBoxInfoControl.cs index eb7f8c6bc5..74c823ccfc 100644 --- a/src/BizHawk.Client.EmuHawk/BizBoxInfoControl.cs +++ b/src/BizHawk.Client.EmuHawk/BizBoxInfoControl.cs @@ -13,7 +13,7 @@ namespace BizHawk.Client.EmuHawk CoreNameLabel.Text = attributes.CoreName; if (!string.IsNullOrEmpty(attributes.Author)) - { + { CoreAuthorLabel.Text = $"authors: {attributes.Author}"; } else diff --git a/src/BizHawk.Client.EmuHawk/CustomControls/ControlRenderer/GdiPlusRenderer.cs b/src/BizHawk.Client.EmuHawk/CustomControls/ControlRenderer/GdiPlusRenderer.cs index 401b9805c4..f585ddc41e 100644 --- a/src/BizHawk.Client.EmuHawk/CustomControls/ControlRenderer/GdiPlusRenderer.cs +++ b/src/BizHawk.Client.EmuHawk/CustomControls/ControlRenderer/GdiPlusRenderer.cs @@ -23,7 +23,7 @@ namespace BizHawk.Client.EmuHawk.CustomControls public void Dispose() { // Nothing to do - // Other drawing methods need a way to dispose on demand, hence the need for + // Other drawing methods need a way to dispose on demand, hence the need for // this dummy class } } diff --git a/src/BizHawk.Client.EmuHawk/CustomControls/ExceptionBox.cs b/src/BizHawk.Client.EmuHawk/CustomControls/ExceptionBox.cs index 12da757f54..212691c413 100644 --- a/src/BizHawk.Client.EmuHawk/CustomControls/ExceptionBox.cs +++ b/src/BizHawk.Client.EmuHawk/CustomControls/ExceptionBox.cs @@ -24,7 +24,7 @@ namespace BizHawk.Client.EmuHawk { string txt = txtException.Text; Clipboard.SetText(txt); - try + try { if (Clipboard.GetText() == txt) { diff --git a/src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs b/src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs index 97a7882c2a..19aecfdce5 100644 --- a/src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs +++ b/src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs @@ -310,7 +310,7 @@ namespace BizHawk.Client.EmuHawk public bool AllowColumnReorder { get; set; } /// - /// Gets or sets a value indicating whether the entire row will always be selected + /// Gets or sets a value indicating whether the entire row will always be selected /// [Category("Appearance")] [DefaultValue(false)] diff --git a/src/BizHawk.Client.EmuHawk/CustomControls/InputWidget.cs b/src/BizHawk.Client.EmuHawk/CustomControls/InputWidget.cs index 6741551e7c..f479b8dde6 100644 --- a/src/BizHawk.Client.EmuHawk/CustomControls/InputWidget.cs +++ b/src/BizHawk.Client.EmuHawk/CustomControls/InputWidget.cs @@ -33,7 +33,7 @@ namespace BizHawk.Client.EmuHawk new SpecialBindingInfo { BindingName = "WMouse L", TooltipText = "Binds the left mouse button" }, new SpecialBindingInfo { BindingName = "WMouse M", TooltipText = "Binds the middle mouse button" }, new SpecialBindingInfo { BindingName = "WMouse R", TooltipText = "Binds the right mouse button" }, - new SpecialBindingInfo { BindingName = "WMouse 1", TooltipText = "Binds the mouse auxiliary button 1" }, + new SpecialBindingInfo { BindingName = "WMouse 1", TooltipText = "Binds the mouse auxiliary button 1" }, new SpecialBindingInfo { BindingName = "WMouse 2", TooltipText = "Binds the mouse auxiliary button 2" } }; diff --git a/src/BizHawk.Client.EmuHawk/CustomControls/MiscControls.cs b/src/BizHawk.Client.EmuHawk/CustomControls/MiscControls.cs index dfb7df8e68..994927929f 100644 --- a/src/BizHawk.Client.EmuHawk/CustomControls/MiscControls.cs +++ b/src/BizHawk.Client.EmuHawk/CustomControls/MiscControls.cs @@ -46,7 +46,7 @@ namespace BizHawk.Client.EmuHawk using (var brush = new SolidBrush(_checkBackColor)) pevent.Graphics.FillRectangle(brush, glyphLoc); - // draw a checkbox menu glyph (we could do this more elegantly with DrawFrameControl) + // draw a checkbox menu glyph (we could do this more elegantly with DrawFrameControl) bool c = CheckState == CheckState.Checked; if (ForceChecked.HasValue) { diff --git a/src/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs b/src/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs index 0a430e8c3e..54414d061f 100644 --- a/src/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs +++ b/src/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs @@ -684,7 +684,7 @@ namespace BizHawk.Client.EmuHawk for (int i = 1; i < zoom;i++) { //would not be good to run this per frame, but it seems to only run when the resolution changes, etc. - Vector2[] trials = + Vector2[] trials = { PS + new Vector2(1, 0), PS + new Vector2(0, 1), diff --git a/src/BizHawk.Client.EmuHawk/Extensions/ToolExtensions.cs b/src/BizHawk.Client.EmuHawk/Extensions/ToolExtensions.cs index 36962be523..a80a9f7136 100644 --- a/src/BizHawk.Client.EmuHawk/Extensions/ToolExtensions.cs +++ b/src/BizHawk.Client.EmuHawk/Extensions/ToolExtensions.cs @@ -138,7 +138,7 @@ namespace BizHawk.Client.EmuHawk.ToolExtensions //in any case, make a menuitem to let you remove the item var tsmiRemovePath = new ToolStripMenuItem { Text = "&Remove" }; - tsmiRemovePath.Click += (o, ev) => { + tsmiRemovePath.Click += (o, ev) => { recent.Remove(path); }; tsdd.Items.Add(tsmiRemovePath); diff --git a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_GdiPlus.cs b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_GdiPlus.cs index 06461b972e..1f05587cb8 100644 --- a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_GdiPlus.cs +++ b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_GdiPlus.cs @@ -180,7 +180,7 @@ namespace BizHawk.Client.EmuHawk { AllowWrap = false // must be an independent resource }; - var bb = new BitmapBuffer(tw.SDBitmap, blow); + var bb = new BitmapBuffer(tw.SDBitmap, blow); return bb; } @@ -220,7 +220,7 @@ namespace BizHawk.Client.EmuHawk // ret.M42 = dims.Height; // return ret; //} - //else + //else return Matrix4.Identity; } diff --git a/src/BizHawk.Client.EmuHawk/IControlMainform.cs b/src/BizHawk.Client.EmuHawk/IControlMainform.cs index fb0e263cdf..0b14d204b5 100644 --- a/src/BizHawk.Client.EmuHawk/IControlMainform.cs +++ b/src/BizHawk.Client.EmuHawk/IControlMainform.cs @@ -26,7 +26,7 @@ bool WantsToControlReadOnly { get; } /// - /// Function that is called by Mainform instead of using its own code + /// Function that is called by Mainform instead of using its own code /// when a Tool sets WantsToControlReadOnly. /// Should not be called directly. /// @@ -35,7 +35,7 @@ bool WantsToControlStopMovie { get; } /// - /// Function that is called by Mainform instead of using its own code + /// Function that is called by Mainform instead of using its own code /// when a Tool sets WantsToControlStopMovie. /// Should not be called directly. /// Like MainForm's StopMovie(), saving the movie is part of this function's responsibility. diff --git a/src/BizHawk.Client.EmuHawk/Input/Input.cs b/src/BizHawk.Client.EmuHawk/Input/Input.cs index f89a5934e5..d4f454256b 100644 --- a/src/BizHawk.Client.EmuHawk/Input/Input.cs +++ b/src/BizHawk.Client.EmuHawk/Input/Input.cs @@ -132,7 +132,7 @@ namespace BizHawk.Client.EmuHawk Adapter.FirstInitAll(mainFormHandle); _updateThread = new Thread(UpdateThreadProc) { - IsBackground = true, + IsBackground = true, Priority = ThreadPriority.AboveNormal // why not? this thread shouldn't be very heavy duty, and we want it to be responsive }; _updateThread.Start(); @@ -223,7 +223,7 @@ namespace BizHawk.Client.EmuHawk if (EnableIgnoreModifiers && currentModifier != ModifierKey.None) return; if (_lastState[button] == newState) return; - // apply + // apply // NOTE: this is not quite right. if someone held leftshift+rightshift it would be broken. seems unlikely, though. if (currentModifier != ModifierKey.None) { diff --git a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs index 41b46ad90c..c7b4980db5 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -178,7 +178,7 @@ namespace BizHawk.Client.EmuHawk SaveMovieMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Save Movie"].Bindings; PlayMovieMenuItem.Enabled - = ImportMoviesMenuItem.Enabled + = ImportMoviesMenuItem.Enabled = RecentMovieSubMenu.Enabled = !Tools.IsLoaded(); @@ -1715,7 +1715,7 @@ namespace BizHawk.Client.EmuHawk { N64PluginSettingsMenuItem.Enabled = N64ControllerSettingsMenuItem.Enabled = - N64ExpansionSlotMenuItem.Enabled = + N64ExpansionSlotMenuItem.Enabled = MovieSession.Movie.NotActive(); N64CircularAnalogRangeMenuItem.Checked = Config.N64UseCircularAnalogConstraint; diff --git a/src/BizHawk.Client.EmuHawk/MainForm.FileLoader.cs b/src/BizHawk.Client.EmuHawk/MainForm.FileLoader.cs index 2577cc5d41..53936fc05a 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.FileLoader.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.FileLoader.cs @@ -223,15 +223,15 @@ namespace BizHawk.Client.EmuHawk /* * Refactor, moving the loading of particular files into separate functions that can * then be used by this code, and loading individual files through the file dialogue. - * + * * Step 1: * Build a dictionary of relevant files from everything that was dragged and dropped. * This includes peeking into all relevant archives and using their files. - * + * * Step 2: * Perhaps ask the user which of a particular file type they want to use. * Example: rom1.nes, rom2.smc, rom3.cue are drag-dropped, ask the user which they want to use. - * + * * Step 3: * Load all of the relevant files, in priority order: * 1) The ROM @@ -242,7 +242,7 @@ namespace BizHawk.Client.EmuHawk * 6) LUA scripts * 7) Cheat files * 8) Movie Playback Files - * + * * Bonus: * Make that order easy to change in the code, heavily suggesting ROM and playback as first and last respectively. */ diff --git a/src/BizHawk.Client.EmuHawk/MainForm.Hotkey.cs b/src/BizHawk.Client.EmuHawk/MainForm.Hotkey.cs index 938ae8f2ea..b545e45689 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.Hotkey.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.Hotkey.cs @@ -33,10 +33,10 @@ namespace BizHawk.Client.EmuHawk case "Hard Reset": HardReset(); break; - case "Quick Load": + case "Quick Load": LoadQuickSave($"QuickSave{Config.SaveSlot}"); break; - case "Quick Save": + case "Quick Save": SaveQuickSave($"QuickSave{Config.SaveSlot}"); break; case "Clear Autohold": @@ -96,7 +96,7 @@ namespace BizHawk.Client.EmuHawk MainMenuStrip.Visible ^= true; break; case "Volume Up": - VolumeUp(); + VolumeUp(); break; case "Volume Down": VolumeDown(); @@ -140,17 +140,17 @@ namespace BizHawk.Client.EmuHawk break; // Save States - case "Save State 0": + case "Save State 0": SaveQuickSave("QuickSave0"); Config.SaveSlot = 0; UpdateStatusSlots(); break; - case "Save State 1": + case "Save State 1": SaveQuickSave("QuickSave1"); Config.SaveSlot = 1; UpdateStatusSlots(); break; - case "Save State 2": + case "Save State 2": SaveQuickSave("QuickSave2"); Config.SaveSlot = 2; UpdateStatusSlots(); @@ -292,16 +292,16 @@ namespace BizHawk.Client.EmuHawk PlayMovieMenuItem_Click(null, null); break; case "Record Movie": - RecordMovieMenuItem_Click(null, null); + RecordMovieMenuItem_Click(null, null); break; case "Stop Movie": StopMovie(); break; case "Play from beginning": - RestartMovie(); + RestartMovie(); break; case "Save Movie": - SaveMovie(); + SaveMovie(); break; // Tools diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs index f3770f3001..0ffc66c84a 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.cs @@ -134,7 +134,7 @@ namespace BizHawk.Client.EmuHawk .ToList(); try { - int foundIndex = enabled.FindIndex(tuple => + int foundIndex = enabled.FindIndex(tuple => tuple.Item1 == requestedExtToolDll || Path.GetFileName(tuple.Item1) == requestedExtToolDll || Path.GetFileNameWithoutExtension(tuple.Item1) == requestedExtToolDll); @@ -1010,7 +1010,7 @@ namespace BizHawk.Client.EmuHawk // ordinarily, an alt release with nothing else would move focus to the MenuBar. but that is sort of useless, and hard to implement exactly right. } - // zero 09-sep-2012 - all input is eligible for controller input. not sure why the above was done. + // zero 09-sep-2012 - all input is eligible for controller input. not sure why the above was done. // maybe because it doesn't make sense to me to bind hotkeys and controller inputs to the same keystrokes bool handled; @@ -1297,7 +1297,7 @@ namespace BizHawk.Client.EmuHawk // Work around an AMD driver bug in >= vista: // It seems windows will activate opengl fullscreen mode when a GL control is occupying the exact space of a screen (0,0 and dimensions=screensize) - // AMD cards manifest a problem under these circumstances, flickering other monitors. + // AMD cards manifest a problem under these circumstances, flickering other monitors. // It isn't clear whether nvidia cards are failing to employ this optimization, or just not flickering. // (this could be determined with more work; other side affects of the fullscreen mode include: corrupted TaskBar, no modal boxes on top of GL control, no screenshots) // At any rate, we can solve this by adding a 1px black border around the GL control @@ -1307,7 +1307,7 @@ namespace BizHawk.Client.EmuHawk && Config.DispMethod == EDispMethod.OpenGL) { // ATTENTION: this causes the StatusBar to not work well, since the backcolor is now set to black instead of SystemColors.Control. - // It seems that some StatusBar elements composite with the backcolor. + // It seems that some StatusBar elements composite with the backcolor. // Maybe we could add another control under the StatusBar. with a different backcolor Padding = new Padding(1); BackColor = Color.Black; @@ -4688,7 +4688,7 @@ namespace BizHawk.Client.EmuHawk _singleInstanceServer.EndWaitForConnection(iAsyncResult); //a bit over-engineered in case someone wants to send a script or a rom or something - //buffer size is set to something tiny so that we are continually testing it + //buffer size is set to something tiny so that we are continually testing it var payloadBytes = new MemoryStream(); while (true) { diff --git a/src/BizHawk.Client.EmuHawk/QuickBmpFile.cs b/src/BizHawk.Client.EmuHawk/QuickBmpFile.cs index 30f5f0f2be..985e9006b9 100644 --- a/src/BizHawk.Client.EmuHawk/QuickBmpFile.cs +++ b/src/BizHawk.Client.EmuHawk/QuickBmpFile.cs @@ -270,7 +270,7 @@ namespace BizHawk.Client.EmuHawk fixed (int* dstp = dst) { using (new SimpleTime("Blit")) - { + { Blit(new BMP { Data = (int*)srcp, @@ -316,7 +316,7 @@ namespace BizHawk.Client.EmuHawk fixed (byte* dstp = dst) { using (new SimpleTime("Blit")) - { + { Blit(new BMP { Data = srcp, diff --git a/src/BizHawk.Client.EmuHawk/config/DisplayConfig.cs b/src/BizHawk.Client.EmuHawk/config/DisplayConfig.cs index fa5500031f..8e45c3c86b 100644 --- a/src/BizHawk.Client.EmuHawk/config/DisplayConfig.cs +++ b/src/BizHawk.Client.EmuHawk/config/DisplayConfig.cs @@ -269,7 +269,7 @@ namespace BizHawk.Client.EmuHawk // try compiling it bool ok = false; string errors = ""; - try + try { var filter = new RetroShaderChain(_gl, cgp, Path.GetDirectoryName(choice)); ok = filter.Available; diff --git a/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.cs b/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.cs index ae7a91fe97..0c5410ebef 100644 --- a/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.cs +++ b/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.cs @@ -16,7 +16,7 @@ using BizHawk.Emulation.Common; // notes: eventually, we intend to have a "firmware acquisition interface" exposed to the emulator cores. // it will be implemented by EmuHawk, and use firmware keys to fetch the firmware content. -// however, for now, the cores are using strings from the config class. so we have the `configMember` which is +// however, for now, the cores are using strings from the config class. so we have the `configMember` which is // used by reflection to set the configuration for firmwares which were found // TODO - we may eventually need to add a progress dialog for this. we should have one for other reasons. @@ -119,7 +119,7 @@ namespace BizHawk.Client.EmuHawk InitializeComponent(); tbbGroup.Image - = tbbScan.Image + = tbbScan.Image = tbbOrganize.Image = tbbImport.Image = tbbClose.Image @@ -402,12 +402,12 @@ namespace BizHawk.Client.EmuHawk try { - File.Move(fpSource, fpTarget); + File.Move(fpSource, fpTarget); } catch { - // sometimes moves fail. especially in newer versions of windows with explorers more fragile than your great-grandma. - // I am embarrassed that I know that. about windows, not your great-grandma. + // sometimes moves fail. especially in newer versions of windows with explorers more fragile than your great-grandma. + // I am embarrassed that I know that. about windows, not your great-grandma. } } @@ -715,7 +715,7 @@ namespace BizHawk.Client.EmuHawk if (_cbAllowImport.Checked || Manager.CanFileBeImported(hf.CanonicalFullPath)) { didSomething |= RunImportJobSingle(basePath, f, ref errors); - } + } } } diff --git a/src/BizHawk.Client.EmuHawk/config/Messages/ColorRow.cs b/src/BizHawk.Client.EmuHawk/config/Messages/ColorRow.cs index 75f9b4f73c..cb393343f1 100644 --- a/src/BizHawk.Client.EmuHawk/config/Messages/ColorRow.cs +++ b/src/BizHawk.Client.EmuHawk/config/Messages/ColorRow.cs @@ -36,8 +36,8 @@ namespace BizHawk.Client.EmuHawk private void ColorPanel_Click(object sender, EventArgs e) { - using var colorPicker = new ColorDialog - { + using var colorPicker = new ColorDialog + { FullOpen = true, Color = Color.FromArgb(_selectedColor) }; diff --git a/src/BizHawk.Client.EmuHawk/config/Messages/MessageConfig.cs b/src/BizHawk.Client.EmuHawk/config/Messages/MessageConfig.cs index aaad750bd2..9d08e1572f 100644 --- a/src/BizHawk.Client.EmuHawk/config/Messages/MessageConfig.cs +++ b/src/BizHawk.Client.EmuHawk/config/Messages/MessageConfig.cs @@ -82,8 +82,8 @@ namespace BizHawk.Client.EmuHawk int y = 12; foreach (var position in Positions) { - var row = new MessageRow - { + var row = new MessageRow + { Name = position.Key, Location = new Point(10, y) }; @@ -106,7 +106,7 @@ namespace BizHawk.Client.EmuHawk int y = 20; foreach (var color in Colors) { - var row = new ColorRow + var row = new ColorRow { Name = color.Key, Location = new Point(10, y), diff --git a/src/BizHawk.Client.EmuHawk/config/Messages/MessageRow.cs b/src/BizHawk.Client.EmuHawk/config/Messages/MessageRow.cs index 5d682b061c..907f639849 100644 --- a/src/BizHawk.Client.EmuHawk/config/Messages/MessageRow.cs +++ b/src/BizHawk.Client.EmuHawk/config/Messages/MessageRow.cs @@ -31,7 +31,7 @@ namespace BizHawk.Client.EmuHawk public bool Checked { get => RowRadio.Checked; - set + set { _programmaticallyUpdating = true; RowRadio.Checked = value; diff --git a/src/BizHawk.Client.EmuHawk/config/N64/N64VideoPluginconfig.cs b/src/BizHawk.Client.EmuHawk/config/N64/N64VideoPluginconfig.cs index 5bb8b80f14..4899f0917f 100644 --- a/src/BizHawk.Client.EmuHawk/config/N64/N64VideoPluginconfig.cs +++ b/src/BizHawk.Client.EmuHawk/config/N64/N64VideoPluginconfig.cs @@ -130,7 +130,7 @@ namespace BizHawk.Client.EmuHawk _config.PutCoreSettings(_s); _config.PutCoreSyncSettings(_ss); } - } + } private void N64VideoPluginConfig_Load(object sender, EventArgs e) { diff --git a/src/BizHawk.Client.EmuHawk/config/PSX/PSXOptions.cs b/src/BizHawk.Client.EmuHawk/config/PSX/PSXOptions.cs index 75aa9c3518..4cf48078ca 100644 --- a/src/BizHawk.Client.EmuHawk/config/PSX/PSXOptions.cs +++ b/src/BizHawk.Client.EmuHawk/config/PSX/PSXOptions.cs @@ -81,7 +81,7 @@ namespace BizHawk.Client.EmuHawk var s = psx.GetSettings(); var ss = psx.GetSyncSettings(); var vid = psx.SystemVidStandard; - var size = psx.CurrentVideoSize; + var size = psx.CurrentVideoSize; using var dlg = new PSXOptions(mainForm, config, s, ss, vid, size); var result = mainForm.ShowDialogAsChild(dlg); diff --git a/src/BizHawk.Client.EmuHawk/config/ZXSpectrum/ZXSpectrumJoystickSettings.cs b/src/BizHawk.Client.EmuHawk/config/ZXSpectrum/ZXSpectrumJoystickSettings.cs index 8e87f4a601..36109a368a 100644 --- a/src/BizHawk.Client.EmuHawk/config/ZXSpectrum/ZXSpectrumJoystickSettings.cs +++ b/src/BizHawk.Client.EmuHawk/config/ZXSpectrum/ZXSpectrumJoystickSettings.cs @@ -80,7 +80,7 @@ namespace BizHawk.Client.EmuHawk Port3ComboBox.SelectedItem = _possibleControllers.First(); selectionValid = false; } - } + } var j3 = Port3ComboBox.SelectedItem.ToString(); if (j3 != _possibleControllers.First()) diff --git a/src/BizHawk.Client.EmuHawk/config/ZXSpectrum/ZXSpectrumNonSyncSettings.cs b/src/BizHawk.Client.EmuHawk/config/ZXSpectrum/ZXSpectrumNonSyncSettings.cs index e0b116fa4a..865b91fd49 100644 --- a/src/BizHawk.Client.EmuHawk/config/ZXSpectrum/ZXSpectrumNonSyncSettings.cs +++ b/src/BizHawk.Client.EmuHawk/config/ZXSpectrum/ZXSpectrumNonSyncSettings.cs @@ -29,7 +29,7 @@ namespace BizHawk.Client.EmuHawk checkBoxShowCoreBrdColor.Checked = _settings.UseCoreBorderForBackground; // OSD Message Verbosity - var osdTypes = Enum.GetNames(typeof(ZXSpectrum.OSDVerbosity)); + var osdTypes = Enum.GetNames(typeof(ZXSpectrum.OSDVerbosity)); foreach (var val in osdTypes) { osdMessageVerbositycomboBox1.Items.Add(val); diff --git a/src/BizHawk.Client.EmuHawk/movie/PlayMovie.cs b/src/BizHawk.Client.EmuHawk/movie/PlayMovie.cs index c1c4987f39..62058ddc15 100644 --- a/src/BizHawk.Client.EmuHawk/movie/PlayMovie.cs +++ b/src/BizHawk.Client.EmuHawk/movie/PlayMovie.cs @@ -554,7 +554,7 @@ namespace BizHawk.Client.EmuHawk Run(); _movieSession.ReadOnly = ReadOnlyCheckBox.Checked; - if (StopOnFrameCheckbox.Checked && + if (StopOnFrameCheckbox.Checked && (StopOnFrameTextBox.ToRawInt().HasValue || LastFrameCheckbox.Checked)) { _mainForm.PauseOnFrame = LastFrameCheckbox.Checked diff --git a/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs b/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs index 2a11899848..1dc4061074 100644 --- a/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs +++ b/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs @@ -255,7 +255,7 @@ namespace BizHawk.Client.EmuHawk // Upon Load State, TAStudio uses global ToolManager.UpdateBefore(); as well as global ToolManager.UpdateAfter(); - // Both of which will Call UpdateValues() and Update() which both end up in the Update() function. Calling Update() will cause the Log to add an additional log. + // Both of which will Call UpdateValues() and Update() which both end up in the Update() function. Calling Update() will cause the Log to add an additional log. // By not handling both of those calls the _currentBotAttempt.Log.Count will be 2 more than expected. // However this also causes a problem with RamWatch not being up to date since that TOO gets called. // Need to find out if having RamWatch open while TasStudio is open causes issues. diff --git a/src/BizHawk.Client.EmuHawk/tools/CDL.cs b/src/BizHawk.Client.EmuHawk/tools/CDL.cs index 0c6fcc5b9b..fff6bfb488 100644 --- a/src/BizHawk.Client.EmuHawk/tools/CDL.cs +++ b/src/BizHawk.Client.EmuHawk/tools/CDL.cs @@ -8,7 +8,7 @@ using BizHawk.Client.Common; using BizHawk.Client.EmuHawk.Properties; using BizHawk.Client.EmuHawk.ToolExtensions; -// TODO - select which memorydomains go out to the CDL file. will this cause a problem when re-importing it? +// TODO - select which memorydomains go out to the CDL file. will this cause a problem when re-importing it? // perhaps missing domains shouldn't fail a check // OR - just add a contextmenu option to the ListView item that selects it for export. // TODO - add a contextmenu option which warps to the HexEditor with the provided domain selected for visualizing on the hex editor. diff --git a/src/BizHawk.Client.EmuHawk/tools/Cheats/CheatEdit.cs b/src/BizHawk.Client.EmuHawk/tools/Cheats/CheatEdit.cs index a7f833dd43..ad658b16a9 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Cheats/CheatEdit.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Cheats/CheatEdit.cs @@ -113,11 +113,11 @@ namespace BizHawk.Client.EmuHawk AddressBox.SetHexProperties(MemoryDomains.SystemBus.Size); } - ValueBox.ByteSize = + ValueBox.ByteSize = CompareBox.ByteSize = WatchSize.Byte; - ValueBox.Type = + ValueBox.Type = CompareBox.Type = WatchDisplayType.Hex; @@ -223,7 +223,7 @@ namespace BizHawk.Client.EmuHawk { PopulateTypeDropdown(); - ValueBox.ByteSize = + ValueBox.ByteSize = CompareBox.ByteSize = GetCurrentSize(); } @@ -373,7 +373,7 @@ namespace BizHawk.Client.EmuHawk "" }); } - else + else { CompareTypeDropDown.Items.AddRange(new object[] { diff --git a/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs b/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs index f5a2ab9e8f..b8ffd179f1 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs @@ -172,7 +172,7 @@ namespace BizHawk.Client.EmuHawk GeneralUpdate(); } - private void SetColumns() + private void SetColumns() { CheatListView.AllColumns.AddRange(Settings.Columns); CheatListView.Refresh(); diff --git a/src/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs b/src/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs index 2b33bc589d..d89f0d469a 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs @@ -243,7 +243,7 @@ namespace BizHawk.Client.EmuHawk return base.ProcessCmdKey(ref msg, keyData); } - private Control _currentToolTipControl = null; + private Control _currentToolTipControl = null; private void GenericDebugger_MouseMove(object sender, MouseEventArgs e) { diff --git a/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs b/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs index 806f306ba4..83f841a9e6 100644 --- a/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs +++ b/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs @@ -302,7 +302,7 @@ namespace BizHawk.Client.EmuHawk GoToAddress(found); _findStr = search; } - else if (wrap == false) + else if (wrap == false) { FindPrev(value, true); // Search the opposite direction if not found } @@ -349,7 +349,7 @@ namespace BizHawk.Client.EmuHawk GoToAddress(found); _findStr = search; } - else if (wrap == false) + else if (wrap == false) { FindPrev(value, true); // Search the opposite direction if not found } @@ -2248,7 +2248,7 @@ namespace BizHawk.Client.EmuHawk for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j++) + for (int j = 0; j < 4; j++) { ushort hi = _domain.PeekUshort(((addr+(i<<3)+(j<<1) )^0x0), bigEndian); ushort lo = _domain.PeekUshort(((addr+(i<<3)+(j<<1) + 32)^0x0), bigEndian); @@ -2275,4 +2275,4 @@ namespace BizHawk.Client.EmuHawk DialogController.ShowMessageBox(str); } } -} +} diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaCanvas.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaCanvas.cs index 97c3287ede..b9144d635b 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaCanvas.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaCanvas.cs @@ -89,7 +89,7 @@ namespace BizHawk.Client.EmuHawk [LuaMethod( "setLocation", "Sets the location of the canvas window")] - public void SetLocation(int x, int y) + public void SetLocation(int x, int y) { StartPosition = FormStartPosition.Manual; Left = x; diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs index dd72f59aa5..47a8efc226 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs @@ -295,8 +295,7 @@ namespace BizHawk.Client.EmuHawk { Path = Path.GetDirectoryName(path), Filter = Path.GetFileName(path), - NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite - | NotifyFilters.FileName | NotifyFilters.DirectoryName, + NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName, EnableRaisingEvents = true }; @@ -1259,11 +1258,11 @@ namespace BizHawk.Client.EmuHawk { RegisteredFunctionsContextItem.Enabled = LuaImp.RegisteredFunctions.Any(); CopyContextItem.Enabled = OutputBox.SelectedText.Any(); - ClearConsoleContextItem.Enabled = - SelectAllContextItem.Enabled = + ClearConsoleContextItem.Enabled = + SelectAllContextItem.Enabled = OutputBox.Text.Any(); - ClearRegisteredFunctionsLogContextItem.Enabled = + ClearRegisteredFunctionsLogContextItem.Enabled = LuaImp.RegisteredFunctions.Any(); } @@ -1499,7 +1498,7 @@ namespace BizHawk.Client.EmuHawk // For whatever reason an auto-complete TextBox doesn't respond to delete // Which is annoying but worse is that it let's the key propagate - // If a script is highlighted in the ListView, and the user presses + // If a script is highlighted in the ListView, and the user presses // delete, it will remove the script without this hack protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { diff --git a/src/BizHawk.Client.EmuHawk/tools/Macros/MacroInput.cs b/src/BizHawk.Client.EmuHawk/tools/Macros/MacroInput.cs index 0ab9519c9e..e5415efec2 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Macros/MacroInput.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Macros/MacroInput.cs @@ -23,7 +23,7 @@ namespace BizHawk.Client.EmuHawk private IMovie CurrentMovie => MovieSession.Movie; - // Still need to make sure the user can't load and use macros that + // Still need to make sure the user can't load and use macros that // have options only available for TasMovie private bool _initializing; diff --git a/src/BizHawk.Client.EmuHawk/tools/Macros/MovieZone.cs b/src/BizHawk.Client.EmuHawk/tools/Macros/MovieZone.cs index 32cbbdb7b4..a262b27789 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Macros/MovieZone.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Macros/MovieZone.cs @@ -144,14 +144,14 @@ namespace BizHawk.Client.EmuHawk } if (Start > movie.InputLogLength) - { + { // Cannot place a frame here. Find a nice way around this. return; } // Can't be done with a regular movie. if (!Replace && movie is ITasMovie tasMovie2) - { + { tasMovie2.InsertEmptyFrame(Start, Length); } @@ -169,7 +169,7 @@ namespace BizHawk.Client.EmuHawk { // Copy over the frame. for (int i = 0; i < Length; i++) - { + { _controller.SetFromMnemonic(_log[i]); LatchFromSourceButtons(_targetController, _controller); movie.PokeFrame(i + Start, _targetController); diff --git a/src/BizHawk.Client.EmuHawk/tools/NES/PaletteViewer.cs b/src/BizHawk.Client.EmuHawk/tools/NES/PaletteViewer.cs index 7b27921261..a08d09c601 100644 --- a/src/BizHawk.Client.EmuHawk/tools/NES/PaletteViewer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/NES/PaletteViewer.cs @@ -63,9 +63,9 @@ namespace BizHawk.Client.EmuHawk { for (int x = 0; x < 16; x++) { - if (BgPalettes[x].Value != BgPalettesPrev[x].Value) + if (BgPalettes[x].Value != BgPalettesPrev[x].Value) return true; - if (SpritePalettes[x].Value != SpritePalettesPrev[x].Value) + if (SpritePalettes[x].Value != SpritePalettesPrev[x].Value) return true; } return false; diff --git a/src/BizHawk.Client.EmuHawk/tools/PCE/PCESoundDebugger.cs b/src/BizHawk.Client.EmuHawk/tools/PCE/PCESoundDebugger.cs index 5c3daa4ed3..186de35992 100644 --- a/src/BizHawk.Client.EmuHawk/tools/PCE/PCESoundDebugger.cs +++ b/src/BizHawk.Client.EmuHawk/tools/PCE/PCESoundDebugger.cs @@ -166,8 +166,8 @@ namespace BizHawk.Client.EmuHawk // 32*16 samples, 16bit, mono, 8khz (but we'll change the sample rate) private static readonly byte[] EmptyWav = { - 0x52, 0x49, 0x46, 0x46, 0x24, 0x04, 0x00, 0x00, 0x57, 0x41, 0x56, 0x45, 0x66, 0x6D, 0x74, 0x20, - 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0xE0, 0x2E, 0x00, 0x00, 0xC0, 0x5D, 0x00, 0x00, + 0x52, 0x49, 0x46, 0x46, 0x24, 0x04, 0x00, 0x00, 0x57, 0x41, 0x56, 0x45, 0x66, 0x6D, 0x74, 0x20, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0xE0, 0x2E, 0x00, 0x00, 0xC0, 0x5D, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, 0x64, 0x61, 0x74, 0x61, 0x00, 0x04, 0x00, 0x00 }; diff --git a/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.cs b/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.cs index 54864df77a..3307270b01 100644 --- a/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.cs @@ -53,7 +53,7 @@ namespace BizHawk.Client.EmuHawk for (int i = 0; i < 256; i++) { if ((i & 15) == 0) - dest += inc; + dest += inc; *dest++ = pal[*src++]; } } diff --git a/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.cs b/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.cs index b819f9ef27..8e1439730f 100644 --- a/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.cs +++ b/src/BizHawk.Client.EmuHawk/tools/SNES/SNESGraphicsDebugger.cs @@ -938,7 +938,7 @@ namespace BizHawk.Client.EmuHawk { if (currMapEntryState != null) { - //view a BG tile + //view a BG tile int paletteStart = 0; var bgs = currMapEntryState; var oneTileEntry = new[] { bgs.entry }; @@ -978,7 +978,7 @@ namespace BizHawk.Client.EmuHawk else if (currTileDataState.Type == eDisplayType.TilesMode7DC) gd.RenderMode7TilesToScreen((int*)bmpdata.Scan0, bmpdata.Stride / 4, false, true, 1, currTileDataState.Tile, 1); else if (currTileDataState.Type == eDisplayType.OBJTiles0 || currTileDataState.Type == eDisplayType.OBJTiles1) - { + { //render an obj tile int tile = currTileDataState.Address / 32; gd.RenderTilesToScreen((int*)bmpdata.Scan0, 1, 1, bmpdata.Stride / 4, bpp, currPaletteSelection.start, tile, 1); @@ -1356,5 +1356,5 @@ namespace BizHawk.Client.EmuHawk checkEN3_OBJ.Checked ^= true; } - } //class SNESGraphicsDebugger + } //class SNESGraphicsDebugger } //namespace BizHawk.Client.EmuHawk diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs index 2c5f9b8db8..2b7e6d896b 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs @@ -144,7 +144,7 @@ namespace BizHawk.Client.EmuHawk // Highlight the branch cell a little, if hovering over it if (BranchView.CurrentCell.IsDataCell() && BranchView.CurrentCell.Column.Name == BranchNumberColumnName && - column.Name == BranchNumberColumnName && + column.Name == BranchNumberColumnName && index == BranchView.CurrentCell.RowIndex) { color = Color.FromArgb((byte)(color.A - 24), (byte)(color.R - 24), (byte)(color.G - 24), (byte)(color.B - 24)); @@ -229,7 +229,7 @@ namespace BizHawk.Client.EmuHawk UpdateBranchContextMenuItem.Enabled = LoadBranchContextMenuItem.Enabled = EditBranchTextContextMenuItem.Enabled = - JumpToBranchContextMenuItem.Enabled = + JumpToBranchContextMenuItem.Enabled = BranchView.SelectedRows.Count() == 1; } diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs index f68bb72c7b..db6d365483 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs @@ -1034,7 +1034,7 @@ namespace BizHawk.Client.EmuHawk // If going backwards, delete! bool shouldInsert = true; if (startVal < _rightClickFrame) - { + { // Cloning to a previous frame makes no sense. startVal = _rightClickFrame - 1; } diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs index 65f244737f..5850dd31b8 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs @@ -334,7 +334,7 @@ namespace BizHawk.Client.EmuHawk CloneFramesXTimesMenuItem.Enabled = TruncateMenuItem.Enabled = InsertFrameMenuItem.Enabled = - InsertNumFramesMenuItem.Enabled = + InsertNumFramesMenuItem.Enabled = TasView.AnyRowsSelected; ReselectClipboardMenuItem.Enabled = diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index 841d46454a..be0baceca1 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -291,7 +291,7 @@ namespace BizHawk.Client.EmuHawk return; } - if (!CurrentTasMovie.Changes || Settings.AutosaveInterval == 0 + if (!CurrentTasMovie.Changes || Settings.AutosaveInterval == 0 || CurrentTasMovie.Filename == DefaultTasProjName()) { return; @@ -957,7 +957,7 @@ namespace BizHawk.Client.EmuHawk if (fromLua) { - bool wasPaused = MainForm.EmulatorPaused; + bool wasPaused = MainForm.EmulatorPaused; // why not use this? because I'm not letting the form freely run. it all has to be under this loop. // i could use this and then poll StepRunLoop_Core() repeatedly, but.. that's basically what I'm doing @@ -1157,7 +1157,7 @@ namespace BizHawk.Client.EmuHawk private void TAStudio_DragDrop(object sender, DragEventArgs e) { - // TODO: Maybe this should call Mainform's DragDrop method, + // TODO: Maybe this should call Mainform's DragDrop method, // since that can file types that are not movies, // and it can process multiple files sequentially var filePaths = (string[])e.Data.GetData(DataFormats.FileDrop); diff --git a/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs b/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs index 555bcdf8f3..37363923f5 100644 --- a/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs +++ b/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs @@ -269,7 +269,7 @@ namespace BizHawk.Client.EmuHawk var closeMenuItem = new ToolStripMenuItem { - Name = "CloseBtn", + Name = "CloseBtn", Text = "&Close", ShortcutKeyDisplayString = "Alt+F4" }; diff --git a/src/BizHawk.Common/Bit.cs b/src/BizHawk.Common/Bit.cs index 4f07234b04..0ba4f5dab5 100644 --- a/src/BizHawk.Common/Bit.cs +++ b/src/BizHawk.Common/Bit.cs @@ -15,7 +15,7 @@ namespace BizHawk.Common public static implicit operator Bit(int rhs) { - Debug.Assert((rhs & ~1) == 0); + Debug.Assert((rhs & ~1) == 0); return new Bit((uint)rhs); } diff --git a/src/BizHawk.Common/CustomCollections.cs b/src/BizHawk.Common/CustomCollections.cs index 510321c9cd..ab6afa5c5f 100644 --- a/src/BizHawk.Common/CustomCollections.cs +++ b/src/BizHawk.Common/CustomCollections.cs @@ -100,7 +100,7 @@ namespace BizHawk.Common var startIndex = _list.BinarySearch(item); if (startIndex < 0) { - // If BinarySearch doesn't find the item, + // If BinarySearch doesn't find the item, // it returns the bitwise complement of the index of the next element // that is larger than item startIndex = ~startIndex; diff --git a/src/BizHawk.Common/Log.cs b/src/BizHawk.Common/Log.cs index 7834c7633f..584037b03c 100644 --- a/src/BizHawk.Common/Log.cs +++ b/src/BizHawk.Common/Log.cs @@ -15,7 +15,7 @@ namespace BizHawk.Common //LogFilename = "d:/bizhawk.log"; //EnableDomain("CD"); //EnableDomain("CPU"); - //EnableDomain("VDC"); + //EnableDomain("VDC"); //EnableDomain("MEM"); } diff --git a/src/BizHawk.Emulation.Common/Base Implementations/BasicServiceProvider.cs b/src/BizHawk.Emulation.Common/Base Implementations/BasicServiceProvider.cs index a5a1775384..3c975e9efd 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/BasicServiceProvider.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/BasicServiceProvider.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Common /// that the core object itself implements. In addition it provides /// a Register() method to allow the core to pass in any additional services /// - /// + /// public class BasicServiceProvider : IEmulatorServiceProvider { private readonly Dictionary _services = new Dictionary(); @@ -46,7 +46,7 @@ namespace BizHawk.Emulation.Common /// the core can call this to register an additional service /// The to register /// is null - public void Register(T provider) + public void Register(T provider) where T : IEmulatorService { if (provider == null) diff --git a/src/BizHawk.Emulation.Common/Base Implementations/CallbackBasedTraceBuffer.cs b/src/BizHawk.Emulation.Common/Base Implementations/CallbackBasedTraceBuffer.cs index a7b3bf1543..0dd6726282 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/CallbackBasedTraceBuffer.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/CallbackBasedTraceBuffer.cs @@ -11,10 +11,10 @@ namespace BizHawk.Emulation.Common /// This allows for a traceable implementation without the need for additional API /// Note that this technique will always be significantly slower than a direct implementation /// - /// - /// - /// - /// + /// + /// + /// + /// public abstract class CallbackBasedTraceBuffer : ITraceable { /// does not provide memory callback support or does not implement diff --git a/src/BizHawk.Emulation.Common/Base Implementations/CodeDataLog.cs b/src/BizHawk.Emulation.Common/Base Implementations/CodeDataLog.cs index b1c35eaf33..cc9a5c4ac5 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/CodeDataLog.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/CodeDataLog.cs @@ -8,8 +8,8 @@ namespace BizHawk.Emulation.Common /// /// The base implementation of ICodeDataLog /// - /// - /// + /// + /// public class CodeDataLog : Dictionary, ICodeDataLog { public CodeDataLog() diff --git a/src/BizHawk.Emulation.Common/Base Implementations/ControllerDefinition.cs b/src/BizHawk.Emulation.Common/Base Implementations/ControllerDefinition.cs index e4c6ab2d18..55a1cbd387 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/ControllerDefinition.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/ControllerDefinition.cs @@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Common /// /// Defines the schema for all the currently available controls for an IEmulator instance /// - /// + /// public class ControllerDefinition { public ControllerDefinition() diff --git a/src/BizHawk.Emulation.Common/Base Implementations/MemoryBasedInputCallbackSystem.cs b/src/BizHawk.Emulation.Common/Base Implementations/MemoryBasedInputCallbackSystem.cs index 15384b63ca..3516cfab53 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/MemoryBasedInputCallbackSystem.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/MemoryBasedInputCallbackSystem.cs @@ -10,8 +10,8 @@ namespace BizHawk.Emulation.Common /// Useful for ported cores that have these hooks but no input callback hook, /// This allows for an input callback implementation without the need for additional APIs /// - /// - /// + /// + /// public class MemoryBasedInputCallbackSystem : IInputCallbackSystem { private readonly List _inputCallbacks = new List(); diff --git a/src/BizHawk.Emulation.Common/Base Implementations/MemoryDomainStream.cs b/src/BizHawk.Emulation.Common/Base Implementations/MemoryDomainStream.cs index 44cf20dc3b..b2dfbac950 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/MemoryDomainStream.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/MemoryDomainStream.cs @@ -26,7 +26,7 @@ namespace BizHawk.Emulation.Common get => _position; set { - if (value < 0 || value > _d.Size) + if (value < 0 || value > _d.Size) throw new IOException("Position out of range"); _position = value; } diff --git a/src/BizHawk.Emulation.Common/Database/FirmwareDatabase.cs b/src/BizHawk.Emulation.Common/Database/FirmwareDatabase.cs index 7138f62a05..d57df2bf33 100644 --- a/src/BizHawk.Emulation.Common/Database/FirmwareDatabase.cs +++ b/src/BizHawk.Emulation.Common/Database/FirmwareDatabase.cs @@ -202,7 +202,7 @@ namespace BizHawk.Emulation.Common // http://forum.fobby.net/index.php?t=msg&goto=2763 [f] // http://www.psxdev.net/forum/viewtopic.php?f=69&t=56 [p] // https://en.wikipedia.org/wiki/PlayStation_models#Comparison_of_models [w] - // https://github.com/petrockblog/RetroPie-Setup/wiki/PCSX-Core-Playstation-1 [g] + // https://github.com/petrockblog/RetroPie-Setup/wiki/PCSX-Core-Playstation-1 [g] // http://redump.org/datfile/psx-bios/ also // http://emulation.gametechwiki.com/index.php/File_Hashes [t] var ps_10j = File("343883A7B555646DA8CEE54AADD2795B6E7DD070", 524288, "PSX_1.0(J).bin", "PSX BIOS (Version 1.0 J)", "Used on SCPH-1000, DTL-H1000 [g]. This is Rev for A hardware [w]."); diff --git a/src/BizHawk.Emulation.Common/Extensions.cs b/src/BizHawk.Emulation.Common/Extensions.cs index e3f1d4942e..1c8c3aa03a 100644 --- a/src/BizHawk.Emulation.Common/Extensions.cs +++ b/src/BizHawk.Emulation.Common/Extensions.cs @@ -350,7 +350,7 @@ namespace BizHawk.Emulation.Common /// Gets a list of boolean button names. If a controller number is specified, only returns button names /// (without the "P" prefix) that match that controller number. If a controller number is NOT specified, /// then all button names are returned. - /// + /// /// For example, consider example "P1 A", "P1 B", "P2 A", "P2 B". See below for sample outputs: /// - ToBoolButtonNameList(controller, 1) -> [A, B] /// - ToBoolButtonNameList(controller, 2) -> [A, B] diff --git a/src/BizHawk.Emulation.Common/Interfaces/IEmulator.cs b/src/BizHawk.Emulation.Common/Interfaces/IEmulator.cs index 0f148bfe44..4db0140b89 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/IEmulator.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/IEmulator.cs @@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Common /// /// Gets the service provider. /// This is the intended mechanism to get services from a core - /// Retrieves an IEmulatorService from the core, + /// Retrieves an IEmulatorService from the core, /// if the core does not have the type specified, it will return null /// IEmulatorServiceProvider ServiceProvider { get; } diff --git a/src/BizHawk.Emulation.Common/Interfaces/IEmulatorServiceProvider.cs b/src/BizHawk.Emulation.Common/Interfaces/IEmulatorServiceProvider.cs index 03db711db5..9e0421fa6e 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/IEmulatorServiceProvider.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/IEmulatorServiceProvider.cs @@ -11,8 +11,8 @@ namespace BizHawk.Emulation.Common /// by which a service provider will be populated with available services. However, an implementation /// by design must provide this mechanism /// - /// - /// + /// + /// public interface IEmulatorServiceProvider { /// diff --git a/src/BizHawk.Emulation.Common/Interfaces/IInputCallbackSystem.cs b/src/BizHawk.Emulation.Common/Interfaces/IInputCallbackSystem.cs index b109909c22..65c2c71f7b 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/IInputCallbackSystem.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/IInputCallbackSystem.cs @@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Common /// gets and sets input callbacks in the core. An input callback should fire any time input is /// polled by the core /// - /// + /// public interface IInputCallbackSystem : ICollection { /// diff --git a/src/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs b/src/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs index d851b9325f..d146083c60 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Common /// gets and sets memory callbacks in the core. A memory callback should fire any time memory is /// read/written/executed by the core, and depends on the type specified by the callback /// - /// + /// public interface IMemoryCallbackSystem : IEnumerable { /* @@ -97,7 +97,7 @@ namespace BizHawk.Emulation.Common /// /// This service defines a memory callback used by an IMemoryCallbackSystem implementation /// - /// + /// public interface IMemoryCallback { MemoryCallbackType Type { get; } diff --git a/src/BizHawk.Emulation.Common/Interfaces/Services/ICodeDataLogger.cs b/src/BizHawk.Emulation.Common/Interfaces/Services/ICodeDataLogger.cs index ec1a6003f7..8b0115bff0 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/Services/ICodeDataLogger.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/Services/ICodeDataLogger.cs @@ -30,7 +30,7 @@ namespace BizHawk.Emulation.Common /// /// Defines a code/data log to be used with the code/data logger /// - /// + /// public interface ICodeDataLog : IDictionary { /// diff --git a/src/BizHawk.Emulation.Common/Interfaces/Services/IMemoryDomains.cs b/src/BizHawk.Emulation.Common/Interfaces/Services/IMemoryDomains.cs index a34b992621..16545425f6 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/Services/IMemoryDomains.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/Services/IMemoryDomains.cs @@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Common /// A memory domain is a byte array that represents the memory of a distinct part of the emulated system. /// All cores should implement a SystemBus that represents the standard CPU bus range used for cheats for that system, /// In order to have a cheat system available for the core - /// All domains should implement both peek and poke. However, + /// All domains should implement both peek and poke. However, /// if a domain does not implement poke, it should throw NotImplementedException rather than silently fail /// If this service is available the client will expose many RAM related tools such as the Hex Editor, RAM Search/Watch, and Cheats /// In addition, this is an essential service for effective LUA scripting, and many other tools diff --git a/src/BizHawk.Emulation.Common/Interfaces/Services/ISettable.cs b/src/BizHawk.Emulation.Common/Interfaces/Services/ISettable.cs index 1f84ee181f..d9358e7a1d 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/Services/ISettable.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/Services/ISettable.cs @@ -54,7 +54,7 @@ namespace BizHawk.Emulation.Common //note: this is a bit of a frail API. If a frontend wants a new flag, cores won't know to yea or nay it //this could be solved by adding a KnownSettingsDirtyBits on the settings interface - //or, in a pinch, the same thing could be done with THESE flags, so that the interface doesn't + //or, in a pinch, the same thing could be done with THESE flags, so that the interface doesn't //change but newly-aware cores can simply manifest that they know about more bits, in the same variable they return the bits in [Flags] public enum PutSettingsDirtyBits diff --git a/src/BizHawk.Emulation.DiscSystem/Disc.cs b/src/BizHawk.Emulation.DiscSystem/Disc.cs index ffd4320f77..cf4c8124ac 100644 --- a/src/BizHawk.Emulation.DiscSystem/Disc.cs +++ b/src/BizHawk.Emulation.DiscSystem/Disc.cs @@ -46,7 +46,7 @@ namespace BizHawk.Emulation.DiscSystem /// /// The DiscTOCRaw corresponding to the RawTOCEntries. /// TODO - there's one of these for every session, so... having one here doesn't make sense - /// so... + /// so... /// TODO - remove me /// public DiscTOC TOC; diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_ECM.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_ECM.cs index a7d538db2f..f22c459667 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_ECM.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_ECM.cs @@ -1,16 +1,16 @@ //Copyright (c) 2012 BizHawk team -//Permission is hereby granted, free of charge, to any person obtaining a copy of +//Permission is hereby granted, free of charge, to any person obtaining a copy of //this software and associated documentation files (the "Software"), to deal in //the Software without restriction, including without limitation the rights to //use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies //of the Software, and to permit persons to whom the Software is furnished to do //so, subject to the following conditions: -//The above copyright notice and this permission notice shall be included in all +//The above copyright notice and this permission notice shall be included in all //copies or substantial portions of the Software. -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR //IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, //FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE //AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/RiffMaster.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/RiffMaster.cs index b1a3732662..ad2d9d0207 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/RiffMaster.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/RiffMaster.cs @@ -7,7 +7,7 @@ using BizHawk.Common; namespace BizHawk.Emulation.DiscSystem { /// - /// Parses a RIFF file into a live data structure. + /// Parses a RIFF file into a live data structure. /// References to large blobs remain mostly on disk in the file which RiffMaster keeps a reference too. Dispose it to close the file. /// You can modify blobs however you want and write the file back out to a new path, if you're careful (that was the original point of this) /// Please be sure to test round-tripping when you make any changes. This architecture is a bit tricky to use, but it works if you're careful. @@ -59,7 +59,7 @@ namespace BizHawk.Emulation.DiscSystem /// /// distinct from a size or a length, the `volume` is the volume of bytes occupied by the chunk on disk (accounting for padding). - /// + /// /// public abstract long GetVolume(); @@ -278,7 +278,7 @@ namespace BizHawk.Emulation.DiscSystem private long readCounter; private RiffChunk ReadChunk(BinaryReader br) - { + { RiffChunk ret; string tag = ReadTag(br); readCounter += 4; uint size = br.ReadUInt32(); readCounter += 4; diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CCD_format.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CCD_format.cs index 3ed074e082..4a59b8e3f6 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CCD_format.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CCD_format.cs @@ -301,7 +301,7 @@ namespace BizHawk.Emulation.DiscSystem throw new CCDParseException("Warning: inconsistency in CCD PLBA vs computed P MSF"); if(entry.Session != 1) - throw new CCDParseException("Malformed CCD format: not yet supporting multi-session files"); + throw new CCDParseException("Malformed CCD format: not yet supporting multi-session files"); } else if (section.Name.StartsWith("TRACK")) { @@ -540,11 +540,11 @@ namespace BizHawk.Emulation.DiscSystem BCD2 tno, ino; //this should actually be zero. im not sure if this is stored as BCD2 or not - tno = BCD2.FromDecimal(entry.TrackNo); + tno = BCD2.FromDecimal(entry.TrackNo); //these are special values.. I think, taken from this: //http://www.staff.uni-mainz.de/tacke/scsi/SCSI2-14.html - //the CCD will contain Points as decimal values except for these specially converted decimal values which should stay as BCD. + //the CCD will contain Points as decimal values except for these specially converted decimal values which should stay as BCD. //Why couldn't they all be BCD? I don't know. I guess because BCD is inconvenient, but only A0 and friends have special meaning. It's confusing. ino = BCD2.FromDecimal(entry.Point); if (entry.Point == 0xA0) ino.BCDValue = 0xA0; diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Compile.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Compile.cs index 3decf59340..3f4900eccf 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Compile.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Compile.cs @@ -401,12 +401,12 @@ namespace BizHawk.Emulation.DiscSystem.CUE OUT_CompiledCueFiles = new List(); OUT_CompiledCueTracks = new List(); - //add a track 0, for addressing convenience. + //add a track 0, for addressing convenience. //note: for future work, track 0 may need emulation (accessible by very negative LBA--the TOC is stored there) var track0 = new CompiledCueTrack() { Number = 0, }; - OUT_CompiledCueTracks.Add(track0); + OUT_CompiledCueTracks.Add(track0); //global cd text will acquire the cdtext commands set before track commands curr_cdtext = OUT_GlobalCDText; diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Load.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Load.cs index bce525d1fc..d02743f847 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Load.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Load.cs @@ -12,7 +12,7 @@ //most fundamentally, it is organized with TRACK and INDEX commands alternating. //these should be flattened into individual records with CURRTRACK and CURRINDEX fields. //more generally, it's organized with 'register' settings and INDEX commands alternating. -//whenever an INDEX command is received from the cue file, individual flattened records are written with the current 'register' settings +//whenever an INDEX command is received from the cue file, individual flattened records are written with the current 'register' settings //and an incrementing timestamp until the INDEX command appears (or the EOF happens) //PREGAP commands are special : at the moment it is received, emit flat records with a different pregap structure //POSTGAP commands are special : TBD diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Synths.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Synths.cs index 159909e2f9..83b715c1fa 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Synths.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Synths.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.DiscSystem.CUE public SubchannelQ sq; //subP data - public bool Pause; + public bool Pause; public abstract void Synth(SectorSynthJob job); diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Types.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Types.cs index 1402705e2a..7b919527bf 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Types.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Types.cs @@ -14,8 +14,8 @@ namespace BizHawk.Emulation.DiscSystem.CUE } //All audio files (WAVE, AIFF, and MP3) must be in 44.1KHz 16-bit stereo format. - //BUT NOTE: MP3 can be VBR and the length can't be known without decoding the whole thing. - //But, some ideas: + //BUT NOTE: MP3 can be VBR and the length can't be known without decoding the whole thing. + //But, some ideas: //1. we could operate ffmpeg differently to retrieve the length, which maybe it can do without having to decode the entire thing //2. we could retrieve it from an ID3 if present. //3. as a last resort, since MP3 is the annoying case usually, we could include my c# mp3 parser and sum the length (test the performance, this might be reasonably fast on par with ECM parsing) diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CueFileResolver.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CueFileResolver.cs index 21e9c8fe86..63190c6d13 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CueFileResolver.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CueFileResolver.cs @@ -94,7 +94,7 @@ namespace BizHawk.Emulation.DiscSystem.CUE var ext = Path.GetExtension(fi.FullName).ToLowerInvariant(); //some choices are always bad: (we're looking for things like .bin and .wav) - //it's a little unclear whether we should go for a whitelist or a blacklist here. + //it's a little unclear whether we should go for a whitelist or a blacklist here. //there's similar numbers of cases either way. //perhaps we could code both (and prefer choices from the whitelist) if (ext == ".cue" || ext == ".sbi" || ext == ".ccd" || ext == ".sub") diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs index fba867dc6b..9e1c4061fd 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs @@ -659,7 +659,7 @@ namespace BizHawk.Emulation.DiscSystem //these are special values.. I think, taken from this: //http://www.staff.uni-mainz.de/tacke/scsi/SCSI2-14.html - //the CCD will contain Points as decimal values except for these specially converted decimal values which should stay as BCD. + //the CCD will contain Points as decimal values except for these specially converted decimal values which should stay as BCD. //Why couldn't they all be BCD? I don't know. I guess because BCD is inconvenient, but only A0 and friends have special meaning. It's confusing. ino = BCD2.FromDecimal(entry.Point); if (entry.Point == 0xA0) ino.BCDValue = 0xA0; @@ -747,13 +747,12 @@ namespace BizHawk.Emulation.DiscSystem blobstrings.Add(t); } - var tBlobs = (from a in tr.ImageFileNamePaths - select a).ToList(); + var tBlobs = (from a in tr.ImageFileNamePaths select a).ToList(); if (tBlobs.Count < 1) throw new MDSParseException("BLOB Error!"); - // is the currBlob valid for this track, or do we need to increment? + // is the currBlob valid for this track, or do we need to increment? string bString = tBlobs.First(); #endif @@ -826,9 +825,9 @@ namespace BizHawk.Emulation.DiscSystem case 2448: sBase = new CUE.SS_2352() { - Policy = IN_DiscMountPolicy + Policy = IN_DiscMountPolicy }; - //userSector = 2352; + //userSector = 2352; break; case 2048: default: @@ -857,7 +856,7 @@ namespace BizHawk.Emulation.DiscSystem //these are special values.. I think, taken from this: //http://www.staff.uni-mainz.de/tacke/scsi/SCSI2-14.html - //the CCD will contain Points as decimal values except for these specially converted decimal values which should stay as BCD. + //the CCD will contain Points as decimal values except for these specially converted decimal values which should stay as BCD. //Why couldn't they all be BCD? I don't know. I guess because BCD is inconvenient, but only A0 and friends have special meaning. It's confusing. ino = BCD2.FromDecimal(track.Point); if (track.Point == 0xA0) ino.BCDValue = 0xA0; diff --git a/src/BizHawk.Emulation.DiscSystem/DiscHasher.cs b/src/BizHawk.Emulation.DiscSystem/DiscHasher.cs index a6b760bd35..e799501b84 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscHasher.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscHasher.cs @@ -81,7 +81,7 @@ namespace BizHawk.Emulation.DiscSystem return crc.Result; } - // gets an identifying hash. hashes the first 512 sectors of + // gets an identifying hash. hashes the first 512 sectors of // the first data track on the disc. //TODO - this is a very platform-specific thing. hashing the TOC may be faster and be just as effective. so, rename it appropriately public string OldHash() diff --git a/src/BizHawk.Emulation.DiscSystem/DiscIdentifier.cs b/src/BizHawk.Emulation.DiscSystem/DiscIdentifier.cs index ed19e61f37..f62ccd0737 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscIdentifier.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscIdentifier.cs @@ -237,7 +237,7 @@ namespace BizHawk.Emulation.DiscSystem if (absTxt != null && SectorContains("abstracted by snk", Convert.ToInt32(absTxt.Offset))) return DiscType.NeoGeoCD; return DiscType.UnknownCDFS; - } + } return DiscType.UnknownFormat; } @@ -292,7 +292,7 @@ namespace BizHawk.Emulation.DiscSystem if (toc.FirstRecordedTrackNumber != 1) return false; if (!toc.TOCItems[1].IsData) return false; - //some have a signature + //some have a signature if (StringAt("HACKER CD ROM SYSTEM", 0x8, 0x10)) return true; @@ -367,7 +367,7 @@ namespace BizHawk.Emulation.DiscSystem if (data == null) return false; byte[] magic = data.Skip(28).Take(4).ToArray(); string hexString = ""; - foreach (var b in magic) + foreach (var b in magic) hexString += b.ToString("X2"); return hexString == "C2339F3D"; diff --git a/src/BizHawk.Emulation.DiscSystem/DiscMountJob.MednaDisc.cs b/src/BizHawk.Emulation.DiscSystem/DiscMountJob.MednaDisc.cs index 645cd101ab..2b5f59ab8f 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscMountJob.MednaDisc.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscMountJob.MednaDisc.cs @@ -59,7 +59,7 @@ var q = new SubchannelQ { - q_status = SubchannelQ.ComputeStatus(kADR, (EControlQ)m_te.control), + q_status = SubchannelQ.ComputeStatus(kADR, (EControlQ) m_te.control), q_tno = BCD2.FromDecimal(0), //unknown with mednadisc q_index = BCD2.FromDecimal(i), min = BCD2.FromDecimal(0), //unknown with mednadisc diff --git a/src/BizHawk.Emulation.DiscSystem/DiscMountJob.cs b/src/BizHawk.Emulation.DiscSystem/DiscMountJob.cs index a474d1a114..1e0e17ae47 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscMountJob.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscMountJob.cs @@ -204,7 +204,7 @@ namespace BizHawk.Emulation.DiscSystem INDEX 01 00:00:00"; if (len % 2048 != 0 && len % 2352 == 0) LoadCue(Path.GetDirectoryName(IN_FromPath), mode2cue); - else + else LoadCue(Path.GetDirectoryName(IN_FromPath), mode1cue); break; } diff --git a/src/BizHawk.Emulation.DiscSystem/DiscMountPolicy.cs b/src/BizHawk.Emulation.DiscSystem/DiscMountPolicy.cs index 03d1ff9354..353395abf6 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscMountPolicy.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscMountPolicy.cs @@ -9,14 +9,14 @@ namespace BizHawk.Emulation.DiscSystem public class DiscMountPolicy { /// - /// "At the beginning of a Pause (i.e. Index = 00) the relative time is + /// "At the beginning of a Pause (i.e. Index = 00) the relative time is /// --A-- set to the duration of the Pause. - /// During the Pause this relative time decreases and + /// During the Pause this relative time decreases and /// --B-- equals zero in the last Section" - /// This is a contradiction. + /// This is a contradiction. /// By choosing true, mode A is selected, and the final sector of the pause is -1. /// (I like this better. Defaulting until proven otherwise [write test case here]) - /// By choosing false, mode B is selected, and the final sector of the pause is 0. + /// By choosing false, mode B is selected, and the final sector of the pause is 0. /// (Mednafen does it this way) /// Discs (including PSX) exist using A, or B, or possibly (reference please) neither. /// diff --git a/src/BizHawk.Emulation.DiscSystem/DiscSectorReader.cs b/src/BizHawk.Emulation.DiscSystem/DiscSectorReader.cs index 7554434355..79c2fbdaf9 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscSectorReader.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscSectorReader.cs @@ -21,7 +21,7 @@ namespace BizHawk.Emulation.DiscSystem /// /// Read it as mode 2 (form 1) - /// + /// AssumeMode2_Form1, } diff --git a/src/BizHawk.Emulation.DiscSystem/DiscStream.cs b/src/BizHawk.Emulation.DiscSystem/DiscStream.cs index c2c3a3c6b9..1718c30953 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscStream.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscStream.cs @@ -38,7 +38,7 @@ namespace BizHawk.Emulation.DiscSystem /// /// Allows you to stream data off a disc. /// For future work: depending on the View you select, it may not be seekable (in other words, it would need to read sequentially) - /// + /// /// OLD COMMENTS: /// Allows you to stream data off a disc /// NOTE - it's probably been commented elsewhere, but this is possibly a bad idea! Turn it into views instead, @@ -46,7 +46,7 @@ namespace BizHawk.Emulation.DiscSystem /// NOTE - actually even THAT is probably a bad idea. sector types can change on the fly. /// this class promises something it can't deliver. (it's only being used to scan an ISO disc) /// Well, we could make code that is full of red flags and warnings like "if this ISNT a 2048 byte sector ISO disc, then this wont work" - /// + /// /// TODO - Receive some information about the track that this stream is modeling, and have the stream return EOF at the end of the track? /// public class DiscStream : System.IO.Stream diff --git a/src/BizHawk.Emulation.DiscSystem/DiscStructure.cs b/src/BizHawk.Emulation.DiscSystem/DiscStructure.cs index 175710dd09..109282b511 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscStructure.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscStructure.cs @@ -113,10 +113,10 @@ namespace BizHawk.Emulation.DiscSystem /// public class Track { - //Notable omission: + //Notable omission: //a list of Indices. It's difficult to reliably construct it. //Notably, mednafen can't readily produce it. - //Indices may need scanning sector by sector. + //Indices may need scanning sector by sector. //It's unlikely that any software would be needing indices anyway. //We should add another index scanning service if that's ever needed. //(note: a CCD should contain indices, but it's not clear whether it's required. logically it shouldn't be) diff --git a/src/BizHawk.Emulation.DiscSystem/DiscSubQ.cs b/src/BizHawk.Emulation.DiscSystem/DiscSubQ.cs index 6b4782e122..8e467c388e 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscSubQ.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscSubQ.cs @@ -5,12 +5,12 @@ //a decent little subcode reference //http://www.jbum.com/cdg_revealed.html -//NOTES: the 'subchannel Q' stuff here has a lot to do with the q-Mode 1. q-Mode 2 is different, +//NOTES: the 'subchannel Q' stuff here has a lot to do with the q-Mode 1. q-Mode 2 is different, //and q-Mode 1 technically is defined a little differently in the lead-in area, although the fields align so the data structures can be reused //Q subchannel basic structure: (quick ref: https://en.wikipedia.org/wiki/Compact_Disc_subcode) //Byte 1: (aka `status`) -// q-Control: 4 bits (i.e. flags) +// q-Control: 4 bits (i.e. flags) // q-Mode: 4 bits (aka ADR; WHY is this called ADR?) //q-Data: other stuff depending on q-Mode and type of track //q-CRC: CRC of preceding @@ -45,7 +45,7 @@ namespace BizHawk.Emulation.DiscSystem /// /// normal track: BCD indication of the current track number - /// leadin track: should be 0 + /// leadin track: should be 0 /// public BCD2 q_tno; @@ -102,7 +102,7 @@ namespace BizHawk.Emulation.DiscSystem /// Retrieves the second set of timestamps (ap_min, ap_sec, ap_frac) as a convenient Timestamp. /// TODO - rename everything AP here, it's nonsense. (the P is) /// - public int AP_Timestamp { + public int AP_Timestamp { get => MSF.ToInt(ap_min.DecimalValue, ap_sec.DecimalValue, ap_frame.DecimalValue); set { var ts = new Timestamp(value); diff --git a/src/BizHawk.Emulation.DiscSystem/DiscTOC.cs b/src/BizHawk.Emulation.DiscSystem/DiscTOC.cs index c06b8454bf..faa5f2e316 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscTOC.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscTOC.cs @@ -28,7 +28,7 @@ namespace BizHawk.Emulation.DiscSystem /// /// [IEC10149] "the control field used in the information track" /// the raw TOC entries do have a control field which is supposed to match what's found in the track. - /// Determining whether a track contains audio or data is very important. + /// Determining whether a track contains audio or data is very important. /// A track mode can't be safely determined from reading sectors from the actual track if it's an audio track (there's no sector header with a mode byte) /// public EControlQ Control; diff --git a/src/BizHawk.Emulation.DiscSystem/Internal/Algorithms/ECM.cs b/src/BizHawk.Emulation.DiscSystem/Internal/Algorithms/ECM.cs index 4bbbb15f7b..9bb971bc1a 100644 --- a/src/BizHawk.Emulation.DiscSystem/Internal/Algorithms/ECM.cs +++ b/src/BizHawk.Emulation.DiscSystem/Internal/Algorithms/ECM.cs @@ -1,16 +1,16 @@ //Copyright (c) 2012 BizHawk team -//Permission is hereby granted, free of charge, to any person obtaining a copy of +//Permission is hereby granted, free of charge, to any person obtaining a copy of //this software and associated documentation files (the "Software"), to deal in //the Software without restriction, including without limitation the rights to //use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies //of the Software, and to permit persons to whom the Software is furnished to do //so, subject to the following conditions: -//The above copyright notice and this permission notice shall be included in all +//The above copyright notice and this permission notice shall be included in all //copies or substantial portions of the Software. -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR //IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, //FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE //AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER @@ -53,7 +53,7 @@ namespace BizHawk.Emulation.DiscSystem /// private static void Prep_EDC() { - //14.3 of yellowbook specifies EDC crc as P(x) = (x^16 + x^15 + x^2 + 1) . (x^16 + x^2 + x + 1) + //14.3 of yellowbook specifies EDC crc as P(x) = (x^16 + x^15 + x^2 + 1) . (x^16 + x^2 + x + 1) //confirmation at http://cdmagediscussion.yuku.com/topic/742/EDC-calculation //int Pa = 0x18005; //int Pb = 0x10007; @@ -69,7 +69,7 @@ namespace BizHawk.Emulation.DiscSystem //uint edc_poly = (uint)Px; const uint edc_poly = 0x8001801B; - //generate the CRC table + //generate the CRC table uint reverse_edc_poly = BitReverse.Reverse32(edc_poly); for (uint i = 0; i < 256; ++i) { @@ -86,11 +86,11 @@ namespace BizHawk.Emulation.DiscSystem } /// - /// calculate math lookup tables for ECC calculations. + /// calculate math lookup tables for ECC calculations. /// private static void Prep_ECC() { - //create a table implementing f(i) = i*2 + //create a table implementing f(i) = i*2 for (int i = 0; i < 256; i++) { int n = i * 2; @@ -200,7 +200,7 @@ namespace BizHawk.Emulation.DiscSystem /// /// calculates EDC checksum for the range of data provided - /// see section 14.3 of yellowbook + /// see section 14.3 of yellowbook /// public static uint EDC_Calc(byte[] data, int offset, int length) { diff --git a/src/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_DiscStructure_From_DiscTOC_Job.cs b/src/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_DiscStructure_From_DiscTOC_Job.cs index 091a932c18..54b0af5ba6 100644 --- a/src/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_DiscStructure_From_DiscTOC_Job.cs +++ b/src/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_DiscStructure_From_DiscTOC_Job.cs @@ -76,7 +76,7 @@ namespace BizHawk.Emulation.DiscSystem LBA = TOCRaw.LeadoutLBA }); - //link track list + //link track list for (int i = 0; i < session.Tracks.Count - 1; i++) { session.Tracks[i].NextTrack = session.Tracks[i + 1]; diff --git a/src/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_DiscTOC_From_RawTOCEntries_Job.cs b/src/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_DiscTOC_From_RawTOCEntries_Job.cs index ab8f6320b1..5ed558c22c 100644 --- a/src/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_DiscTOC_From_RawTOCEntries_Job.cs +++ b/src/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_DiscTOC_From_RawTOCEntries_Job.cs @@ -83,7 +83,7 @@ namespace BizHawk.Emulation.DiscSystem if (ret.LastRecordedTrackNumber == -1) { ret.LastRecordedTrackNumber = maxFoundTrack; } if (ret.Session1Format == SessionFormat.None) ret.Session1Format = SessionFormat.Type00_CDROM_CDDA; - //if (!ret.LeadoutTimestamp.Valid) { + //if (!ret.LeadoutTimestamp.Valid) { // //we're DOOMED. we cant know the length of the last track without this.... //} job.Result = ret; diff --git a/src/BizHawk.Emulation.DiscSystem/Internal/SectorSynth.cs b/src/BizHawk.Emulation.DiscSystem/Internal/SectorSynth.cs index c98ed0ea70..31e31ffcd9 100644 --- a/src/BizHawk.Emulation.DiscSystem/Internal/SectorSynth.cs +++ b/src/BizHawk.Emulation.DiscSystem/Internal/SectorSynth.cs @@ -235,10 +235,8 @@ namespace BizHawk.Emulation.DiscSystem EControlQ control = ses.LeadoutTrack.Control; //ehhh? CDI? - //if(toc.tracks[toc.last_track].valid) - // control |= toc.tracks[toc.last_track].control & 0x4; - //else if(toc.disc_type == DISC_TYPE_CD_I) - // control |= 0x4; +// if(toc.tracks[toc.last_track].valid) control |= toc.tracks[toc.last_track].control & 0x4; +// else if(toc.disc_type == DISC_TYPE_CD_I) control |= 0x4; control |= (EControlQ)(((int)ses.LastInformationTrack.Control) & 4); SubchannelQ sq = new SubchannelQ();