summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/SCore.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-11-09 21:41:04 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-11-09 21:41:04 -0500
commit76e5588f02b247204969efb488c3fb293601faeb (patch)
treee6c9d6b257a00ba0cc1f221b7ebcc53c7354d0a4 /src/SMAPI/Framework/SCore.cs
parentbeb0b0aaf4e349cf911504a72b484d5642f6ac58 (diff)
downloadSMAPI-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.cs19
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>