Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlm committed Jan 2, 2025
1 parent 1e61653 commit 6af70f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Consolonia.PlatformSupport/PlatformSupportExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
using Consolonia.PlatformSupport;

// ReSharper disable CheckNamespace
#pragma warning disable IDE0130
#pragma warning disable IDE0161
namespace Consolonia
#pragma warning restore IDE0130
#pragma warning restore IDE0161
{
public static class PlatformSupportExtensions
Expand All @@ -20,12 +22,14 @@ public static AppBuilder UseAutoDetectedConsole(this AppBuilder builder)
// in design mode we can't use any console operations at all, so we use a dummy IConsole.
return builder.UseConsole(new DummyConsole());

#pragma warning disable CA1416
IConsole console = Environment.OSVersion.Platform switch
{
PlatformID.Win32S or PlatformID.Win32Windows or PlatformID.Win32NT => new Win32Console(),
PlatformID.Unix or PlatformID.MacOSX => new CursesConsole(),
_ => new DefaultNetConsole()
};
#pragma warning restore CA1416

return builder.UseConsole(console).UseAutoDetectConsoleColorMode();
}
Expand Down
3 changes: 1 addition & 2 deletions src/Consolonia.PlatformSupport/WindowsConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private void StartEventLoop()
});
}

private bool HandleMouseInput(MOUSE_EVENT_RECORD mouseEvent)
private void HandleMouseInput(MOUSE_EVENT_RECORD mouseEvent)
{
var point = new Point(mouseEvent.dwMousePosition.X, mouseEvent.dwMousePosition.Y);
RawInputModifiers inputModifiers =
Expand Down Expand Up @@ -237,7 +237,6 @@ private bool HandleMouseInput(MOUSE_EVENT_RECORD mouseEvent)
throw new InvalidOperationException(mouseEvent.dwEventFlags.ToString());
}
_mouseButtonsState = mouseEvent.dwButtonState;
return true;
}

private void HandleKeyInput(KEY_EVENT_RECORD keyEvent)
Expand Down

0 comments on commit 6af70f9

Please sign in to comment.