Now default to CLI mode when not running on windows, avoids the unintuitive method of the user having to know to change 'cli=true' in viewmode.cfg.

This commit is contained in:
UnknownShadow200 2016-07-28 16:09:14 +10:00
parent 568c855ca1
commit 2f29aeaccd

View File

@ -100,13 +100,16 @@ namespace MCGalaxy.Gui {
}
static void ReadViewmode() {
PlatformID platform = Environment.OSVersion.Platform;
useConsole = !(platform == PlatformID.Win32NT || platform == PlatformID.Win32Windows);
if (!File.Exists("Viewmode.cfg")) {
using (StreamWriter w = new StreamWriter("Viewmode.cfg")) {
w.WriteLine("#This file controls how the console window is shown to the server host");
w.WriteLine("#cli: True or False (Determines whether a CLI interface is used) (Set True if on Mono)");
w.WriteLine("#high-quality: True or false (Determines whether the GUI interface uses higher quality objects)");
w.WriteLine();
w.WriteLine("cli = false");
w.WriteLine("cli = " + useConsole);
w.WriteLine("high-quality = true");
}
}