multi instance launching: removal

This commit is contained in:
pizzaboxer 2024-05-19 00:18:46 +01:00
parent 374feedb11
commit ef9b1f9aa7
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
4 changed files with 0 additions and 45 deletions

View File

@ -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();
}
}

View File

@ -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")]

View File

@ -59,12 +59,6 @@
<TextBlock Text="{x:Static resources:Strings.Common_Miscellaneous}" FontSize="16" FontWeight="Medium" Margin="0,16,0,0" />
<controls:OptionControl
Header="{x:Static resources:Strings.Menu_Integrations_AllowMultipleInstances_Title}"
Description="{x:Static resources:Strings.Menu_Integrations_AllowMultipleInstances_Description}">
<ui:ToggleSwitch IsChecked="{Binding MultiInstanceLaunchingEnabled, Mode=TwoWay}" />
</controls:OptionControl>
<TextBlock Text="{x:Static resources:Strings.Menu_Integrations_Custom_Title}" FontSize="16" FontWeight="Medium" Margin="0,16,0,0" />
<TextBlock Text="{x:Static resources:Strings.Menu_Integrations_Custom_Description}" TextWrapping="Wrap" Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
<Grid Margin="0,8,0,0">

View File

@ -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;