From ef9b1f9aa7b103de64a8b2212221532b15a1b4da Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Sun, 19 May 2024 00:18:46 +0100 Subject: [PATCH] multi instance launching: removal --- Bloxstrap/App.xaml.cs | 32 ------------------- Bloxstrap/Models/Settings.cs | 1 - .../Elements/Menu/Pages/IntegrationsPage.xaml | 6 ---- .../ViewModels/Menu/IntegrationsViewModel.cs | 6 ---- 4 files changed, 45 deletions(-) diff --git a/Bloxstrap/App.xaml.cs b/Bloxstrap/App.xaml.cs index d7ce739..f235dd4 100644 --- a/Bloxstrap/App.xaml.cs +++ b/Bloxstrap/App.xaml.cs @@ -223,28 +223,6 @@ namespace Bloxstrap dialog.Bootstrapper = bootstrapper; } - // handle roblox singleton mutex for multi-instance launching - // note we're handling it here in the main thread and NOT in the - // bootstrapper as handling mutexes in async contexts suuuuuucks - - Mutex? singletonMutex = null; - - if (Settings.Prop.MultiInstanceLaunching && LaunchSettings.RobloxLaunchMode == LaunchMode.Player) - { - Logger.WriteLine(LOG_IDENT, "Creating singleton mutex"); - - try - { - Mutex.OpenExisting("ROBLOX_singletonMutex"); - Logger.WriteLine(LOG_IDENT, "Warning - singleton mutex already exists!"); - } - catch - { - // create the singleton mutex before the game client does - singletonMutex = new Mutex(true, "ROBLOX_singletonMutex"); - } - } - Task bootstrapperTask = Task.Run(async () => await bootstrapper.Run()).ContinueWith(t => { Logger.WriteLine(LOG_IDENT, "Bootstrapper task has finished"); @@ -280,16 +258,6 @@ namespace Bloxstrap bootstrapperTask.Wait(); - if (singletonMutex is not null) - { - Logger.WriteLine(LOG_IDENT, "We have singleton mutex ownership! Running in background until all Roblox processes are closed"); - - // we've got ownership of the roblox singleton mutex! - // if we stop running, everything will screw up once any more roblox instances launched - while (Process.GetProcessesByName("RobloxPlayerBeta").Any()) - Thread.Sleep(5000); - } - StartupFinished(); } } diff --git a/Bloxstrap/Models/Settings.cs b/Bloxstrap/Models/Settings.cs index 0bb535f..a8f8469 100644 --- a/Bloxstrap/Models/Settings.cs +++ b/Bloxstrap/Models/Settings.cs @@ -12,7 +12,6 @@ namespace Bloxstrap.Models public Theme Theme { get; set; } = Theme.Default; public bool CheckForUpdates { get; set; } = true; public bool CreateDesktopIcon { get; set; } = true; - public bool MultiInstanceLaunching { get; set; } = false; [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonPropertyName("OhHeyYouFoundMeAgain")] diff --git a/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml index 0e74456..e22c336 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml @@ -59,12 +59,6 @@ - - - - diff --git a/Bloxstrap/UI/ViewModels/Menu/IntegrationsViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/IntegrationsViewModel.cs index 894aa7a..73cbdd1 100644 --- a/Bloxstrap/UI/ViewModels/Menu/IntegrationsViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/IntegrationsViewModel.cs @@ -88,12 +88,6 @@ namespace Bloxstrap.UI.ViewModels.Menu set => App.Settings.Prop.HideRPCButtons = !value; } - public bool MultiInstanceLaunchingEnabled - { - get => App.Settings.Prop.MultiInstanceLaunching; - set => App.Settings.Prop.MultiInstanceLaunching = value; - } - public bool DisableAppPatchEnabled { get => App.Settings.Prop.UseDisableAppPatch;