Example #1
0
        public static void ApplySettings(IDebugSettings settings)
        {
            Debug.RemoveAllOutputStreams();
            Debug.RemoveAllPrefixes();

            Debug.PrefixLookupMode = (PrefixLookupSettings)settings.PrefixLookupFlags;

            SeverityFilter = settings.SeverityFilter;

            Debug.AdlEnabled      = settings.Enabled;
            Debug.AdlWarningMask  = 0;
            Debug.CheckForUpdates = settings.SearchForUpdates;
            Debug.AdlWarningMask  = -1;
            Debug.SendWarnings    = settings.SendInternalWarnings;
            Debug.UpdateMask      = -1;

            Debug.SetAllPrefixes(settings.StageNames);

            Debug.AddPrefixForMask(0, "[Silent]");

            foreach (ILogStreamSettings logStreamSettings in settings.Streams)
            {
                Debug.AddOutputStream(OpenStream(logStreamSettings));
            }


            CrashConfig cconf = new CrashConfig();

            cconf.CrashMask       = -1;
            cconf.CheckForUpdates = settings.SearchForUpdates;
            CrashHandler.Initialize(cconf);
        }
Example #2
0
        private static void Main(string[] args)
        {
            //ADL Setup
            Debug.DefaultInitialization();
            CrashHandler.Initialize();

            Core.CLI._Main(args);
#if DEBUG
            Console.ReadLine();
#endif
        }
Example #3
0
        public GameBase(OsuMode mode = OsuMode.Unknown)
        {
            startupMode = mode;
            Instance    = this;

            CrashHandler.Initialize();

            //initialise config before everything, because it may be used in Initialize() override.
            Config = new pConfigManager(Instance.PathConfig + "osum.cfg");

            Clock.USER_OFFSET = Config.GetValue("offset", 0);
        }
Example #4
0
        /// <summary>
        /// Function that sets up ADL to operate with the DebugLevel enum and more.
        /// </summary>
        private static void InitAdl()
        {
            CrashHandler.Initialize((int)DebugLevel.INTERNAL_ERROR, false);
            Debug.LoadConfig((AdlConfig) new AdlConfig().GetStandard());
            Debug.SetAllPrefixes("[ERRORS]", "[WARNINGS]", "[LOGS]", "[INTERNAL_ERROR]", "[PROGRESS]");
            Debug.AddPrefixForMask(-1, "[ALL]");
            Debug.CheckForUpdates = false;
            Debug.AdlWarningMask  = (int)DebugLevel.WARNINGS;
            lts = new LogTextStream(
                Console.OpenStandardOutput(),
                -1,
                MatchType.MatchAll,
                false);

            Debug.AddOutputStream(lts);
        }
Example #5
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            VersionString = Assembly.GetExecutingAssembly().GetName().Version.ToString();
            CrashHandler.Initialize();
            PSO2AttackNameHelper.Initialize(true); //force download every time, small file anyways.

            UpgradeSettings();
            ParseArgs(e.Args);

            AccentColorUtility.ReloadActiveColor();

            RenderOptions.ProcessRenderMode = Settings.Default.SoftwareRenderingEnabled ? System.Windows.Interop.RenderMode.SoftwareOnly : System.Windows.Interop.RenderMode.Default; //set this before creating any windows

            var window = new MainWindow();

            App.Current.MainWindow = window;
            window.ViewModel       = new MainWindowViewModel();
            window.Show();
        }