Skip to content

Commit

Permalink
Add allow multiple Roblox instances
Browse files Browse the repository at this point in the history
  • Loading branch information
6ixfalls committed Dec 28, 2022
1 parent 679466b commit 197d01f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions Bloxstrap/Dialogs/Preferences.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
</StackPanel>
<StackPanel Grid.Column="1" VerticalAlignment="Top">
<CheckBox x:Name="CheckBoxDisableAppPatch" Content=" Disable desktop app" Margin="5" IsChecked="{Binding ModDisableAppPatch, Mode=TwoWay}" />
<CheckBox x:Name="CheckBoxAllowMultipleInstances" Content=" Allow multiple instances" Margin="5" IsChecked="{Binding ModAllowMultipleInstances, Mode=TwoWay}" />
</StackPanel>
</Grid>
<Button x:Name="ButtonOpenModFolder" Content="{Binding ModFolderButtonText, Mode=OneTime}" IsEnabled="{Binding ModFolderButtonEnabled, Mode=OneTime}" VerticalAlignment="Bottom" Height="23" Margin="5,5,5,5" Click="ButtonOpenModFolder_Click" />
Expand Down
6 changes: 6 additions & 0 deletions Bloxstrap/Dialogs/Preferences.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ public bool ModDisableAppPatch
set => Program.Settings.UseDisableAppPatch = value;
}

public bool ModAllowMultipleInstances
{
get => Program.Settings.UseAllowMultipleInstances;
set => Program.Settings.UseAllowMultipleInstances = value;
}

public bool ModFolderButtonEnabled { get; } = !Program.IsFirstRun;
public string ModFolderButtonText { get; } = Program.IsFirstRun ? "Custom mods can be added after installing Bloxstrap" : "Open mod folder";
#endregion
Expand Down
1 change: 1 addition & 0 deletions Bloxstrap/Models/SettingsFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ public class SettingsFormat
public bool UseOldDeathSound { get; set; } = true;
public bool UseOldMouseCursor { get; set; } = false;
public bool UseDisableAppPatch { get; set; } = false;
public bool UseAllowMultipleInstances { get; set; } = true;
}
}
4 changes: 4 additions & 0 deletions Bloxstrap/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ static void Main(string[] args)

if (!String.IsNullOrEmpty(commandLine))
{
// Allow roblox to have multiple instances
if (Settings.UseAllowMultipleInstances)
new Mutex(true, "ROBLOX_singletonMutex");

DeployManager.Channel = Settings.Channel;
Settings.BootstrapperStyle.Show(new Bootstrapper(commandLine));
}
Expand Down

0 comments on commit 197d01f

Please sign in to comment.