[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
This commit is contained in:
TSRBerry 2023-06-28 19:03:27 +02:00 committed by GitHub
parent 981e0c082d
commit 40daca5684
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 218 additions and 208 deletions

View file

@ -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() { }
}
}
}