Exemplo n.º 1
0
        public static void Load()
        {
            try
            {
                var ini = IniFile.ParseINI(GetConfigFileName());

                DpiScaling         = int.Parse(ini["UI"]["DpiScaling"]);
                CheckUpdates       = bool.Parse(ini["UI"]["CheckUpdates"]);
                InstrumentStopTime = int.Parse(ini["Audio"]["InstrumentStopTime"]);
                MidiDevice         = ini["MIDI"]["Device"];
            }
            catch
            {
            }

            if (DpiScaling != 100 && DpiScaling != 150 && DpiScaling != 200)
            {
                DpiScaling = 0;
            }

            InstrumentStopTime = Utils.Clamp(InstrumentStopTime, 0, 10);

            if (MidiDevice == null)
            {
                MidiDevice = "";
            }
        }