Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions osu.Desktop/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.IO;
using System.Runtime.Versioning;
using System.Threading;
using osu.Desktop.LegacyIpc;
using osu.Desktop.Windows;
using osu.Framework;
Expand Down Expand Up @@ -180,13 +181,21 @@
// or is running with pending imports via file association or otherwise.
//
// In both these scenarios, we'd hope the game does not attempt to update.
// However, in the case for pending imports, we still need to initialize Velopack if this is the first launch of the game.
//
// Special consideration for velopack startup arguments, which must be handled during update.
// See https://docs.velopack.io/integrating/hooks#command-line-hooks.
if (args.Length > 0 && !args[0].StartsWith("--velo", StringComparison.Ordinal))
{
Logger.Log("Handling arguments, skipping velopack setup.");
return;
string name = $"osu-framework-{OsuGame.IPC_PIPE_NAME}";

Check warning

Code scanning / InspectCode

Convert local variable or field into constant: Private accessibility Warning

Convert into constant
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
using (var mutex = new Mutex(false, $"Global\\{name}", out bool createdNew))

Check warning

Code scanning / InspectCode

Incorrect blank lines: Blank lines are missing elsewhere Warning

Blank lines are missing, expected minimum 1 instead of 0

Check warning

Code scanning / InspectCode

Unused local variable Warning

Local variable 'mutex' is never used
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
{
if (!createdNew)
{
Logger.Log("Handling arguments, not running as primary instance, skipping velopack setup.");
return;
}
}
}

if (OsuGameDesktop.IsPackageManaged)
Expand Down
Loading