diff --git a/ExternalProjects/AnalyzersCommon/RoslynUtils.cs b/ExternalProjects/AnalyzersCommon/RoslynUtils.cs index 55827261dc..ae51b4353c 100644 --- a/ExternalProjects/AnalyzersCommon/RoslynUtils.cs +++ b/ExternalProjects/AnalyzersCommon/RoslynUtils.cs @@ -67,7 +67,7 @@ public static class RoslynUtils "||" => WellKnownMemberNames.LogicalOrOperatorName, "~" => WellKnownMemberNames.OnesComplementOperatorName, // ...and some operators only exist in VB.NET (dw, you're not missing anything) - _ => throw new ArgumentException(paramName: nameof(ods), message: "pretend this is a BHI6660 unexpected token in AST (in this case, a new kind of operator was added to C#)") + _ => throw new ArgumentException(paramName: nameof(ods), message: "pretend this is a BHI6660 unexpected token in AST (in this case, a new kind of operator was added to C#)"), }; private static ITypeSymbol? GetThrownExceptionType(this SemanticModel model, ExpressionSyntax exprSyn) diff --git a/ExternalProjects/BizHawk.Analyzer/FirstOrDefaultOnStructAnalyzer.cs b/ExternalProjects/BizHawk.Analyzer/FirstOrDefaultOnStructAnalyzer.cs index f27ae85ce3..f2dca2022a 100644 --- a/ExternalProjects/BizHawk.Analyzer/FirstOrDefaultOnStructAnalyzer.cs +++ b/ExternalProjects/BizHawk.Analyzer/FirstOrDefaultOnStructAnalyzer.cs @@ -46,7 +46,7 @@ public sealed class FirstOrDefaultOnStructAnalyzer : DiagnosticAnalyzer { INamedTypeSymbol nts => nts.TypeArguments[0], IArrayTypeSymbol ats => ats.ElementType, - _ => throw HawkSourceAnalyzer.ReportWTF(receiverExpr, oac, message: $"[{nameof(FirstOrDefaultOnStructAnalyzer)}] receiver parameter's effective type was of an unexpected kind (neither class/struct nor array): {receiverExprType.GetType().FullName}") + _ => throw HawkSourceAnalyzer.ReportWTF(receiverExpr, oac, message: $"[{nameof(FirstOrDefaultOnStructAnalyzer)}] receiver parameter's effective type was of an unexpected kind (neither class/struct nor array): {receiverExprType.GetType().FullName}"), }; if (collectionElemType.IsValueType) DiagUseFirstOrNull.ReportAt(operation.LocWithoutReceiver(), oac); }, diff --git a/ExternalProjects/BizHawk.Analyzer/HawkSourceAnalyzer.cs b/ExternalProjects/BizHawk.Analyzer/HawkSourceAnalyzer.cs index 9d3d5dbb59..7b53834a93 100644 --- a/ExternalProjects/BizHawk.Analyzer/HawkSourceAnalyzer.cs +++ b/ExternalProjects/BizHawk.Analyzer/HawkSourceAnalyzer.cs @@ -163,7 +163,7 @@ public class HawkSourceAnalyzer : DiagnosticAnalyzer { ERR_MSG_LIST_EXPR_END => location.SourceSpan.Slice(start: location.SourceSpan.Length - 1), ERR_MSG_LIST_EXPR_START => location.SourceSpan.Slice(start: 0, length: 1), - _ => null + _ => null, }; if (slice is not null) location = Location.Create(location.SourceTree!, slice.Value); DiagListExprSpacing.ReportAt(location, snac, message); diff --git a/ExternalProjects/BizHawk.SrcGen.ReflectionCache/ReflectionCacheGenerator.cs b/ExternalProjects/BizHawk.SrcGen.ReflectionCache/ReflectionCacheGenerator.cs index de2c2a1403..1974796e43 100644 --- a/ExternalProjects/BizHawk.SrcGen.ReflectionCache/ReflectionCacheGenerator.cs +++ b/ExternalProjects/BizHawk.SrcGen.ReflectionCache/ReflectionCacheGenerator.cs @@ -39,7 +39,7 @@ public sealed class ReflectionCacheGenerator : ISourceGenerator { SimpleNameSyntax simple => simple.Identifier.ValueText, QualifiedNameSyntax qual => $"{Ser(qual.Left)}.{Ser(qual.Right)}", - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; if (_namespace != null || syntaxNode is not NamespaceDeclarationSyntax syn) return; var newNS = Ser(syn.Name); diff --git a/src/BizHawk.Bizware.Audio/SDL2WavStream.cs b/src/BizHawk.Bizware.Audio/SDL2WavStream.cs index 9b4da0ddc8..6110ab5918 100644 --- a/src/BizHawk.Bizware.Audio/SDL2WavStream.cs +++ b/src/BizHawk.Bizware.Audio/SDL2WavStream.cs @@ -119,7 +119,7 @@ namespace BizHawk.Bizware.Audio SeekOrigin.Begin => offset, SeekOrigin.Current => _pos + offset, SeekOrigin.End => _len + offset, - _ => offset + _ => offset, }; Position = newpos; diff --git a/src/BizHawk.Bizware.Graphics.Controls/GraphicsControlFactory.cs b/src/BizHawk.Bizware.Graphics.Controls/GraphicsControlFactory.cs index 54214a041f..a0360cfcbd 100644 --- a/src/BizHawk.Bizware.Graphics.Controls/GraphicsControlFactory.cs +++ b/src/BizHawk.Bizware.Graphics.Controls/GraphicsControlFactory.cs @@ -12,7 +12,7 @@ namespace BizHawk.Bizware.Graphics.Controls IGL_OpenGL openGL => new OpenGLControl(openGL.InitGLState), IGL_D3D11 d3d11 => new D3D11Control(d3d11.CreateSwapChain), IGL_GDIPlus gdiPlus => new GDIPlusControl(gdiPlus.CreateControlRenderTarget), - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; // IGLs need the window handle in order to do things, so best create the control immediately diff --git a/src/BizHawk.Bizware.Graphics/D3D11/D3D11Pipeline.cs b/src/BizHawk.Bizware.Graphics/D3D11/D3D11Pipeline.cs index db9cacca52..ebfc1b57b9 100644 --- a/src/BizHawk.Bizware.Graphics/D3D11/D3D11Pipeline.cs +++ b/src/BizHawk.Bizware.Graphics/D3D11/D3D11Pipeline.cs @@ -95,7 +95,7 @@ namespace BizHawk.Bizware.Graphics AttribUsage.Position => "POSITION", AttribUsage.Color0 => "COLOR", AttribUsage.Texcoord0 or AttribUsage.Texcoord1 => "TEXCOORD", - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; var format = item.Components switch @@ -104,7 +104,7 @@ namespace BizHawk.Bizware.Graphics 2 => Format.R32G32_Float, 3 => Format.R32G32B32_Float, 4 => item.Integer ? Format.B8G8R8A8_UNorm : Format.R32G32B32A32_Float, - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; _inputElements[i] = new(semanticName, item.Usage == AttribUsage.Texcoord1 ? 1 : 0, format, item.Offset, 0); diff --git a/src/BizHawk.Client.Common/Api/Classes/EmulationApi.cs b/src/BizHawk.Client.Common/Api/Classes/EmulationApi.cs index 9d41bb6888..b65f421bc3 100644 --- a/src/BizHawk.Client.Common/Api/Classes/EmulationApi.cs +++ b/src/BizHawk.Client.Common/Api/Classes/EmulationApi.cs @@ -203,7 +203,7 @@ namespace BizHawk.Client.Common PCEngine pce => pce.GetSettings(), QuickNES quickNes => quickNes.GetSettings(), SMS sms => sms.GetSettings(), - _ => null + _ => null, }; public PutSettingsDirtyBits PutSettings(object settings) => Emulator switch // (select) cores A-Z by value of `CoreAttribute.CoreName` @@ -216,7 +216,7 @@ namespace BizHawk.Client.Common PCEngine pce => pce.PutSettings((PCEngine.PCESettings) settings), QuickNES quickNes => quickNes.PutSettings((QuickNES.QuickNESSettings) settings), SMS sms => sms.PutSettings((SMS.SmsSettings) settings), - _ => PutSettingsDirtyBits.None + _ => PutSettingsDirtyBits.None, }; public void SetRenderPlanes(params bool[] args) diff --git a/src/BizHawk.Client.Common/Api/Classes/GuiApi.cs b/src/BizHawk.Client.Common/Api/Classes/GuiApi.cs index dd5f2343c8..11a73b39cf 100644 --- a/src/BizHawk.Client.Common/Api/Classes/GuiApi.cs +++ b/src/BizHawk.Client.Common/Api/Classes/GuiApi.cs @@ -413,7 +413,7 @@ namespace BizHawk.Client.Common "italic" => FontStyle.Italic, "strikethrough" => FontStyle.Strikeout, "underline" => FontStyle.Underline, - _ => FontStyle.Regular + _ => FontStyle.Regular, }; using var g = Graphics.FromImage(_nullGraphicsBitmap); @@ -540,7 +540,7 @@ namespace BizHawk.Client.Common "bottomleft" => 2, "3" => 3, "bottomright" => 3, - _ => default + _ => default, }; } else diff --git a/src/BizHawk.Client.Common/Api/Classes/MemoryApi.cs b/src/BizHawk.Client.Common/Api/Classes/MemoryApi.cs index 8c6093933e..be318cee45 100644 --- a/src/BizHawk.Client.Common/Api/Classes/MemoryApi.cs +++ b/src/BizHawk.Client.Common/Api/Classes/MemoryApi.cs @@ -135,7 +135,7 @@ namespace BizHawk.Client.Common 2 => d.PeekUshort(addr, _isBigEndian), 3 => _isBigEndian ? ReadUnsignedBig(addr, 3, domain) : ReadUnsignedLittle(addr, 3, domain), 4 => d.PeekUint(addr, _isBigEndian), - _ => 0 + _ => 0, }; } diff --git a/src/BizHawk.Client.Common/Api/DisplaySurfaceID.cs b/src/BizHawk.Client.Common/Api/DisplaySurfaceID.cs index e0b69803cd..24a1e29e24 100644 --- a/src/BizHawk.Client.Common/Api/DisplaySurfaceID.cs +++ b/src/BizHawk.Client.Common/Api/DisplaySurfaceID.cs @@ -22,7 +22,7 @@ namespace BizHawk.Client.Common "emu" => DisplaySurfaceID.EmuCore, "emucore" => DisplaySurfaceID.EmuCore, "native" => DisplaySurfaceID.Client, - _ => throw new ArgumentException(message: $"{str} is not the name of a display surface", paramName: nameof(str)) + _ => throw new ArgumentException(paramName: nameof(str), message: $"{str} is not the name of a display surface"), }; #pragma warning restore BHI1005 @@ -30,7 +30,7 @@ namespace BizHawk.Client.Common { DisplaySurfaceID.EmuCore => "emucore", DisplaySurfaceID.Client => "client", - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; } } diff --git a/src/BizHawk.Client.Common/Api/HttpCommunication.cs b/src/BizHawk.Client.Common/Api/HttpCommunication.cs index 665cc90380..177f1ecd70 100644 --- a/src/BizHawk.Client.Common/Api/HttpCommunication.cs +++ b/src/BizHawk.Client.Common/Api/HttpCommunication.cs @@ -15,7 +15,7 @@ namespace BizHawk.Client.Common { MIME_FORM_URLENC => new FormUrlEncodedContent([ new("payload", payload) ]), #pragma warning disable BHI1005 // exception type - _ => throw new NotImplementedException() + _ => throw new NotImplementedException(), #pragma warning restore BHI1005 }; diff --git a/src/BizHawk.Client.Common/DisplayManager/DisplayManagerBase.cs b/src/BizHawk.Client.Common/DisplayManager/DisplayManagerBase.cs index fb21a2e8a4..45e4d372cc 100644 --- a/src/BizHawk.Client.Common/DisplayManager/DisplayManagerBase.cs +++ b/src/BizHawk.Client.Common/DisplayManager/DisplayManagerBase.cs @@ -365,7 +365,7 @@ namespace BizHawk.Client.Common { 1 => FinalPresentation.eFilterOption.Bilinear, 2 => FinalPresentation.eFilterOption.Bicubic, - _ => FinalPresentation.eFilterOption.None + _ => FinalPresentation.eFilterOption.None, }; // if bicubic is selected and unavailable, don't use it. use bilinear instead I guess @@ -488,7 +488,7 @@ namespace BizHawk.Client.Common { NDS nds => new ScreenControlNDS(nds), Encore encore => new ScreenControl3DS(encore), - _ => null + _ => null, }; } diff --git a/src/BizHawk.Client.Common/DisplayManager/FilterManager.cs b/src/BizHawk.Client.Common/DisplayManager/FilterManager.cs index 8fbc1cfa79..7242d03508 100644 --- a/src/BizHawk.Client.Common/DisplayManager/FilterManager.cs +++ b/src/BizHawk.Client.Common/DisplayManager/FilterManager.cs @@ -136,7 +136,7 @@ namespace BizHawk.Client.Common.FilterManager ProgramStepType.Run => $"Run {(int) Args} ({Comment})", ProgramStepType.NewTarget => $"NewTarget {(Size) Args}", ProgramStepType.FinalTarget => "FinalTarget", - _ => null + _ => null, }; } } diff --git a/src/BizHawk.Client.Common/DisplayManager/Filters/Retro.cs b/src/BizHawk.Client.Common/DisplayManager/Filters/Retro.cs index ff9d8c26ee..3f0eef1ab7 100644 --- a/src/BizHawk.Client.Common/DisplayManager/Filters/Retro.cs +++ b/src/BizHawk.Client.Common/DisplayManager/Filters/Retro.cs @@ -67,7 +67,7 @@ namespace BizHawk.Client.Common.Filters { EDispMethod.OpenGL => Path.ChangeExtension(path, ".glsl"), EDispMethod.D3D11 => Path.ChangeExtension(path, ".hlsl"), - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; } } @@ -257,7 +257,7 @@ namespace BizHawk.Client.Common.Filters { "true" => true, "false" => false, - _ => throw new InvalidOperationException("Unparsable bool in CGP file content") + _ => throw new InvalidOperationException("Unparsable bool in CGP file content"), }; } } @@ -291,14 +291,14 @@ namespace BizHawk.Client.Common.Filters { RetroShaderPreset.ScaleType.Absolute => (int)_sp.Scale.X, RetroShaderPreset.ScaleType.Source => (int)(inSize.Width * _sp.Scale.X), - _ => _outputSize.Width + _ => _outputSize.Width, }; _outputSize.Height = _sp.ScaleTypeY switch { RetroShaderPreset.ScaleType.Absolute => (int)_sp.Scale.Y, RetroShaderPreset.ScaleType.Source => (int)(inSize.Height * _sp.Scale.Y), - _ => _outputSize.Height + _ => _outputSize.Height, }; DeclareOutput(new SurfaceState(new(_outputSize), SurfaceDisposition.RenderTarget)); @@ -318,14 +318,14 @@ namespace BizHawk.Client.Common.Filters { RetroShaderPreset.ScaleType.Absolute => (int)_sp.Scale.X, RetroShaderPreset.ScaleType.Source => (int)(inSize.Width * _sp.Scale.X), - _ => outsize.Width + _ => outsize.Width, }; outsize.Height = _sp.ScaleTypeY switch { RetroShaderPreset.ScaleType.Absolute => (int)_sp.Scale.Y, RetroShaderPreset.ScaleType.Source => (int)(inSize.Height * _sp.Scale.Y), - _ => outsize.Height + _ => outsize.Height, }; return outsize; diff --git a/src/BizHawk.Client.Common/OpenAdvanced.cs b/src/BizHawk.Client.Common/OpenAdvanced.cs index a33b5cb1de..e76ec09671 100644 --- a/src/BizHawk.Client.Common/OpenAdvanced.cs +++ b/src/BizHawk.Client.Common/OpenAdvanced.cs @@ -58,7 +58,7 @@ namespace BizHawk.Client.Common OpenAdvancedTypes.Libretro => new OpenAdvanced_Libretro(), OpenAdvancedTypes.LibretroNoGame => new OpenAdvanced_LibretroNoGame(), OpenAdvancedTypes.MAME => new OpenAdvanced_MAME(), - _ => null + _ => null, }; if (ioa == null) diff --git a/src/BizHawk.Client.Common/cheats/GameSharkDecoder.cs b/src/BizHawk.Client.Common/cheats/GameSharkDecoder.cs index 0e93265426..68cea796cb 100644 --- a/src/BizHawk.Client.Common/cheats/GameSharkDecoder.cs +++ b/src/BizHawk.Client.Common/cheats/GameSharkDecoder.cs @@ -28,7 +28,7 @@ namespace BizHawk.Client.Common.cheats VSystemID.Raw.SAT => Saturn(code), VSystemID.Raw.SMS => Sms(code), VSystemID.Raw.SNES => Snes(code), - _ => new InvalidCheatCode("Cheat codes not currently supported on this system") + _ => new InvalidCheatCode("Cheat codes not currently supported on this system"), }; } @@ -45,7 +45,7 @@ namespace BizHawk.Client.Common.cheats #if false VSystemID.Raw.SAT => "Work Ram High", // Work RAM High may be incorrect? #endif - _ => null + _ => null, }; diff --git a/src/BizHawk.Client.Common/cheats/GbaGameSharkDecoder.cs b/src/BizHawk.Client.Common/cheats/GbaGameSharkDecoder.cs index 031bc12019..6ca3a8b5f5 100644 --- a/src/BizHawk.Client.Common/cheats/GbaGameSharkDecoder.cs +++ b/src/BizHawk.Client.Common/cheats/GbaGameSharkDecoder.cs @@ -70,7 +70,7 @@ namespace BizHawk.Client.Common.cheats '2' => WatchSize.DWord, '3' => WatchSize.DWord, '6' => WatchSize.Word, - _ => WatchSize.Byte + _ => WatchSize.Byte, } }; @@ -81,7 +81,7 @@ namespace BizHawk.Client.Common.cheats { WatchSize.Byte => result.Value & 0xFF, WatchSize.Word => result.Value & 0xFFFF, - _ => result.Value + _ => result.Value, }; #endif diff --git a/src/BizHawk.Client.Common/cheats/GenesisActionReplayDecoder.cs b/src/BizHawk.Client.Common/cheats/GenesisActionReplayDecoder.cs index 5653e49188..09dea46e6b 100644 --- a/src/BizHawk.Client.Common/cheats/GenesisActionReplayDecoder.cs +++ b/src/BizHawk.Client.Common/cheats/GenesisActionReplayDecoder.cs @@ -45,8 +45,7 @@ namespace BizHawk.Client.Common.cheats Value = int.Parse(parseString.Remove(0, 5), NumberStyles.HexNumber), Size = WatchSize.Word, }, - _ => new InvalidCheatCode( - "Action Replay/Pro Action Replay Codes need to be either 9 or 11 characters.") + _ => new InvalidCheatCode("Action Replay/Pro Action Replay Codes need to be either 9 or 11 characters."), }; } } diff --git a/src/BizHawk.Client.Common/cheats/PsxGameSharkDecoder.cs b/src/BizHawk.Client.Common/cheats/PsxGameSharkDecoder.cs index d5dbfd2554..1cb61c9901 100644 --- a/src/BizHawk.Client.Common/cheats/PsxGameSharkDecoder.cs +++ b/src/BizHawk.Client.Common/cheats/PsxGameSharkDecoder.cs @@ -46,7 +46,7 @@ namespace BizHawk.Client.Common.cheats "E1" => WatchSize.Byte, "E2" => WatchSize.Byte, "E3" => WatchSize.Byte, - _ => WatchSize.Byte + _ => WatchSize.Byte, }; var s = code.Remove(0, 2); diff --git a/src/BizHawk.Client.Common/config/PathEntry.cs b/src/BizHawk.Client.Common/config/PathEntry.cs index 2759c56fa1..8abf50418b 100644 --- a/src/BizHawk.Client.Common/config/PathEntry.cs +++ b/src/BizHawk.Client.Common/config/PathEntry.cs @@ -56,7 +56,7 @@ namespace BizHawk.Client.Common // potentially applicable for future cores (Dolphin?) "User" => 0x40, - _ => 0x50 + _ => 0x50, }; Path = path; System = system; diff --git a/src/BizHawk.Client.Common/input/DistinctKeyNameOverrides.cs b/src/BizHawk.Client.Common/input/DistinctKeyNameOverrides.cs index da85486454..7b39a5c5a2 100644 --- a/src/BizHawk.Client.Common/input/DistinctKeyNameOverrides.cs +++ b/src/BizHawk.Client.Common/input/DistinctKeyNameOverrides.cs @@ -53,7 +53,7 @@ namespace BizHawk.Client.Common DistinctKey.OemQuotes => "Apostrophe", DistinctKey.OemBackslash => "OEM102", DistinctKey.NumPadEnter => "KeypadEnter", - _ => k.ToString() + _ => k.ToString(), }; } } \ No newline at end of file diff --git a/src/BizHawk.Client.Common/lua/CommonLibs/SQLiteLuaLibrary.cs b/src/BizHawk.Client.Common/lua/CommonLibs/SQLiteLuaLibrary.cs index be2d229494..958ed59c53 100644 --- a/src/BizHawk.Client.Common/lua/CommonLibs/SQLiteLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/CommonLibs/SQLiteLuaLibrary.cs @@ -37,7 +37,7 @@ namespace BizHawk.Client.Common return result switch { Dictionary dict => _th.DictToTable(dict), - _ => result + _ => result, }; } } diff --git a/src/BizHawk.Client.Common/lua/LuaHelperLibs/NESLuaLibrary.cs b/src/BizHawk.Client.Common/lua/LuaHelperLibs/NESLuaLibrary.cs index e6ca79882a..ed9ee963db 100644 --- a/src/BizHawk.Client.Common/lua/LuaHelperLibs/NESLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/LuaHelperLibs/NESLuaLibrary.cs @@ -33,7 +33,7 @@ namespace BizHawk.Client.Common { NES.NESSettings nhs => nhs.AllowMoreThanEightSprites, QuickNES.QuickNESSettings qns => qns.NumSprites != 8, - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; /// loaded core is not NESHawk or QuickNes @@ -44,7 +44,7 @@ namespace BizHawk.Client.Common { NES.NESSettings nhs => pal ? nhs.PAL_BottomLine : nhs.NTSC_BottomLine, QuickNES.QuickNESSettings qns => qns.ClipTopAndBottom ? 231 : 239, - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; /// loaded core is not NESHawk or QuickNes @@ -55,7 +55,7 @@ namespace BizHawk.Client.Common { NES.NESSettings nhs => nhs.ClipLeftAndRight, QuickNES.QuickNESSettings qns => qns.ClipLeftAndRight, - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; /// loaded core is not NESHawk or QuickNes @@ -66,7 +66,7 @@ namespace BizHawk.Client.Common { NES.NESSettings nhs => nhs.DispBackground, QuickNES.QuickNESSettings => true, - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; /// loaded core is not NESHawk or QuickNes @@ -77,7 +77,7 @@ namespace BizHawk.Client.Common { NES.NESSettings nhs => nhs.DispSprites, QuickNES.QuickNESSettings qns => qns.NumSprites > 0, - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; /// loaded core is not NESHawk or QuickNes @@ -88,7 +88,7 @@ namespace BizHawk.Client.Common { NES.NESSettings nhs => pal ? nhs.PAL_TopLine : nhs.NTSC_TopLine, QuickNES.QuickNESSettings qns => qns.ClipTopAndBottom ? 8 : 0, - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; /// loaded core is not NESHawk or QuickNes diff --git a/src/BizHawk.Client.Common/movie/import/LsmvImport.cs b/src/BizHawk.Client.Common/movie/import/LsmvImport.cs index ffb3caae3d..cc70b689fe 100644 --- a/src/BizHawk.Client.Common/movie/import/LsmvImport.cs +++ b/src/BizHawk.Client.Common/movie/import/LsmvImport.cs @@ -61,7 +61,7 @@ namespace BizHawk.Client.Common.movie.import "gamepad16" => BsnesApi.BSNES_PORT1_INPUT_DEVICE.ExtendedGamepad, "multitap" => BsnesApi.BSNES_PORT1_INPUT_DEVICE.SuperMultitap, "multitap16" => BsnesApi.BSNES_PORT1_INPUT_DEVICE.Payload, - _ => BsnesApi.BSNES_PORT1_INPUT_DEVICE.Gamepad + _ => BsnesApi.BSNES_PORT1_INPUT_DEVICE.Gamepad, }; } if ((portEntry = zip.GetEntry("port2")) != null) @@ -79,7 +79,7 @@ namespace BizHawk.Client.Common.movie.import "superscope" => BsnesApi.BSNES_INPUT_DEVICE.SuperScope, "justifier" => BsnesApi.BSNES_INPUT_DEVICE.Justifier, "justifiers" => BsnesApi.BSNES_INPUT_DEVICE.Justifiers, - _ => BsnesApi.BSNES_INPUT_DEVICE.Gamepad + _ => BsnesApi.BSNES_INPUT_DEVICE.Gamepad, }; } diff --git a/src/BizHawk.Client.Common/movie/import/SmvImport.cs b/src/BizHawk.Client.Common/movie/import/SmvImport.cs index d265c54438..500770140b 100644 --- a/src/BizHawk.Client.Common/movie/import/SmvImport.cs +++ b/src/BizHawk.Client.Common/movie/import/SmvImport.cs @@ -35,7 +35,7 @@ namespace BizHawk.Client.Common.movie.import 1 => "1.43", 4 => "1.51", 5 => "1.52", - _ => "Unknown" + _ => "Unknown", }; Result.Movie.Comments.Add($"{EmulationOrigin} Snes9x version {version}"); diff --git a/src/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs b/src/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs index dcc0cee8ad..0ecdab859a 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs @@ -42,7 +42,7 @@ namespace BizHawk.Client.Common { null => false, TasMovieMarker marker => Frame == marker.Frame, - _ => false + _ => false, }; } diff --git a/src/BizHawk.Client.Common/tools/Cheat.cs b/src/BizHawk.Client.Common/tools/Cheat.cs index 4a1cf89e14..a9baa30bd4 100644 --- a/src/BizHawk.Client.Common/tools/Cheat.cs +++ b/src/BizHawk.Client.Common/tools/Cheat.cs @@ -98,7 +98,7 @@ namespace BizHawk.Client.Common WatchSize.Word => ((WordWatch) _watch).FormatValue((ushort)_val), WatchSize.DWord => ((DWordWatch) _watch).FormatValue((uint)_val), WatchSize.Separator => "", - _ => "" + _ => string.Empty, }; public string CompareStr @@ -113,7 +113,7 @@ namespace BizHawk.Client.Common WatchSize.Word => ((WordWatch) _watch).FormatValue((ushort)_compare.Value), WatchSize.DWord => ((DWordWatch) _watch).FormatValue((uint)_compare.Value), WatchSize.Separator => "", - _ => "" + _ => string.Empty, }; } diff --git a/src/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs b/src/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs index ae8678a4bc..78e47dd261 100644 --- a/src/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs +++ b/src/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs @@ -129,7 +129,7 @@ namespace BizHawk.Client.Common.RamSearchEngine Compare.SpecificAddress => CompareSpecificAddress(_watchList).ToArray(), Compare.Changes => CompareChanges(_watchList).ToArray(), Compare.Difference => CompareDifference(_watchList).ToArray(), - _ => ComparePrevious(_watchList).ToArray() + _ => ComparePrevious(_watchList).ToArray(), }; if (_settings.PreviousType == PreviousType.LastSearch) @@ -158,7 +158,7 @@ namespace BizHawk.Client.Common.RamSearchEngine Compare.SpecificAddress => !CompareSpecificAddress(listOfOne).Any(), Compare.Changes => !CompareChanges(listOfOne).Any(), Compare.Difference => !CompareDifference(listOfOne).Any(), - _ => !ComparePrevious(listOfOne).Any() + _ => !ComparePrevious(listOfOne).Any(), }; } @@ -273,7 +273,7 @@ namespace BizHawk.Client.Common.RamSearchEngine WatchSize.Byte => addresses.ToBytes(_settings), WatchSize.Word => addresses.ToWords(_settings), WatchSize.DWord => addresses.ToDWords(_settings), - _ => addresses.ToBytes(_settings) + _ => addresses.ToBytes(_settings), }; _watchList = (append ? _watchList.Concat(list) : list).ToArray(); @@ -291,7 +291,7 @@ namespace BizHawk.Client.Common.RamSearchEngine WatchSize.Word => addresses.Where(static address => address % 2 == 0).ToWords(_settings).ToArray(), WatchSize.DWord when _settings.CheckMisAligned => addresses.ToDWords(_settings).ToArray(), WatchSize.DWord => addresses.Where(static address => address % 4 == 0).ToDWords(_settings).ToArray(), - _ => _watchList + _ => _watchList, }; _settings.Size = size; @@ -639,7 +639,7 @@ namespace BizHawk.Client.Common.RamSearchEngine WatchSize.Byte => (sbyte) val, WatchSize.Word => (short) val, WatchSize.DWord => (int) val, - _ => (sbyte) val + _ => (sbyte) val, }; } @@ -655,7 +655,7 @@ namespace BizHawk.Client.Common.RamSearchEngine WatchSize.Byte => MiniByteWatch.GetByte(watch.Address, Domain), WatchSize.Word => MiniWordWatch.GetUshort(watch.Address, Domain, _settings.BigEndian), WatchSize.DWord => MiniDWordWatch.GetUint(watch.Address, Domain, _settings.BigEndian), - _ => MiniByteWatch.GetByte(watch.Address, Domain) + _ => MiniByteWatch.GetByte(watch.Address, Domain), }; } @@ -665,7 +665,7 @@ namespace BizHawk.Client.Common.RamSearchEngine { SearchMode.Detailed => true, SearchMode.Fast => (compareType != Compare.Changes), - _ => true + _ => true, }; } } diff --git a/src/BizHawk.Client.Common/tools/Watch/ByteWatch.cs b/src/BizHawk.Client.Common/tools/Watch/ByteWatch.cs index 4e46d77e93..5aacf977ae 100644 --- a/src/BizHawk.Client.Common/tools/Watch/ByteWatch.cs +++ b/src/BizHawk.Client.Common/tools/Watch/ByteWatch.cs @@ -75,7 +75,7 @@ namespace BizHawk.Client.Common WatchDisplayType.Signed => (byte)sbyte.Parse(value), WatchDisplayType.Hex => byte.Parse(value, NumberStyles.HexNumber), WatchDisplayType.Binary => Convert.ToByte(value, 2), - _ => 0 + _ => 0, }; PokeByte(val); @@ -128,7 +128,7 @@ namespace BizHawk.Client.Common WatchDisplayType.Signed => ((sbyte) val).ToString(), WatchDisplayType.Hex => $"{val:X2}", WatchDisplayType.Binary => Convert.ToString(val, 2).PadLeft(8, '0').Insert(4, " "), - _ => val.ToString() + _ => val.ToString(), }; } diff --git a/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs b/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs index 0f42334286..d9fd42396e 100644 --- a/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs +++ b/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs @@ -82,7 +82,7 @@ namespace BizHawk.Client.Common WatchDisplayType.FixedPoint_16_16 => (uint)(double.Parse(value, NumberFormatInfo.InvariantInfo) * 65536.0), WatchDisplayType.Float => NumberExtensions.ReinterpretAsUInt32(float.Parse(value, NumberFormatInfo.InvariantInfo)), WatchDisplayType.Binary => Convert.ToUInt32(value, 2), - _ => 0 + _ => 0, }; PokeDWord(val); @@ -154,7 +154,7 @@ namespace BizHawk.Client.Common WatchDisplayType.FixedPoint_16_16 => ((int)val / 65536.0).ToString("0.######", NumberFormatInfo.InvariantInfo), WatchDisplayType.Float => FormatFloat(), WatchDisplayType.Binary => FormatBinary(), - _ => val.ToString() + _ => val.ToString(), }; } diff --git a/src/BizHawk.Client.Common/tools/Watch/Watch.cs b/src/BizHawk.Client.Common/tools/Watch/Watch.cs index 97e9606096..f1f0d24e35 100644 --- a/src/BizHawk.Client.Common/tools/Watch/Watch.cs +++ b/src/BizHawk.Client.Common/tools/Watch/Watch.cs @@ -137,7 +137,7 @@ namespace BizHawk.Client.Common WatchSize.Byte => new ByteWatch(domain, address, type, bigEndian, note, (byte) value, (byte) prev, changeCount), WatchSize.Word => new WordWatch(domain, address, type, bigEndian, note, (ushort) value, (ushort) prev, changeCount), WatchSize.DWord => new DWordWatch(domain, address, type, bigEndian, note, (uint) value, (uint) prev, changeCount), - _ => SeparatorWatch.NewSeparatorWatch(note) + _ => SeparatorWatch.NewSeparatorWatch(note), }; } @@ -556,7 +556,7 @@ namespace BizHawk.Client.Common WatchDisplayType.FixedPoint_12_4 => "Fixed Point 12.4", WatchDisplayType.FixedPoint_20_12 => "Fixed Point 20.12", WatchDisplayType.FixedPoint_16_16 => "Fixed Point 16.16", - _ => type.ToString() + _ => type.ToString(), }; } @@ -567,7 +567,7 @@ namespace BizHawk.Client.Common "Fixed Point 12.4" => WatchDisplayType.FixedPoint_12_4, "Fixed Point 20.12" => WatchDisplayType.FixedPoint_20_12, "Fixed Point 16.16" => WatchDisplayType.FixedPoint_16_16, - _ => (WatchDisplayType) Enum.Parse(typeof(WatchDisplayType), name) + _ => (WatchDisplayType) Enum.Parse(typeof(WatchDisplayType), name), }; } @@ -581,7 +581,7 @@ namespace BizHawk.Client.Common WatchSize.Byte => 'b', WatchSize.Word => 'w', WatchSize.DWord => 'd', - _ => 'S' + _ => 'S', }; } } @@ -594,7 +594,7 @@ namespace BizHawk.Client.Common 'b' => WatchSize.Byte, 'w' => WatchSize.Word, 'd' => WatchSize.DWord, - _ => WatchSize.Separator + _ => WatchSize.Separator, }; } @@ -613,7 +613,7 @@ namespace BizHawk.Client.Common WatchDisplayType.FixedPoint_20_12 => '2', WatchDisplayType.FixedPoint_16_16 => '3', WatchDisplayType.Float => 'f', - _ => '_' + _ => '_', }; } } @@ -631,7 +631,7 @@ namespace BizHawk.Client.Common '2' => WatchDisplayType.FixedPoint_20_12, '3' => WatchDisplayType.FixedPoint_16_16, 'f' => WatchDisplayType.Float, - _ => WatchDisplayType.Separator + _ => WatchDisplayType.Separator, }; } diff --git a/src/BizHawk.Client.Common/tools/Watch/WordWatch.cs b/src/BizHawk.Client.Common/tools/Watch/WordWatch.cs index 15d6630813..f5fd8c0ae9 100644 --- a/src/BizHawk.Client.Common/tools/Watch/WordWatch.cs +++ b/src/BizHawk.Client.Common/tools/Watch/WordWatch.cs @@ -74,7 +74,7 @@ namespace BizHawk.Client.Common WatchDisplayType.Hex => ushort.Parse(value, NumberStyles.HexNumber), WatchDisplayType.Binary => Convert.ToUInt16(value, 2), WatchDisplayType.FixedPoint_12_4 => (ushort)(double.Parse(value, NumberFormatInfo.InvariantInfo) * 16.0), - _ => 0 + _ => 0, }; PokeWord(val); @@ -133,7 +133,7 @@ namespace BizHawk.Client.Common .Insert(8, " ") .Insert(4, " ") .Insert(14, " "), - _ => val.ToString() + _ => val.ToString(), }; } diff --git a/src/BizHawk.Client.DiscoHawk/MainDiscoForm.cs b/src/BizHawk.Client.DiscoHawk/MainDiscoForm.cs index dc8e489852..1e5e0924dc 100644 --- a/src/BizHawk.Client.DiscoHawk/MainDiscoForm.cs +++ b/src/BizHawk.Client.DiscoHawk/MainDiscoForm.cs @@ -152,7 +152,7 @@ namespace BizHawk.Client.DiscoHawk { DialogResult.Yes => true, DialogResult.No => false, - _ => null + _ => null, }; AudioExtractor.Extract(disc, path, filename, PromptForOverwrite); } diff --git a/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs b/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs index 57605734ca..0fcb2785f1 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs @@ -329,7 +329,7 @@ namespace BizHawk.Client.EmuHawk { 16 => 2, 8 => 1, - _ => throw new InvalidOperationException($"only 8/16 bits audio are supported by {nameof(AviWriter)} and you chose: {a_bits}") + _ => throw new InvalidOperationException($"only 8/16 bits audio are supported by {nameof(AviWriter)} and you chose: {a_bits}"), }; if (a_channels is not (1 or 2)) diff --git a/src/BizHawk.Client.EmuHawk/AVOut/GifWriterForm.cs b/src/BizHawk.Client.EmuHawk/AVOut/GifWriterForm.cs index ef07809d14..8af886e80d 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/GifWriterForm.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/GifWriterForm.cs @@ -37,7 +37,7 @@ namespace BizHawk.Client.EmuHawk { -1 => "Auto", 0 => "Fastest", - _ => $"{(int) ((100 + numericUpDown2.Value / 2) / numericUpDown2.Value)} FPS" + _ => $"{(int) ((100 + numericUpDown2.Value / 2) / numericUpDown2.Value)} FPS", }; } } diff --git a/src/BizHawk.Client.EmuHawk/CustomControls/MsgBox.cs b/src/BizHawk.Client.EmuHawk/CustomControls/MsgBox.cs index 41c85ddf1d..b491d37ae8 100644 --- a/src/BizHawk.Client.EmuHawk/CustomControls/MsgBox.cs +++ b/src/BizHawk.Client.EmuHawk/CustomControls/MsgBox.cs @@ -108,7 +108,7 @@ namespace BizHawk.Client.EmuHawk.CustomControls MessageBoxIcon.Error => SystemIcons.Error, MessageBoxIcon.Exclamation => SystemIcons.Exclamation, MessageBoxIcon.Question => SystemIcons.Question, - _ => null + _ => null, }; } diff --git a/src/BizHawk.Client.EmuHawk/DialogControllerWinFormsExtensions.cs b/src/BizHawk.Client.EmuHawk/DialogControllerWinFormsExtensions.cs index 281ed362d7..319f0b3fd5 100644 --- a/src/BizHawk.Client.EmuHawk/DialogControllerWinFormsExtensions.cs +++ b/src/BizHawk.Client.EmuHawk/DialogControllerWinFormsExtensions.cs @@ -45,7 +45,7 @@ namespace BizHawk.Client.EmuHawk EMsgBoxIcon.Question => MessageBoxIcon.Question, EMsgBoxIcon.Warning => MessageBoxIcon.Warning, EMsgBoxIcon.Info => MessageBoxIcon.Information, - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }); } } diff --git a/src/BizHawk.Client.EmuHawk/Extensions/CoreExtensions.cs b/src/BizHawk.Client.EmuHawk/Extensions/CoreExtensions.cs index bda4f15ba9..8432ec6017 100644 --- a/src/BizHawk.Client.EmuHawk/Extensions/CoreExtensions.cs +++ b/src/BizHawk.Client.EmuHawk/Extensions/CoreExtensions.cs @@ -36,7 +36,7 @@ namespace BizHawk.Client.EmuHawk.CoreExtensions QuickNES => Properties.Resources.QuickNes, Snes9x => Properties.Resources.Snes9X, UAE => Properties.Resources.Amiga, - _ => null + _ => null, }; } @@ -46,7 +46,7 @@ namespace BizHawk.Client.EmuHawk.CoreExtensions #if false IGameboyCommon gb when gb.IsCGBMode() => EmulatorExtensions.SystemIDToDisplayName(VSystemID.Raw.GBC), #endif - _ => EmulatorExtensions.SystemIDToDisplayName(emulator.SystemId) + _ => EmulatorExtensions.SystemIDToDisplayName(emulator.SystemId), }; } } diff --git a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs index 32ea0c4951..29e085b844 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -803,7 +803,7 @@ namespace BizHawk.Client.EmuHawk { ESoundOutputMethod.XAudio2 => XAudio2SoundOutput.GetDeviceNames(), ESoundOutputMethod.OpenAL => OpenALSoundOutput.GetDeviceNames(), - _ => Enumerable.Empty() + _ => [ ], }; var oldOutputMethod = Config.SoundOutputMethod; var oldDevice = Config.SoundDevice; diff --git a/src/BizHawk.Client.EmuHawk/MainForm.VSystem.cs b/src/BizHawk.Client.EmuHawk/MainForm.VSystem.cs index 9051068ba7..e19f339305 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.VSystem.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.VSystem.cs @@ -78,7 +78,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { A7800Hawk => OpenA7800HawkGamepadSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private DialogResult OpenA7800HawkFilterSettingsDialog(ISettingsAdapter settable) @@ -91,7 +91,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { A7800Hawk => OpenA7800HawkFilterSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private void A7800SubMenu_DropDownOpened(object sender, EventArgs e) @@ -130,7 +130,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { AppleII => OpenVirtuSettingsDialog(), - _ => DialogResult.None + _ => DialogResult.None, }; private void AppleSubMenu_DropDownOpened(object sender, EventArgs e) @@ -171,7 +171,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { C64 => OpenC64HawkSettingsDialog(), - _ => DialogResult.None + _ => DialogResult.None, }; private void C64SubMenu_DropDownOpened(object sender, EventArgs e) @@ -192,7 +192,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { ColecoVision => OpenColecoHawkGamepadSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private void ColecoHawkSetSkipBIOSIntro(bool newValue, ISettingsAdapter settable) @@ -240,7 +240,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { AmstradCPC => OpenCPCHawkSyncSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private DialogResult OpenCPCHawkAudioSettingsDialog(ISettingsAdapter settable) @@ -253,7 +253,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { AmstradCPC => OpenCPCHawkAudioSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private DialogResult OpenCPCHawkSettingsDialog(ISettingsAdapter settable) @@ -266,7 +266,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { AmstradCPC => OpenCPCHawkSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private void AmstradCpcTapesSubMenu_DropDownOpened(object sender, EventArgs e) @@ -345,7 +345,7 @@ namespace BizHawk.Client.EmuHawk GBHawk => OpenGBHawkSettingsDialog(), Sameboy => OpenSameBoySettingsDialog(), SubGBHawk => OpenSubGBHawkSettingsDialog(), - _ => DialogResult.None + _ => DialogResult.None, }; private DialogResult OpenSameBoyPaletteSettingsDialog(ISettingsAdapter settable) @@ -358,7 +358,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { Sameboy => OpenSameBoyPaletteSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private void GbGpuViewerMenuItem_Click(object sender, EventArgs e) @@ -374,7 +374,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { GambatteLink => OpenGambatteLinkSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -426,7 +426,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { Intellivision => OpenIntelliHawkGamepadSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private void IntVSubMenu_DropDownOpened(object sender, EventArgs e) @@ -461,7 +461,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { N64 => OpenMupen64PlusGamepadSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private void N64CircularAnalogRangeMenuItem_Click(object sender, EventArgs e) @@ -523,7 +523,7 @@ namespace BizHawk.Client.EmuHawk NDS.ScreenRotationKind.Rotate90 => NDS.ScreenRotationKind.Rotate180, NDS.ScreenRotationKind.Rotate180 => NDS.ScreenRotationKind.Rotate270, NDS.ScreenRotationKind.Rotate270 => NDS.ScreenRotationKind.Rotate0, - _ => settings.ScreenRotation + _ => settings.ScreenRotation, }; settings.ScreenRotation = next; ds.PutSettings(settings); @@ -582,7 +582,7 @@ namespace BizHawk.Client.EmuHawk NES => OpenNesHawkGamepadSettingsDialog(GetSettingsAdapterForLoadedCore()), SubNESHawk => OpenNesHawkGamepadSettingsDialog(GetSettingsAdapterForLoadedCore()), QuickNES => OpenQuickNesGamepadSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private DialogResult OpenNesHawkGraphicsSettingsDialog(ISettingsAdapter settable) @@ -603,7 +603,7 @@ namespace BizHawk.Client.EmuHawk NES => OpenNesHawkGraphicsSettingsDialog(GetSettingsAdapterForLoadedCore()), SubNESHawk => OpenNesHawkGraphicsSettingsDialog(GetSettingsAdapterForLoadedCore()), QuickNES => OpenQuickNesGraphicsSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private void NesSoundChannelsMenuItem_Click(object sender, EventArgs e) @@ -620,7 +620,7 @@ namespace BizHawk.Client.EmuHawk { NES { IsVS: true } => OpenNesHawkVSSettingsDialog(GetSettingsAdapterForLoadedCore()), SubNESHawk { IsVs: true } => OpenNesHawkVSSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private DialogResult OpenNesHawkAdvancedSettingsDialog(ISettingsAdapter settable, bool hasMapperProperties) @@ -634,7 +634,7 @@ namespace BizHawk.Client.EmuHawk { NES nesHawk => OpenNesHawkAdvancedSettingsDialog(GetSettingsAdapterForLoadedCore(), nesHawk.HasMapperProperties), SubNESHawk subNESHawk => OpenNesHawkAdvancedSettingsDialog(GetSettingsAdapterForLoadedCore(), subNESHawk.HasMapperProperties), - _ => DialogResult.None + _ => DialogResult.None, }; private void FdsEjectDiskMenuItem_Click(object sender, EventArgs e) @@ -705,7 +705,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { Octoshock => OpenOctoshockGamepadSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private DialogResult OpenOctoshockSettingsDialog(ISettingsAdapter settable, OctoshockDll.eVidStandard vidStandard, Size vidSize) @@ -716,7 +716,7 @@ namespace BizHawk.Client.EmuHawk var result = Emulator switch { Octoshock octoshock => OpenOctoshockSettingsDialog(GetSettingsAdapterForLoadedCore(), octoshock.SystemVidStandard, octoshock.CurrentVideoSize), - _ => DialogResult.None + _ => DialogResult.None, }; if (result.IsOk()) FrameBufferResized(); } @@ -754,7 +754,7 @@ namespace BizHawk.Client.EmuHawk LibsnesCore => OpenOldBSNESGamepadSettingsDialog(GetSettingsAdapterForLoadedCore()), BsnesCore => OpenBSNESGamepadSettingsDialog(GetSettingsAdapterForLoadedCore()), SubBsnesCore => OpenBSNESGamepadSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private void SnesGfxDebuggerMenuItem_Click(object sender, EventArgs e) @@ -772,7 +772,7 @@ namespace BizHawk.Client.EmuHawk LibsnesCore => OpenOldBSNESSettingsDialog(GetSettingsAdapterForLoadedCore()), BsnesCore => OpenBSNESSettingsDialog(GetSettingsAdapterForLoadedCore()), SubBsnesCore => OpenBSNESSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private void SnesSubMenu_DropDownOpened(object sender, EventArgs e) @@ -868,7 +868,7 @@ namespace BizHawk.Client.EmuHawk 2 => s.ShowOBJ_1 = !s.ShowOBJ_1, 3 => s.ShowOBJ_2 = !s.ShowOBJ_2, 4 => s.ShowOBJ_3 = !s.ShowOBJ_3, - _ => result + _ => result, }; bsnes.PutSettings(s); AddOnScreenMessage($"Obj {layer} Layer {(result ? "On" : "Off")}"); @@ -882,7 +882,7 @@ namespace BizHawk.Client.EmuHawk 2 => s.ShowSprites1 = !s.ShowSprites1, 3 => s.ShowSprites2 = !s.ShowSprites2, 4 => s.ShowSprites3 = !s.ShowSprites3, - _ => result + _ => result, }; snes9X.PutSettings(s); AddOnScreenMessage($"Sprite {layer} Layer {(result ? "On" : "Off")}"); @@ -936,7 +936,7 @@ namespace BizHawk.Client.EmuHawk { Emu83 => OpenTI83PaletteSettingsDialog(GetSettingsAdapterForLoadedCore()), TI83 => OpenTI83PaletteSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; if (result.IsOk()) AddOnScreenMessage("Palette settings saved"); } @@ -958,7 +958,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { ZXSpectrum => OpenZXHawkSyncSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private DialogResult OpenZXHawkGamepadSettingsDialog(ISettingsAdapter settable) @@ -971,7 +971,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { ZXSpectrum => OpenZXHawkGamepadSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private DialogResult OpenZXHawkAudioSettingsDialog(ISettingsAdapter settable) @@ -984,7 +984,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { ZXSpectrum => OpenZXHawkAudioSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private DialogResult OpenZXHawkSettingsDialog(ISettingsAdapter settable) @@ -997,7 +997,7 @@ namespace BizHawk.Client.EmuHawk => _ = Emulator switch { ZXSpectrum => OpenZXHawkSettingsDialog(GetSettingsAdapterForLoadedCore()), - _ => DialogResult.None + _ => DialogResult.None, }; private void ZXSpectrumTapesSubMenu_DropDownOpened(object sender, EventArgs e) diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs index 76950ed7bd..310f24d89f 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.cs @@ -144,7 +144,7 @@ namespace BizHawk.Client.EmuHawk VSystemCategory.Consoles => consolesCoreSettingsSubmenu, VSystemCategory.Handhelds => handheldsCoreSettingsSubmenu, VSystemCategory.PCs => pcsCoreSettingsSubmenu, - _ => otherCoreSettingsSubmenu + _ => otherCoreSettingsSubmenu, }; parentMenu.DropDownItems.Add(submenu); } @@ -595,7 +595,7 @@ namespace BizHawk.Client.EmuHawk ControllerConfig => AllowInput.All, HotkeyConfig => AllowInput.All, LuaWinform { BlocksInputWhenFocused: false } => AllowInput.All, - _ => AllowInput.None + _ => AllowInput.None, } ); InitControls(); @@ -750,7 +750,7 @@ namespace BizHawk.Client.EmuHawk "false" => false, _ when int.TryParse(v, out var i) => i, _ when double.TryParse(v, out var d) => d, - _ => v + _ => v, }; } @@ -804,7 +804,7 @@ namespace BizHawk.Client.EmuHawk OSTailoredCode.WindowsVersion._11 => null, OSTailoredCode.WindowsVersion._10 when win10PlusVersion! < new Version(10, 0, 19045) => $"Quick reminder: Your copy of Windows 10 (build {win10PlusVersion.Build}) is no longer supported by Microsoft.\nEmuHawk will probably continue working, but please update to 22H2 for increased security.", OSTailoredCode.WindowsVersion._10 => null, - _ => $"Quick reminder: Windows {winVersion.ToString().RemovePrefix('_').Replace('_', '.')} is no longer supported by Microsoft.\nEmuHawk will probably continue working, but please get a new operating system for increased security (either Windows 10+ or a GNU+Linux distro)." + _ => $"Quick reminder: Windows {winVersion.ToString().RemovePrefix('_').Replace('_', '.')} is no longer supported by Microsoft.\nEmuHawk will probably continue working, but please get a new operating system for increased security (either Windows 10+ or a GNU+Linux distro).", }; if (message is not null) { @@ -4354,7 +4354,7 @@ namespace BizHawk.Client.EmuHawk CoreNames.QuickNes => CoreNames.NesHawk, CoreNames.Atari2600Hawk => CoreNames.Stella, CoreNames.HyperNyma => CoreNames.TurboNyma, - _ => null + _ => null, }; return recommendedCore is null ? true @@ -4664,7 +4664,7 @@ namespace BizHawk.Client.EmuHawk { DialogResult.OK => true, DialogResult.Yes => true, - _ => false + _ => false, }; public bool? ShowMessageBox3( @@ -4681,7 +4681,7 @@ namespace BizHawk.Client.EmuHawk { DialogResult.Yes => true, DialogResult.No => false, - _ => null + _ => null, }; public void StartSound() => Sound.StartSound(); diff --git a/src/BizHawk.Client.EmuHawk/Program.cs b/src/BizHawk.Client.EmuHawk/Program.cs index 348e4cde03..0e6e238fcb 100644 --- a/src/BizHawk.Client.EmuHawk/Program.cs +++ b/src/BizHawk.Client.EmuHawk/Program.cs @@ -248,7 +248,7 @@ namespace BizHawk.Client.EmuHawk 1 or 2 when !OSTailoredCode.IsUnixHost => dispMethod == EDispMethod.D3D11 ? (EDispMethod.OpenGL, "OpenGL") : (EDispMethod.D3D11, "Direct3D11"), - _ => (EDispMethod.GdiPlus, "GDI+") + _ => (EDispMethod.GdiPlus, "GDI+"), }; IGL CheckRenderer(IGL gl) diff --git a/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevos.Debug.cs b/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevos.Debug.cs index b047be02a0..1a00c3214d 100644 --- a/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevos.Debug.cs +++ b/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevos.Debug.cs @@ -383,7 +383,7 @@ namespace BizHawk.Client.EmuHawk DiscType.Dreamcast => ConsoleID.Dreamcast, DiscType.SonyPS2 => ConsoleID.PlayStation2, DiscType.JaguarCD => ConsoleID.JaguarCD, - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; } diff --git a/src/BizHawk.Client.EmuHawk/Sound/Sound.cs b/src/BizHawk.Client.EmuHawk/Sound/Sound.cs index b2e101c604..bf7b7eca9b 100644 --- a/src/BizHawk.Client.EmuHawk/Sound/Sound.cs +++ b/src/BizHawk.Client.EmuHawk/Sound/Sound.cs @@ -57,7 +57,7 @@ namespace BizHawk.Client.EmuHawk { ESoundOutputMethod.XAudio2 => new XAudio2SoundOutput(this, config.SoundDevice), ESoundOutputMethod.OpenAL => new OpenALSoundOutput(this, config.SoundDevice), - _ => new DummySoundOutput(this) + _ => new DummySoundOutput(this), }; } } diff --git a/src/BizHawk.Client.EmuHawk/config/AmstradCPC/AmstradCPCCoreEmulationSettings.cs b/src/BizHawk.Client.EmuHawk/config/AmstradCPC/AmstradCPCCoreEmulationSettings.cs index eb43c80696..8a5af80380 100644 --- a/src/BizHawk.Client.EmuHawk/config/AmstradCPC/AmstradCPCCoreEmulationSettings.cs +++ b/src/BizHawk.Client.EmuHawk/config/AmstradCPC/AmstradCPCCoreEmulationSettings.cs @@ -101,7 +101,7 @@ namespace BizHawk.Client.EmuHawk { AmstradCPC.BorderType.Visible => "Approximates what you see on a CPC monitor", AmstradCPC.BorderType.Uncropped => "The full display area", - _ => lblBorderInfo.Text + _ => lblBorderInfo.Text, }; } } diff --git a/src/BizHawk.Client.EmuHawk/config/GenericCoreConfig.cs b/src/BizHawk.Client.EmuHawk/config/GenericCoreConfig.cs index 9af2d7ed17..7b95704aba 100644 --- a/src/BizHawk.Client.EmuHawk/config/GenericCoreConfig.cs +++ b/src/BizHawk.Client.EmuHawk/config/GenericCoreConfig.cs @@ -79,7 +79,7 @@ namespace BizHawk.Client.EmuHawk { MAME mame => DoMAMEDialog(owner, settable, mame.CurrentDriverSettings, isMovieActive: isMovieActive), NymaCore core => DoNymaDialogFor(owner, settable, title, core.SettingsInfo, isMovieActive: isMovieActive), - _ => DoDialogFor(owner, settable, title, isMovieActive: isMovieActive) + _ => DoDialogFor(owner, settable, title, isMovieActive: isMovieActive), }; } diff --git a/src/BizHawk.Client.EmuHawk/config/N64/N64VideoPluginconfig.cs b/src/BizHawk.Client.EmuHawk/config/N64/N64VideoPluginconfig.cs index b1934ecea5..b67abd02c9 100644 --- a/src/BizHawk.Client.EmuHawk/config/N64/N64VideoPluginconfig.cs +++ b/src/BizHawk.Client.EmuHawk/config/N64/N64VideoPluginconfig.cs @@ -90,7 +90,7 @@ namespace BizHawk.Client.EmuHawk "Glide64mk2" => PluginType.GlideMk2, "GLideN64" => PluginType.GLideN64, "Angrylion" => PluginType.Angrylion, - _ => _ss.VideoPlugin + _ => _ss.VideoPlugin, }; _ss.Core = CoreTypeDropdown.SelectedItem diff --git a/src/BizHawk.Client.EmuHawk/config/PSX/PSXControllerConfig.cs b/src/BizHawk.Client.EmuHawk/config/PSX/PSXControllerConfig.cs index 00b8b74bde..d811567d13 100644 --- a/src/BizHawk.Client.EmuHawk/config/PSX/PSXControllerConfig.cs +++ b/src/BizHawk.Client.EmuHawk/config/PSX/PSXControllerConfig.cs @@ -74,7 +74,7 @@ namespace BizHawk.Client.EmuHawk 2 => OctoshockDll.ePeripheralType.DualShock, 3 => OctoshockDll.ePeripheralType.DualAnalog, 4 => OctoshockDll.ePeripheralType.NegCon, - _ => uc.Devices8[i] + _ => uc.Devices8[i], }; } diff --git a/src/BizHawk.Client.EmuHawk/config/ProfileConfig.cs b/src/BizHawk.Client.EmuHawk/config/ProfileConfig.cs index 9f5e9dd7a4..09f7f5de65 100644 --- a/src/BizHawk.Client.EmuHawk/config/ProfileConfig.cs +++ b/src/BizHawk.Client.EmuHawk/config/ProfileConfig.cs @@ -36,7 +36,7 @@ namespace BizHawk.Client.EmuHawk ClientProfile.Longplay => "Longplays", ClientProfile.Tas => "Tool-assisted Speedruns", ClientProfile.N64Tas => "N64 Tool-assisted Speedruns", - _ => "Casual Gaming" + _ => "Casual Gaming", }; AutoCheckForUpdates.Checked = _config.UpdateAutoCheckEnabled; @@ -49,7 +49,7 @@ namespace BizHawk.Client.EmuHawk "Longplays" => ClientProfile.Longplay, "Tool-assisted Speedruns" => ClientProfile.Tas, "N64 Tool-assisted Speedruns" => ClientProfile.N64Tas, - _ => ClientProfile.Casual + _ => ClientProfile.Casual, }; SetCasual(); diff --git a/src/BizHawk.Client.EmuHawk/config/ZXSpectrum/ZXSpectrumCoreEmulationSettings.cs b/src/BizHawk.Client.EmuHawk/config/ZXSpectrum/ZXSpectrumCoreEmulationSettings.cs index f3a28fec85..3adfb93f8c 100644 --- a/src/BizHawk.Client.EmuHawk/config/ZXSpectrum/ZXSpectrumCoreEmulationSettings.cs +++ b/src/BizHawk.Client.EmuHawk/config/ZXSpectrum/ZXSpectrumCoreEmulationSettings.cs @@ -99,7 +99,7 @@ namespace BizHawk.Client.EmuHawk ZXSpectrum.BorderType.None => "No border at all", ZXSpectrum.BorderType.Small => "All borders 10px", ZXSpectrum.BorderType.Widescreen => "No top and bottom border (almost 16:9)", - _ => lblBorderInfo.Text + _ => lblBorderInfo.Text, }; } } diff --git a/src/BizHawk.Client.EmuHawk/debug/N64RomByteswapToolForm.cs b/src/BizHawk.Client.EmuHawk/debug/N64RomByteswapToolForm.cs index b3b58a4af7..9e86236603 100644 --- a/src/BizHawk.Client.EmuHawk/debug/N64RomByteswapToolForm.cs +++ b/src/BizHawk.Client.EmuHawk/debug/N64RomByteswapToolForm.cs @@ -40,7 +40,7 @@ namespace BizHawk.Client.EmuHawk.ForDebugging 0 => "n64", 1 => "v64", 2 => "z64", - _ => null + _ => null, }, initDir: Config!.PathEntries.RomAbsolutePath()); if (filename is not null) txtTargetFile.Text = filename; @@ -54,7 +54,7 @@ namespace BizHawk.Client.EmuHawk.ForDebugging { 0 => N64RomByteswapper.ToN64LittleEndian(rom), 1 => N64RomByteswapper.ToV64ByteSwapped(rom), - _ => N64RomByteswapper.ToZ64Native(rom) + _ => N64RomByteswapper.ToZ64Native(rom), }; File.WriteAllBytes(txtTargetFile.Text, rom); this.ModalMessageBox($"wrote {txtTargetFile.Text}\n{SHA1Checksum.ComputePrefixedHex(rom)}"); diff --git a/src/BizHawk.Client.EmuHawk/movie/PlayMovie.cs b/src/BizHawk.Client.EmuHawk/movie/PlayMovie.cs index c6d7292bc1..46f70b645e 100644 --- a/src/BizHawk.Client.EmuHawk/movie/PlayMovie.cs +++ b/src/BizHawk.Client.EmuHawk/movie/PlayMovie.cs @@ -496,7 +496,7 @@ namespace BizHawk.Client.EmuHawk .OrderBy(x => x.Values, _sortDetailsReverse) .ThenBy(x => x.Keys) .ToList(), - _ => detailsList + _ => detailsList, }; DetailsView.Items.Clear(); diff --git a/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs b/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs index 62aed29b75..3229c89b14 100644 --- a/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs +++ b/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs @@ -837,7 +837,7 @@ namespace BizHawk.Client.EmuHawk 1 => _currentDomain.PeekByte(addr), 2 => _currentDomain.PeekUshort(addr, _bigEndian), 4 => (int) _currentDomain.PeekUint(addr, _bigEndian), - _ => _currentDomain.PeekByte(addr) + _ => _currentDomain.PeekByte(addr), }; return val; @@ -937,7 +937,7 @@ namespace BizHawk.Client.EmuHawk 3 => (currentValue <= bestValue), 4 => (currentValue < bestValue), 5 => (currentValue != bestValue), - _ => false + _ => false, }; if (!TestValue(MainComparisonType, current.Maximize, comparison.Maximize)) return false; diff --git a/src/BizHawk.Client.EmuHawk/tools/Cheats/CheatEdit.cs b/src/BizHawk.Client.EmuHawk/tools/Cheats/CheatEdit.cs index ce27a1f963..e9e7826488 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Cheats/CheatEdit.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Cheats/CheatEdit.cs @@ -326,7 +326,7 @@ namespace BizHawk.Client.EmuHawk "<" => Cheat.CompareType.LessThan, "<=" => Cheat.CompareType.LessThanOrEqual, "!=" => Cheat.CompareType.NotEqual, - _ => Cheat.CompareType.None + _ => Cheat.CompareType.None, }; var compare = CompareBox.ToRawInt(); diff --git a/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs b/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs index 5a3b6531ca..244e0ebc35 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs @@ -262,7 +262,7 @@ namespace BizHawk.Client.EmuHawk Cheat.CompareType.LessThan => "<", Cheat.CompareType.LessThanOrEqual => "<=", Cheat.CompareType.NotEqual => "!=", - _ => "" + _ => string.Empty, }; break; diff --git a/src/BizHawk.Client.EmuHawk/tools/ExternalToolManager.cs b/src/BizHawk.Client.EmuHawk/tools/ExternalToolManager.cs index ac3203783d..dab6c50c1a 100644 --- a/src/BizHawk.Client.EmuHawk/tools/ExternalToolManager.cs +++ b/src/BizHawk.Client.EmuHawk/tools/ExternalToolManager.cs @@ -216,7 +216,7 @@ namespace BizHawk.Client.EmuHawk ExternalToolApplicabilityAttributeBase.DuplicateException => "The IExternalToolForm has conflicting applicability attributes.", ExternalToolAttribute.MissingException => "The assembly doesn't contain a class implementing IExternalToolForm and annotated with [ExternalTool].", ReflectionTypeLoadException => "Something went wrong while trying to load the assembly.", - _ => $"An exception of type {e.GetType().FullName} was thrown while trying to load the assembly and look for an IExternalToolForm:\n{e.Message}" + _ => $"An exception of type {e.GetType().FullName} was thrown while trying to load the assembly and look for an IExternalToolForm:\n{e}", }; } return item; diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/ConsoleLuaLibrary.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/ConsoleLuaLibrary.cs index 30226056ce..c18334dd31 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/ConsoleLuaLibrary.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/ConsoleLuaLibrary.cs @@ -97,7 +97,7 @@ namespace BizHawk.Client.EmuHawk { null => "nil", LuaTable table => SerializeTable(table), - _ => output.ToString() + _ => output.ToString(), }); if (outputs == null || outputs.Length == 0 || (outputs.Length == 1 && outputs[0] is null)) diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaAutocompleteInstaller.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaAutocompleteInstaller.cs index 871129c17d..615f703975 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaAutocompleteInstaller.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaAutocompleteInstaller.cs @@ -13,7 +13,7 @@ namespace BizHawk.Client.EmuHawk { TextEditors.Sublime2 => IsSublimeInstalled(), TextEditors.NotePad => IsNotepadInstalled(), - _ => false + _ => false, }; } @@ -23,7 +23,7 @@ namespace BizHawk.Client.EmuHawk { TextEditors.Sublime2 => IsBizLuaSublimeInstalled(), TextEditors.NotePad => IsBizLuaNotepadInstalled(), - _ => false + _ => false, }; } diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs index 416832212c..915b1769aa 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs @@ -423,7 +423,7 @@ namespace BizHawk.Client.EmuHawk { LuaFile.RunState.Running => Resources.ts_h_arrow_green, LuaFile.RunState.Paused => Resources.Pause, - _ => Resources.Stop + _ => Resources.Stop, }; } diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaFunctionsForm.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaFunctionsForm.cs index 34519a3951..376c798585 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaFunctionsForm.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaFunctionsForm.cs @@ -76,7 +76,7 @@ namespace BizHawk.Client.EmuHawk 2 => _functionList.OrderBy(x => x.Name, _columnSort.Descending).ToList(), 3 => _functionList.OrderBy(x => x.ParameterList, _columnSort.Descending).ToList(), 4 => _functionList.OrderBy(x => x.Description, _columnSort.Descending).ToList(), - _ => _functionList + _ => _functionList, }; UpdateList(); diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaLibraries.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaLibraries.cs index 42506ddaa8..c466bd7996 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaLibraries.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaLibraries.cs @@ -376,7 +376,7 @@ namespace BizHawk.Client.EmuHawk { LuaStatus.OK => (WaitForFrame: false, Terminated: true), LuaStatus.Yield => (WaitForFrame: FrameAdvanceRequested, Terminated: false), - _ => throw new InvalidOperationException($"{nameof(_currThread.Resume)}() returned {execResult}?") + _ => throw new InvalidOperationException($"{nameof(_currThread.Resume)}() returned {execResult}?"), }; FrameAdvanceRequested = false; diff --git a/src/BizHawk.Client.EmuHawk/tools/NES/NESMusicRipper.cs b/src/BizHawk.Client.EmuHawk/tools/NES/NESMusicRipper.cs index a79bd6cb60..7df653e932 100644 --- a/src/BizHawk.Client.EmuHawk/tools/NES/NESMusicRipper.cs +++ b/src/BizHawk.Client.EmuHawk/tools/NES/NESMusicRipper.cs @@ -182,7 +182,7 @@ namespace BizHawk.Client.EmuHawk { 0 => rec.Pulse0, 1 => rec.Pulse1, - _ => default + _ => default, }; // transform quieted notes to dead notes diff --git a/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs b/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs index 404f72f12a..f9e03ec0e1 100644 --- a/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs @@ -282,7 +282,7 @@ namespace BizHawk.Client.EmuHawk NameTableViewer.WhichNametable.NT_2400 => 1, NameTableViewer.WhichNametable.NT_2800 => 2, NameTableViewer.WhichNametable.NT_2C00 => 3, - _ => 0 + _ => 0, }; tileX = e.X / 16; diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs index 8f364fc221..360989f528 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs @@ -84,7 +84,7 @@ namespace BizHawk.Client.EmuHawk BranchNumberColumnName => (index + 1).ToString(), FrameColumnName => Branches[index].Frame.ToString(), UserTextColumnName => Branches[index].UserText, - _ => text + _ => text, }; } diff --git a/src/BizHawk.Client.EmuHawk/tools/TraceLogger.cs b/src/BizHawk.Client.EmuHawk/tools/TraceLogger.cs index 7700a66dad..2172e03533 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TraceLogger.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TraceLogger.cs @@ -111,7 +111,7 @@ namespace BizHawk.Client.EmuHawk { DisasmColumnName => _instructions[index].Disassembly.TrimEnd(), RegistersColumnName => _instructions[index].RegisterInfo, - _ => text + _ => text, }; } } diff --git a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualPad.cs b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualPad.cs index 4739271f7c..91b4269ff4 100644 --- a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualPad.cs +++ b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualPad.cs @@ -165,7 +165,7 @@ namespace BizHawk.Client.EmuHawk Location = UIHelper.Scale(discManager.Location), Size = UIHelper.Scale(discManager.TargetSize) }, - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }); } if (OSTailoredCode.IsUnixHost) diff --git a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.cs b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.cs index 39a7a88f98..1c0dccafb5 100644 --- a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.cs +++ b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.cs @@ -109,7 +109,7 @@ namespace BizHawk.Client.EmuHawk { ButtonSchema => buttonControls.Contains, DiscManagerSchema => s => buttonControls.Contains(s) || axisControls.ContainsKey(s), - _ => axisControls.ContainsKey + _ => axisControls.ContainsKey, }; if (!searchSetContains(controlSchema.Name)) { diff --git a/src/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs b/src/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs index 05bd664e37..0ea2d03c3f 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs @@ -127,7 +127,7 @@ namespace BizHawk.Client.EmuHawk WatchSize.Byte => 0, WatchSize.Word => 1, WatchSize.DWord => 2, - _ => SizeDropdown.SelectedIndex + _ => SizeDropdown.SelectedIndex, }; } @@ -231,7 +231,7 @@ namespace BizHawk.Client.EmuHawk WatchList.Prev => _searches[index].PreviousStr, WatchList.ChangesCol => _searches[index].ChangeCount.ToString(), WatchList.Diff => _searches[index].Diff, - _ => text + _ => text, }; } @@ -712,7 +712,7 @@ namespace BizHawk.Client.EmuHawk WatchSize.Byte => ByteWatch.ValidTypes, WatchSize.Word => WordWatch.ValidTypes, WatchSize.DWord => DWordWatch.ValidTypes, - _ => new List() + _ => [ ], }; foreach (var type in types) @@ -1074,7 +1074,7 @@ namespace BizHawk.Client.EmuHawk WatchSize.Byte => ByteWatch.ValidTypes, WatchSize.Word => WordWatch.ValidTypes, WatchSize.DWord => DWordWatch.ValidTypes, - _ => new List() + _ => [ ], }; foreach (var type in types) @@ -1405,7 +1405,7 @@ namespace BizHawk.Client.EmuHawk { 1 => WatchSize.Word, 2 => WatchSize.DWord, - _ => WatchSize.Byte + _ => WatchSize.Byte, }; private void SizeDropdown_SelectedIndexChanged(object sender, EventArgs e) diff --git a/src/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs b/src/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs index f23e6fb33d..ca82a3de3f 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs @@ -820,7 +820,7 @@ namespace BizHawk.Client.EmuHawk { WatchSize.DWord => WatchSize.Word, WatchSize.Word => WatchSize.Byte, - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; var a = Watch.GenerateWatch(ab.Domain, ab.Address, newSize, ab.Type, ab.BigEndian, ab.Notes); var b = Watch.GenerateWatch(ab.Domain, ab.Address + (int) newSize, newSize, ab.Type, ab.BigEndian, ab.Notes); diff --git a/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.cs b/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.cs index df2c9b6755..8e46ee50af 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.cs @@ -245,7 +245,7 @@ namespace BizHawk.Client.EmuHawk Mode.New => "New Watch", Mode.Edit => $"Edit {(Watches.Count == 1 ? "Watch" : "Watches")}", Mode.Duplicate => "Duplicate Watch", - _ => "New Watch" + _ => "New Watch", }; } @@ -269,7 +269,7 @@ namespace BizHawk.Client.EmuHawk { 4 => DWordWatch.ValidTypes, 2 => WordWatch.ValidTypes, - _ => ByteWatch.ValidTypes + _ => ByteWatch.ValidTypes, }).Select(Watch.DisplayTypeToString)); DisplayTypeDropDown.SelectedItem = oldType; if (DisplayTypeDropDown.SelectedIndex is -1) DisplayTypeDropDown.SelectedIndex = 0; diff --git a/src/BizHawk.Client.EmuHawk/tools/Watch/WatchValueBox.cs b/src/BizHawk.Client.EmuHawk/tools/Watch/WatchValueBox.cs index e2dc4b2739..2feec1386f 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Watch/WatchValueBox.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Watch/WatchValueBox.cs @@ -37,7 +37,7 @@ namespace BizHawk.Client.EmuHawk WatchSize.Byte => ByteWatch.ValidTypes.Any(t => t == _type), WatchSize.Word => WordWatch.ValidTypes.Any(t => t == _type), WatchSize.DWord => DWordWatch.ValidTypes.Any(t => t == _type), - _ => false + _ => false, }; if (!isTypeCompatible) @@ -67,7 +67,7 @@ namespace BizHawk.Client.EmuHawk { WatchSize.Word => ushort.MaxValue, WatchSize.DWord => uint.MaxValue, - _ => byte.MaxValue + _ => byte.MaxValue, }; private int MaxSignedInt => @@ -75,7 +75,7 @@ namespace BizHawk.Client.EmuHawk { WatchSize.Word => short.MaxValue, WatchSize.DWord => int.MaxValue, - _ => sbyte.MaxValue + _ => sbyte.MaxValue, }; private int MinSignedInt => @@ -83,7 +83,7 @@ namespace BizHawk.Client.EmuHawk { WatchSize.Word => short.MinValue, WatchSize.DWord => int.MinValue, - _ => sbyte.MinValue + _ => sbyte.MinValue, }; private const double Max12_4 = short.MaxValue / 16.0; @@ -145,7 +145,7 @@ namespace BizHawk.Client.EmuHawk WatchSize.Byte => 8, WatchSize.Word => 16, WatchSize.DWord => 32, - _ => 8 + _ => 8, }; break; case WatchDisplayType.Hex: @@ -154,7 +154,7 @@ namespace BizHawk.Client.EmuHawk WatchSize.Byte => 2, WatchSize.Word => 4, WatchSize.DWord => 8, - _ => 2 + _ => 2, }; break; case WatchDisplayType.Signed: @@ -163,7 +163,7 @@ namespace BizHawk.Client.EmuHawk WatchSize.Byte => 4, WatchSize.Word => 6, WatchSize.DWord => 11, - _ => 4 + _ => 4, }; break; case WatchDisplayType.Unsigned: @@ -172,7 +172,7 @@ namespace BizHawk.Client.EmuHawk WatchSize.Byte => 3, WatchSize.Word => 5, WatchSize.DWord => 10, - _ => 3 + _ => 3, }; break; case WatchDisplayType.FixedPoint_12_4: @@ -459,7 +459,7 @@ namespace BizHawk.Client.EmuHawk WatchDisplayType.FixedPoint_20_12 => (int)(double.Parse(Text, NumberFormatInfo.InvariantInfo) * 4096.0), WatchDisplayType.FixedPoint_16_16 => (int)(double.Parse(Text, NumberFormatInfo.InvariantInfo) * 65536.0), WatchDisplayType.Float => (int)NumberExtensions.ReinterpretAsUInt32(float.Parse(Text, NumberFormatInfo.InvariantInfo)), - _ => int.Parse(Text) + _ => int.Parse(Text), }; } catch @@ -487,7 +487,7 @@ namespace BizHawk.Client.EmuHawk WatchDisplayType.FixedPoint_20_12 => (i / 4096.0).ToString("F5", NumberFormatInfo.InvariantInfo), WatchDisplayType.FixedPoint_16_16 => (i / 65536.0).ToString("F5", NumberFormatInfo.InvariantInfo), WatchDisplayType.Float => NumberExtensions.ReinterpretAsF32((uint)i).ToString("F6", NumberFormatInfo.InvariantInfo), - _ => i.ToString() + _ => i.ToString(), }; } } diff --git a/src/BizHawk.Common/MemoryBlock/MemoryBlockLinuxPal.cs b/src/BizHawk.Common/MemoryBlock/MemoryBlockLinuxPal.cs index eb4ad8dcf0..d2b5612539 100644 --- a/src/BizHawk.Common/MemoryBlock/MemoryBlockLinuxPal.cs +++ b/src/BizHawk.Common/MemoryBlock/MemoryBlockLinuxPal.cs @@ -46,7 +46,7 @@ namespace BizHawk.Common Protection.R => MemoryProtection.Read, Protection.RW => MemoryProtection.Read | MemoryProtection.Write, Protection.RX => MemoryProtection.Read | MemoryProtection.Execute, - _ => throw new InvalidOperationException(nameof(prot)) + _ => throw new InvalidOperationException(nameof(prot)), }; public void Protect(ulong start, ulong size, Protection prot) diff --git a/src/BizHawk.Common/MemoryBlock/MemoryBlockWindowsPal.cs b/src/BizHawk.Common/MemoryBlock/MemoryBlockWindowsPal.cs index 7d74998e97..4ba9a1c4cc 100644 --- a/src/BizHawk.Common/MemoryBlock/MemoryBlockWindowsPal.cs +++ b/src/BizHawk.Common/MemoryBlock/MemoryBlockWindowsPal.cs @@ -35,7 +35,7 @@ namespace BizHawk.Common Protection.R => MemoryProtection.READONLY, Protection.RW => MemoryProtection.READWRITE, Protection.RX => MemoryProtection.EXECUTE_READ, - _ => throw new InvalidOperationException(nameof(prot)) + _ => throw new InvalidOperationException(nameof(prot)), }; public void Dispose() diff --git a/src/BizHawk.Common/MemoryBlock/MemoryViewStream.cs b/src/BizHawk.Common/MemoryBlock/MemoryViewStream.cs index c1b6327300..d82d00d617 100644 --- a/src/BizHawk.Common/MemoryBlock/MemoryViewStream.cs +++ b/src/BizHawk.Common/MemoryBlock/MemoryViewStream.cs @@ -99,7 +99,7 @@ namespace BizHawk.Common SeekOrigin.Begin => offset, SeekOrigin.Current => _pos + offset, SeekOrigin.End => _length + offset, - _ => offset + _ => offset, }; Position = newpos; diff --git a/src/BizHawk.Common/OSTailoredCode.cs b/src/BizHawk.Common/OSTailoredCode.cs index 8887e38224..d686e89d4c 100644 --- a/src/BizHawk.Common/OSTailoredCode.cs +++ b/src/BizHawk.Common/OSTailoredCode.cs @@ -121,7 +121,7 @@ namespace BizHawk.Common DistinctOS.Windows => new WindowsLLManager(), DistinctOS.BSD => new PosixLLManager(), DistinctOS.Unknown => throw new NotSupportedException("Cannot link libraries with Unknown OS"), - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }); public static ILinkedLibManager LinkedLibManager => _LinkedLibManager.Value; diff --git a/src/BizHawk.Emulation.Common/Database/Database.cs b/src/BizHawk.Emulation.Common/Database/Database.cs index 8ef525fec5..b19879e36a 100644 --- a/src/BizHawk.Emulation.Common/Database/Database.cs +++ b/src/BizHawk.Emulation.Common/Database/Database.cs @@ -84,7 +84,7 @@ namespace BizHawk.Emulation.Common RomStatus.Hack => "H", RomStatus.NotInDatabase => "U", RomStatus.Unknown => "U", - _ => "" + _ => string.Empty, }); sb @@ -121,7 +121,7 @@ namespace BizHawk.Emulation.Common "D" => RomStatus.Homebrew, "H" => RomStatus.Hack, "U" => RomStatus.Unknown, - _ => RomStatus.GoodDump + _ => RomStatus.GoodDump, }; _ = iter.MoveNext(); var knownName = lineStr.Substring(iter.Current); diff --git a/src/BizHawk.Emulation.Common/N3DSHasher.cs b/src/BizHawk.Emulation.Common/N3DSHasher.cs index 2b5938a161..dd08b7a2d8 100644 --- a/src/BizHawk.Emulation.Common/N3DSHasher.cs +++ b/src/BizHawk.Emulation.Common/N3DSHasher.cs @@ -215,7 +215,7 @@ namespace BizHawk.Emulation.Common 0x01 => 0x25, 0x0A => 0x18, 0x0B => 0x1B, - _ => throw new InvalidOperationException($"Invalid crypto method {cryptoMethod:X2}") + _ => throw new InvalidOperationException($"Invalid crypto method {cryptoMethod:X2}"), }; // We only need the program id if we're doing seed crypto diff --git a/src/BizHawk.Emulation.Common/U8ArrayAsNormalJSONListConverter.cs b/src/BizHawk.Emulation.Common/U8ArrayAsNormalJSONListConverter.cs index 083e50876c..75fd19d4e0 100644 --- a/src/BizHawk.Emulation.Common/U8ArrayAsNormalJSONListConverter.cs +++ b/src/BizHawk.Emulation.Common/U8ArrayAsNormalJSONListConverter.cs @@ -35,7 +35,7 @@ namespace BizHawk.Emulation.Common { byte b => b, long l and >= byte.MinValue and <= byte.MaxValue => unchecked((byte) l), - var o => throw new Exception($"Integer literal outside u8 range: {o}") + var o => throw new Exception($"Integer literal outside u8 range: {o}"), }); continue; case JsonToken.EndArray: diff --git a/src/BizHawk.Emulation.Common/filetype_detectors/SatellaviewFileTypeDetector.cs b/src/BizHawk.Emulation.Common/filetype_detectors/SatellaviewFileTypeDetector.cs index 9889579148..1f3a1a2f48 100644 --- a/src/BizHawk.Emulation.Common/filetype_detectors/SatellaviewFileTypeDetector.cs +++ b/src/BizHawk.Emulation.Common/filetype_detectors/SatellaviewFileTypeDetector.cs @@ -69,7 +69,7 @@ namespace BizHawk.Emulation.Common LIMITED_2_PLAYS_LEFT => 2, LIMITED_1_PLAYS_LEFT => 1, LIMITED_0_PLAYS_LEFT => 0, - _ => -1 + _ => -1, }; public byte Revision diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CCD_format.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CCD_format.cs index 83c37b47c1..30cec6ae69 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CCD_format.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CCD_format.cs @@ -560,7 +560,7 @@ namespace BizHawk.Emulation.DiscSystem ino.BCDValue = entry.Point switch { 0xA0 or 0xA1 or 0xA2 => (byte)entry.Point, - _ => ino.BCDValue + _ => ino.BCDValue, }; var q = new SubchannelQ @@ -597,7 +597,7 @@ namespace BizHawk.Emulation.DiscSystem SessionFormat.Type20_CDXA => CUE.CueTrackType.Mode2_2352, SessionFormat.Type10_CDI => CUE.CueTrackType.CDI_2352, SessionFormat.Type00_CDROM_CDDA => CUE.CueTrackType.Mode1_2352, - _ => pregapTrackType + _ => pregapTrackType, }; } diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CDI_format.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CDI_format.cs index a63eea4ab2..bd4c97a49f 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CDI_format.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CDI_format.cs @@ -475,7 +475,7 @@ namespace BizHawk.Emulation.DiscSystem 0 => CueTrackType.Mode1_2352, 1 => CueTrackType.CDI_2352, 2 => CueTrackType.Mode2_2352, - _ => cueTrackType + _ => cueTrackType, }; } disc._Sectors.Add(new SS_Gap @@ -511,7 +511,7 @@ namespace BizHawk.Emulation.DiscSystem 2 => 2352, 3 => 2368, 4 => 2448, - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; var curIndex = 0; var relMSF = -track.IndexSectorCounts[0]; @@ -540,7 +540,7 @@ namespace BizHawk.Emulation.DiscSystem 2 => new SS_2352(), 3 => new SS_2364_DeinterleavedQ(), 4 => new SS_2448_Interleaved(), - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; synth.Blob = cdiBlob; synth.BlobOffset = blobOffset; diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs index d7f67999aa..aef8676244 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs @@ -702,7 +702,7 @@ namespace BizHawk.Emulation.DiscSystem ino.BCDValue = entry.Point switch { 0xA0 or 0xA1 or 0xA2 => (byte)entry.Point, - _ => ino.BCDValue + _ => ino.BCDValue, }; // get ADR & Control from ADR_Control byte @@ -782,7 +782,7 @@ namespace BizHawk.Emulation.DiscSystem SessionFormat.Type20_CDXA => CUE.CueTrackType.Mode2_2352, SessionFormat.Type10_CDI => CUE.CueTrackType.CDI_2352, SessionFormat.Type00_CDROM_CDDA => CUE.CueTrackType.Mode1_2352, - _ => pregapTrackType + _ => pregapTrackType, }; } disc._Sectors.Add(new CUE.SS_Gap() @@ -840,7 +840,7 @@ namespace BizHawk.Emulation.DiscSystem SessionFormat.Type20_CDXA => CUE.CueTrackType.Mode2_2352, SessionFormat.Type10_CDI => CUE.CueTrackType.CDI_2352, SessionFormat.Type00_CDROM_CDDA => CUE.CueTrackType.Mode1_2352, - _ => pregapTrackType + _ => pregapTrackType, }; } for (var pre = 0; pre < track.ExtraBlock.Pregap; pre++) @@ -898,7 +898,7 @@ namespace BizHawk.Emulation.DiscSystem 2336 => new CUE.SS_Mode2_2336(), 2352 => new CUE.SS_2352(), 2448 => new CUE.SS_2448_Interleaved(), - _ => throw new InvalidOperationException($"Not supported: Sector Size {track.SectorSize}, Track Mode {track.TrackMode}") + _ => throw new InvalidOperationException($"Not supported: Sector Size {track.SectorSize}, Track Mode {track.TrackMode}"), }; sBase.Policy = IN_DiscMountPolicy; @@ -923,7 +923,7 @@ namespace BizHawk.Emulation.DiscSystem ino.BCDValue = track.Point switch { 0xA0 or 0xA1 or 0xA2 => (byte)track.Point, - _ => ino.BCDValue + _ => ino.BCDValue, }; // get ADR & Control from ADR_Control byte diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/NRG_format.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/NRG_format.cs index 35484c4945..45cc2059c8 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/NRG_format.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/NRG_format.cs @@ -469,7 +469,7 @@ namespace BizHawk.Emulation.DiscSystem "TINF" => 12, "ETNF" => 20, "ETN2" => 32, - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; if (chunkSize % trackSize != 0) @@ -985,7 +985,7 @@ namespace BizHawk.Emulation.DiscSystem SessionFormat.Type00_CDROM_CDDA => CueTrackType.Mode1_2352, SessionFormat.Type10_CDI => CueTrackType.CDI_2352, SessionFormat.Type20_CDXA => CueTrackType.Mode2_2352, - _ => cueTrackType + _ => cueTrackType, }; } disc._Sectors.Add(new SS_Gap @@ -1004,7 +1004,7 @@ namespace BizHawk.Emulation.DiscSystem 0x03 => new SS_Mode2_2336(), 0x05 or 0x06 or 0x07 => new SS_2352(), 0x0F or 0x10 or 0x11 => new SS_2448_Interleaved(), - _ => throw new InvalidOperationException($"Invalid mode {mode}") + _ => throw new InvalidOperationException($"Invalid mode {mode}"), }; } diff --git a/src/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_A0A1A2_Job.cs b/src/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_A0A1A2_Job.cs index a952831941..e2c3b11daa 100644 --- a/src/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_A0A1A2_Job.cs +++ b/src/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_A0A1A2_Job.cs @@ -58,7 +58,7 @@ namespace BizHawk.Emulation.DiscSystem SessionFormat.Type00_CDROM_CDDA => 0x00, SessionFormat.Type10_CDI => 0x10, SessionFormat.Type20_CDXA => 0x20, - _ => throw new InvalidOperationException("Invalid SessionFormat") + _ => throw new InvalidOperationException("Invalid SessionFormat"), }; sq.ap_frame.DecimalValue = 0; diff --git a/src/BizHawk.Tests.Testroms.GB/GB_GBC/AcidTestroms.cs b/src/BizHawk.Tests.Testroms.GB/GB_GBC/AcidTestroms.cs index 43958da3ad..fabff357d4 100644 --- a/src/BizHawk.Tests.Testroms.GB/GB_GBC/AcidTestroms.cs +++ b/src/BizHawk.Tests.Testroms.GB/GB_GBC/AcidTestroms.cs @@ -18,7 +18,7 @@ namespace BizHawk.Tests.Testroms.GB "cgb-acid-hell" => "res.cgb_acid_hell_artifact.reference.png", "cgb-acid2" => "res.cgb_acid2_artifact.reference.png", "dmg-acid2" => $"res.dmg_acid2_artifact.reference-{(Setup.Variant.IsColour() ? "cgb" : "dmg")}.png", - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; public readonly string RomEmbedPath => TestName switch @@ -26,7 +26,7 @@ namespace BizHawk.Tests.Testroms.GB "cgb-acid-hell" => "res.cgb_acid_hell_artifact.cgb-acid-hell.gbc", "cgb-acid2" => "res.cgb_acid2_artifact.cgb-acid2.gbc", "dmg-acid2" => "res.dmg_acid2_artifact.dmg-acid2.gb", - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; public readonly CoreSetup Setup; diff --git a/src/BizHawk.Tests.Testroms.GB/GB_GBC/GBHelper.cs b/src/BizHawk.Tests.Testroms.GB/GB_GBC/GBHelper.cs index b9a4eb0b47..bd5f79e68d 100644 --- a/src/BizHawk.Tests.Testroms.GB/GB_GBC/GBHelper.cs +++ b/src/BizHawk.Tests.Testroms.GB/GB_GBC/GBHelper.cs @@ -175,7 +175,7 @@ namespace BizHawk.Tests.Testroms.GB ConsoleVariant.CGB_C => biosAvailable ? SameBoySyncSettings_GBC_C_USEBIOS : SameBoySyncSettings_GBC_C_NOBIOS, ConsoleVariant.CGB_D => biosAvailable ? SameBoySyncSettings_GBC_D_USEBIOS : SameBoySyncSettings_GBC_D_NOBIOS, ConsoleVariant.DMG or ConsoleVariant.DMG_B => biosAvailable ? SameBoySyncSettings_GB_USEBIOS : SameBoySyncSettings_GB_NOBIOS, - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; public static DummyFrontend.ClassInitCallbackDelegate InitGBCore(CoreSetup setup, string romFilename, byte[] rom) @@ -196,7 +196,7 @@ namespace BizHawk.Tests.Testroms.GB Settings = SameBoySettings, SyncSettings = GetSameBoySyncSettings(setup.Variant, setup.UseBIOS), }), - _ => throw new InvalidOperationException("unknown GB core") + _ => throw new InvalidOperationException("unknown GB core"), }; var biosWaitDuration = setup.UseBIOS || setup.CoreName is CoreNames.Sameboy ? setup.Variant.IsColour() @@ -215,7 +215,7 @@ namespace BizHawk.Tests.Testroms.GB { CoreNames.Gambatte => ImageUtils.PaletteSwap(img, setup.Variant.IsColour() ? UnVividGBCPaletteMap : UnVividGBPaletteMap), CoreNames.Sameboy => setup.Variant.IsColour() ? ImageUtils.PaletteSwap(img, UnVividGBCPaletteMap) : img, - _ => img + _ => img, }; } } diff --git a/src/BizHawk.Tests.Testroms.GB/GB_GBC/MealybugTearoomTests.cs b/src/BizHawk.Tests.Testroms.GB/GB_GBC/MealybugTearoomTests.cs index aa25154efb..b14a44c6c6 100644 --- a/src/BizHawk.Tests.Testroms.GB/GB_GBC/MealybugTearoomTests.cs +++ b/src/BizHawk.Tests.Testroms.GB/GB_GBC/MealybugTearoomTests.cs @@ -263,7 +263,7 @@ namespace BizHawk.Tests.Testroms.GB GBHawk gbHawk => () => gbHawk.cpu.RegPC, Sameboy when testCase.Setup is { UseBIOS: false, Variant: ConsoleVariant.DMG or ConsoleVariant.DMG_B } => () => (long) fe.CoreAsDebuggable!.GetCpuFlagsAndRegisters()["PC"].Value - 1, // something something pre- vs. post-increment - _ => () => (long) fe.CoreAsDebuggable!.GetCpuFlagsAndRegisters()["PC"].Value + _ => () => (long) fe.CoreAsDebuggable!.GetCpuFlagsAndRegisters()["PC"].Value, }; var domain = fe.CoreAsMemDomains!.SystemBus; var finished = false; diff --git a/src/BizHawk.Tests/Client.Common/cheats/CheatDecoderTests.cs b/src/BizHawk.Tests/Client.Common/cheats/CheatDecoderTests.cs index 96d2913b02..d2d3e5a582 100644 --- a/src/BizHawk.Tests/Client.Common/cheats/CheatDecoderTests.cs +++ b/src/BizHawk.Tests/Client.Common/cheats/CheatDecoderTests.cs @@ -26,7 +26,7 @@ namespace BizHawk.Tests.Client.Common.cheats null => "null", int i => $"0x{i:X}", string s => $"\"{s}\"", - _ => o.ToString()! + _ => o.ToString()!, }; return data is null ? null : $"{methodInfo.Name}({string.Join(", ", data.Select(Format))})"; } @@ -69,7 +69,7 @@ namespace BizHawk.Tests.Client.Common.cheats { WatchSize.Byte => valid.Value & 0xFF, WatchSize.Word => valid.Value & 0xFFFF, - _ => valid.Value + _ => valid.Value, }, "wrong value"); Assert.AreEqual(compare, valid.Compare, "wrong compare");