diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-11-09 21:41:04 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-11-09 21:41:04 -0500 |
commit | 76e5588f02b247204969efb488c3fb293601faeb (patch) | |
tree | e6c9d6b257a00ba0cc1f221b7ebcc53c7354d0a4 /src/SMAPI/Framework/SCore.cs | |
parent | beb0b0aaf4e349cf911504a72b484d5642f6ac58 (diff) | |
download | SMAPI-76e5588f02b247204969efb488c3fb293601faeb.tar.gz SMAPI-76e5588f02b247204969efb488c3fb293601faeb.tar.bz2 SMAPI-76e5588f02b247204969efb488c3fb293601faeb.zip |
add option to disable console input
Diffstat (limited to 'src/SMAPI/Framework/SCore.cs')
-rw-r--r-- | src/SMAPI/Framework/SCore.cs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index 40979b09..7bb54653 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -447,14 +447,17 @@ namespace StardewModdingAPI.Framework this.Monitor.Log("SMAPI found problems in your game's content files which are likely to cause errors or crashes. Consider uninstalling XNB mods or reinstalling the game.", LogLevel.Error); // start SMAPI console - new Thread( - () => this.LogManager.RunConsoleInputLoop( - commandManager: this.CommandManager, - reloadTranslations: this.ReloadTranslations, - handleInput: input => this.RawCommandQueue.Add(input), - continueWhile: () => this.IsGameRunning && !this.IsExiting - ) - ).Start(); + if (this.Settings.ListenForConsoleInput) + { + new Thread( + () => this.LogManager.RunConsoleInputLoop( + commandManager: this.CommandManager, + reloadTranslations: this.ReloadTranslations, + handleInput: input => this.RawCommandQueue.Add(input), + continueWhile: () => this.IsGameRunning && !this.IsExiting + ) + ).Start(); + } } /// <summary>Raised after an instance finishes loading its initial content.</summary> |