Merge remote-tracking branch 'upstream/master' into tournament-tools

This commit is contained in:
Dean Herbert
2019-03-02 13:11:34 +09:00
614 changed files with 7332 additions and 3325 deletions

View File

@ -8,7 +8,7 @@ using System.Linq;
using System.Reflection;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Configuration;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.IO.Stores;
@ -75,9 +75,9 @@ namespace osu.Game
private Bindable<bool> fpsDisplayVisible;
protected AssemblyName AssemblyName => Assembly.GetEntryAssembly()?.GetName() ?? new AssemblyName { Version = new Version() };
public virtual Version AssemblyVersion => Assembly.GetEntryAssembly()?.GetName().Version ?? new Version();
public bool IsDeployedBuild => AssemblyName.Version.Major > 0;
public bool IsDeployedBuild => AssemblyVersion.Major > 0;
public string Version
{
@ -86,8 +86,8 @@ namespace osu.Game
if (!IsDeployedBuild)
return @"local " + (DebugUtils.IsDebug ? @"debug" : @"release");
var assembly = AssemblyName;
return $@"{assembly.Version.Major}.{assembly.Version.Minor}.{assembly.Version.Build}";
var version = AssemblyVersion;
return $@"{version.Major}.{version.Minor}.{version.Build}";
}
}
@ -209,7 +209,7 @@ namespace osu.Game
// TODO: This is temporary until we reimplement the local FPS display.
// It's just to allow end-users to access the framework FPS display without knowing the shortcut key.
fpsDisplayVisible = LocalConfig.GetBindable<bool>(OsuSetting.ShowFpsDisplay);
fpsDisplayVisible.ValueChanged += val => { FrameStatisticsMode = val ? FrameStatisticsMode.Minimal : FrameStatisticsMode.None; };
fpsDisplayVisible.ValueChanged += visible => { FrameStatisticsMode = visible.NewValue ? FrameStatisticsMode.Minimal : FrameStatisticsMode.None; };
fpsDisplayVisible.TriggerChange();
}