mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 14:17:06 +09:00
Add FPS display toggling.
Kinda temporary but better than nothing.
This commit is contained in:
@ -19,6 +19,7 @@ using osu.Game.Graphics.Cursor;
|
||||
using osu.Game.Graphics.Processing;
|
||||
using osu.Game.Online.API;
|
||||
using SQLite.Net;
|
||||
using osu.Framework.Graphics.Performance;
|
||||
|
||||
namespace osu.Game
|
||||
{
|
||||
@ -44,6 +45,8 @@ namespace osu.Game
|
||||
|
||||
public readonly Bindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();
|
||||
|
||||
private Bindable<bool> fpsDisplayVisible;
|
||||
|
||||
protected AssemblyName AssemblyName => Assembly.GetEntryAssembly()?.GetName() ?? new AssemblyName { Version = new Version() };
|
||||
|
||||
public bool IsDeployedBuild => AssemblyName.Version.Major > 0;
|
||||
@ -160,6 +163,15 @@ 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>(OsuConfig.ShowFpsDisplay);
|
||||
fpsDisplayVisible.ValueChanged += val =>
|
||||
{
|
||||
FrameStatisticsMode = val ? FrameStatisticsMode.Minimal : FrameStatisticsMode.None;
|
||||
};
|
||||
fpsDisplayVisible.TriggerChange();
|
||||
}
|
||||
|
||||
public override void SetHost(GameHost host)
|
||||
|
Reference in New Issue
Block a user