mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Hack to use UseSystemConsole passed in the command line arguments.
This commit is contained in:
@@ -153,6 +153,7 @@ namespace Terminal.Gui {
|
||||
|
||||
internal static bool _initialized = false;
|
||||
internal static int _mainThreadId = -1;
|
||||
private static bool? _useSystemConsole;
|
||||
|
||||
// INTERNAL function for initializing an app with a Toplevel factory object, driver, and mainloop.
|
||||
//
|
||||
@@ -181,6 +182,9 @@ namespace Terminal.Gui {
|
||||
Driver = driver;
|
||||
}
|
||||
|
||||
// @tig this is a hack to restore the UseSystemConsole take from the args
|
||||
_useSystemConsole = _useSystemConsole == null ? UseSystemConsole : _useSystemConsole;
|
||||
|
||||
// Start the process of configuration management.
|
||||
// Note that we end up calling LoadConfigurationFromAllSources
|
||||
// multiple times. We need to do this because some settings are only
|
||||
@@ -189,6 +193,10 @@ namespace Terminal.Gui {
|
||||
ConfigurationManager.Load (true);
|
||||
ConfigurationManager.Apply ();
|
||||
|
||||
if (UseSystemConsole != _useSystemConsole) {
|
||||
UseSystemConsole = (bool)_useSystemConsole;
|
||||
}
|
||||
|
||||
if (Driver == null) {
|
||||
var p = Environment.OSVersion.Platform;
|
||||
if (_forceFakeConsole) {
|
||||
|
||||
Reference in New Issue
Block a user