1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 19:27:24 +08:00

Only associate on a deployed build

Helps to reduce clutter when developing
This commit is contained in:
Susko3 2024-02-03 17:23:59 +01:00
parent 03578821c0
commit 2bac09ee00

View File

@ -134,10 +134,11 @@ namespace osu.Desktop
LoadComponentAsync(new DiscordRichPresence(), Add);
if (RuntimeInfo.OS == RuntimeInfo.Platform.Windows && OperatingSystem.IsWindows())
{
if (RuntimeInfo.OS == RuntimeInfo.Platform.Windows)
LoadComponentAsync(new GameplayWinKeyBlocker(), Add);
if (OperatingSystem.IsWindows() && IsDeployedBuild)
{
string? executableLocation = Path.GetDirectoryName(typeof(OsuGameDesktop).Assembly.Location);
LoadComponentAsync(new WindowsAssociationManager(Path.Join(executableLocation, @"osu!.exe"), "osu"), Add);
}