diff --git a/.gitignore b/.gitignore index 7097de6024..33ff47e0df 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,7 @@ *.userprefs # Build results -[Dd]ebug/ +bin/[Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ diff --git a/osu.Game/Overlays/Options/Sections/Debug/GCOptions.cs b/osu.Game/Overlays/Options/Sections/Debug/GCOptions.cs new file mode 100644 index 0000000000..2f04bfe88b --- /dev/null +++ b/osu.Game/Overlays/Options/Sections/Debug/GCOptions.cs @@ -0,0 +1,37 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using System.Runtime; +using osu.Framework.Allocation; +using osu.Framework.Configuration; +using osu.Framework.Graphics; +using osu.Game.Configuration; +using osu.Game.Graphics.UserInterface; + +namespace osu.Game.Overlays.Options.Sections.Debug +{ + public class GCOptions : OptionsSubsection + { + protected override string Header => "Garbage Collector"; + + [BackgroundDependencyLoader] + private void load(FrameworkDebugConfigManager config) + { + Children = new Drawable[] + { + new OptionEnumDropDown + { + LabelText = "Active mode", + Bindable = config.GetBindable(FrameworkDebugConfig.ActiveGCMode) + }, + new OsuButton + { + RelativeSizeAxes = Axes.X, + Text = "Force garbage collection", + Action = () => GC.Collect() + }, + }; + } + } +}