mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Merge branch 'v2_develop' of github.com:gui-cs/Terminal.Gui into v2_develop
This commit is contained in:
@@ -158,22 +158,14 @@ namespace Terminal.Gui {
|
|||||||
ConfigurationManager.Load (true);
|
ConfigurationManager.Load (true);
|
||||||
ConfigurationManager.Apply ();
|
ConfigurationManager.Apply ();
|
||||||
|
|
||||||
if (Driver == null) {
|
Driver ??= Environment.OSVersion.Platform switch {
|
||||||
var p = Environment.OSVersion.Platform;
|
_ when _forceFakeConsole => new FakeDriver (), // for unit testing only
|
||||||
if (_forceFakeConsole) {
|
_ when UseSystemConsole => new NetDriver (),
|
||||||
// For Unit Testing only
|
PlatformID.Win32NT or PlatformID.Win32S or PlatformID.Win32Windows => new WindowsDriver (),
|
||||||
Driver = new FakeDriver ();
|
_ => new CursesDriver (),
|
||||||
} else if (UseSystemConsole) {
|
};
|
||||||
Driver = new NetDriver ();
|
|
||||||
} else if (p == PlatformID.Win32NT || p == PlatformID.Win32S || p == PlatformID.Win32Windows) {
|
if (Driver == null) throw new InvalidOperationException ("Init could not determine the ConsoleDriver to use.");
|
||||||
Driver = new WindowsDriver ();
|
|
||||||
} else {
|
|
||||||
Driver = new CursesDriver ();
|
|
||||||
}
|
|
||||||
if (Driver == null) {
|
|
||||||
throw new InvalidOperationException ("Init could not determine the ConsoleDriver to use.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
MainLoop = Driver.Init ();
|
MainLoop = Driver.Init ();
|
||||||
|
|||||||
Reference in New Issue
Block a user