mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Warn if launching multiple instances (#606)
This commit is contained in:
parent
f662d0d8c3
commit
243ebbef5a
@ -210,6 +210,21 @@ namespace Bloxstrap
|
||||
if (!IsFirstRun)
|
||||
ShouldSaveConfigs = true;
|
||||
|
||||
if (Mutex.TryOpenExisting("ROBLOX_singletonMutex", out var _))
|
||||
{
|
||||
var result = Frontend.ShowMessageBox(
|
||||
"Roblox is currently running, and launching another instance will close it. Are you sure you want to continue launching?",
|
||||
MessageBoxImage.Warning,
|
||||
MessageBoxButton.YesNo
|
||||
);
|
||||
|
||||
if (result != MessageBoxResult.Yes)
|
||||
{
|
||||
StartupFinished();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// start bootstrapper and show the bootstrapper modal if we're not running silently
|
||||
Logger.WriteLine(LOG_IDENT, "Initializing bootstrapper");
|
||||
Bootstrapper bootstrapper = new(LaunchSettings.RobloxLaunchArgs, LaunchSettings.RobloxLaunchMode);
|
||||
|
@ -112,7 +112,7 @@ namespace Bloxstrap.UI.Elements.ContextMenu
|
||||
|
||||
private void LogTracerMenuItem_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Utilities.ShellExecute(_activityWatcher?.LogLocation);
|
||||
Utilities.ShellExecute(_activityWatcher?.LogLocation!);
|
||||
}
|
||||
|
||||
private void CloseRobloxMenuItem_Click(object sender, RoutedEventArgs e)
|
||||
|
Loading…
Reference in New Issue
Block a user