diff options
author | TSRBerry <20988865+TSRBerry@users.noreply.github.com> | 2023-06-28 19:03:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 19:03:27 +0200 |
commit | 40daca5684afdc8a62dfcb1beb27c58b5262c9e7 (patch) | |
tree | 0b4fc882c96771a5a7b4efa54085cf3dd5c15b42 /src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs | |
parent | 981e0c082d8b55e65b7bd9ef07c92ed761b88ab7 (diff) |
[Ryujinx.Headless.SDL2] Address dotnet-format issues (#5379)1.1.939
* 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
Diffstat (limited to 'src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs')
-rw-r--r-- | src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs | 16 |
1 files changed, 8 insertions, 8 deletions
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 +} |