Ejemplo n.º 1
0
        static RunStatus Run()
        {
            if (Settings.Graphics.MaxFramerate < 1)
            {
                Settings.Graphics.MaxFramerate = new GraphicSettings().MaxFramerate;
                Settings.Graphics.CapFramerate = false;
            }

            try
            {
                Loop();
            }
            finally
            {
                // Ensure that the active replay is properly saved
                if (OrderManager != null)
                {
                    OrderManager.Dispose();
                }
            }

            if (worldRenderer != null)
            {
                worldRenderer.Dispose();
            }
            ModData.Dispose();
            ChromeProvider.Deinitialize();

            Sound.Dispose();
            Renderer.Dispose();

            OnQuit();

            return(state);
        }