mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-23 08:47:10 +02:00
[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:
parent
981e0c082d
commit
40daca5684
9 changed files with 218 additions and 208 deletions
|
@ -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() { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue