Fix crashes
parent
2c845abb23
commit
44d6b3a216
|
@ -88,11 +88,18 @@ namespace stardew_access.ScreenReader
|
|||
|
||||
private void Speak(string text, bool interupt)
|
||||
{
|
||||
if (_speakProcess.HasExited) {
|
||||
InitializeScreenReader();
|
||||
}
|
||||
if (interupt)
|
||||
{
|
||||
_speakProcess.StandardInput.WriteLine("x");
|
||||
}
|
||||
_speakProcess.StandardInput.WriteLine($"s{text}");
|
||||
var lines = text.Split("\n").ToArray();
|
||||
foreach (var line in lines) {
|
||||
_speakProcess.StandardInput.WriteLine($"s{line}");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue