diagnosing netdriver wsl

This commit is contained in:
Tigger Kindel
2023-08-12 06:52:49 -06:00
committed by Tig
parent f056914835
commit 1f209098dd
2 changed files with 6 additions and 5 deletions

View File

@@ -657,16 +657,12 @@ internal class CursesDriver : ConsoleDriver {
Curses.StartColor ();
Curses.UseDefaultColors ();
Curses.CheckWinChange ();
}
CurrentAttribute = MakeColor (Color.White, Color.Black);
InitializeColorSchemes ();
ClearContents ();
TerminalResized = terminalResized;
StartReportingMouseMoves ();
if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX)) {
Clipboard = new MacOSXClipboard ();
@@ -679,7 +675,10 @@ internal class CursesDriver : ConsoleDriver {
}
if (_window != null) {
Curses.CheckWinChange ();
ClearContents ();
Curses.refresh ();
StartReportingMouseMoves ();
}
}

View File

@@ -3,6 +3,7 @@
//
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
@@ -554,7 +555,7 @@ internal class NetDriver : ConsoleDriver {
const int COLOR_BRIGHT_CYAN = 96;
const int COLOR_BRIGHT_WHITE = 97;
public override bool SupportsTrueColor => true;// Environment.OSVersion.Version.Build >= 14931;
public override bool SupportsTrueColor => Environment.OSVersion.Platform == PlatformID.Unix || (IsWinPlatform && Environment.OSVersion.Version.Build >= 14931);
public NetWinVTConsole NetWinConsole { get; private set; }
public bool IsWinPlatform { get; private set; }
@@ -617,6 +618,7 @@ internal class NetDriver : ConsoleDriver {
Rows = Console.WindowHeight;
} else {
// Simluate
throw new InvalidOperationException ("blah");
Cols = 80;
Rows = 25;
}