From 40daca5684afdc8a62dfcb1beb27c58b5262c9e7 Mon Sep 17 00:00:00 2001 From: TSRBerry <20988865+TSRBerry@users.noreply.github.com> Date: Wed, 28 Jun 2023 19:03:27 +0200 Subject: [Ryujinx.Headless.SDL2] Address dotnet-format issues (#5379) * dotnet format style --severity info Some changes were manually reverted. * dotnet format analyzers --serverity info Some changes have been minimally adapted. * Restore a few unused methods and variables * Address or silence dotnet format CA1806 and a few CA1854 warnings * Address most dotnet format whitespace warnings * Apply dotnet format whitespace formatting A few of them have been manually reverted and the corresponding warning was silenced * Simplify properties and array initialization, Use const when possible, Remove trailing commas * Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas" This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e. * dotnet format whitespace after rebase * First dotnet format pass * Add trailing commas * Fix naming and formatting issues --- src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs') diff --git a/src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs b/src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs index 5d048da1..f2f337a5 100644 --- a/src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs +++ b/src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs @@ -10,7 +10,7 @@ namespace Ryujinx.Headless.SDL2.Vulkan { class VulkanWindow : WindowBase { - private GraphicsDebugLevel _glLogLevel; + private readonly GraphicsDebugLevel _glLogLevel; public VulkanWindow( InputManager inputManager, @@ -33,16 +33,16 @@ namespace Ryujinx.Headless.SDL2.Vulkan MouseDriver.SetClientSize(DefaultWidth, DefaultHeight); } - private void BasicInvoke(Action action) + private static void BasicInvoke(Action action) { action(); } - public unsafe IntPtr CreateWindowSurface(IntPtr instance) + public IntPtr CreateWindowSurface(IntPtr instance) { ulong surfaceHandle = 0; - Action createSurface = () => + void CreateSurface() { if (SDL_Vulkan_CreateSurface(WindowHandle, instance, out surfaceHandle) == SDL_bool.SDL_FALSE) { @@ -52,15 +52,15 @@ namespace Ryujinx.Headless.SDL2.Vulkan throw new Exception(errorMessage); } - }; + } if (SDL2Driver.MainThreadDispatcher != null) { - SDL2Driver.MainThreadDispatcher(createSurface); + SDL2Driver.MainThreadDispatcher(CreateSurface); } else { - createSurface(); + CreateSurface(); } return (IntPtr)surfaceHandle; @@ -101,4 +101,4 @@ namespace Ryujinx.Headless.SDL2.Vulkan protected override void SwapBuffers() { } } -} \ No newline at end of file +} -- cgit v1.2.3