Skip to content

Commit cb65ea3

Browse files
committed
fix multiple instances sometimes being able to be opened
1 parent 058ec2b commit cb65ea3

4 files changed

Lines changed: 14 additions & 13 deletions

File tree

FlashpointSecurePlayer/FlashpointSecurePlayer.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,22 @@ public partial class FlashpointSecurePlayer : Form {
2020
private const string APPLICATION_MUTEX_NAME = "Flashpoint Secure Player";
2121
private const string FLASHPOINT_LAUNCHER_PARENT_PROCESS_EXE_FILE_NAME = "cmd.exe";
2222
private const string FLASHPOINT_LAUNCHER_PROCESS_NAME = "flashpoint";
23+
private Mutex ApplicationMutex = null;
2324
private static SemaphoreSlim ModificationsSemaphoreSlim = new SemaphoreSlim(1, 1);
2425
private readonly RunAsAdministrator RunAsAdministrator;
2526
private readonly ModeTemplates ModeTemplates;
2627
private readonly EnvironmentVariables EnvironmentVariables;
2728
private readonly DownloadsBefore DownloadsBefore;
2829
private readonly RegistryBackups RegistryBackup;
2930
private readonly SingleInstance SingleInstance;
30-
string ModificationsName = ACTIVE_EXE_CONFIGURATION_NAME;
31-
bool RunAsAdministratorModification = false;
32-
List<string> DownloadsBeforeModificationNames = null;
33-
bool ActiveX = false;
34-
string Server = null;
35-
string Software = null;
36-
ProcessStartInfo SoftwareProcessStartInfo = null;
37-
public delegate void ErrorDelegate(string text);
31+
private string ModificationsName = ACTIVE_EXE_CONFIGURATION_NAME;
32+
private bool RunAsAdministratorModification = false;
33+
private List<string> DownloadsBeforeModificationNames = null;
34+
private bool ActiveX = false;
35+
private string Server = null;
36+
private string Software = null;
37+
private ProcessStartInfo SoftwareProcessStartInfo = null;
38+
private delegate void ErrorDelegate(string text);
3839

3940
public FlashpointSecurePlayer() {
4041
InitializeComponent();
@@ -515,7 +516,7 @@ private async void FlashpointSecurePlayer_Load(object sender, EventArgs e) {
515516
// default to false in case of error
516517
bool createdNew = false;
517518
// signals the Mutex if it has not been
518-
Mutex flashpointSecurePlayerMutex = new Mutex(true, APPLICATION_MUTEX_NAME, out createdNew);
519+
ApplicationMutex = new Mutex(true, APPLICATION_MUTEX_NAME, out createdNew);
519520

520521
if (!createdNew) {
521522
// multiple instances open, blow up immediately

FlashpointSecurePlayer/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
// You can specify all the values or you can default the Build and Revision Numbers
3434
// by using the '*' as shown below:
3535
// [assembly: AssemblyVersion("1.0.*")]
36-
[assembly: AssemblyVersion("1.0.5.0")]
37-
[assembly: AssemblyFileVersion("1.0.5.0")]
36+
[assembly: AssemblyVersion("1.0.6.0")]
37+
[assembly: AssemblyFileVersion("1.0.6.0")]
3838
[assembly: NeutralResourcesLanguage("en")]
3939

FlashpointSecurePlayer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Flashpoint Secure Player 1.0.5
1+
# Flashpoint Secure Player 1.0.6
22
This player attempts to solve common compatibility or portability issues posed by browser plugins on Windows for the purpose of playback in BlueMaxima's Flashpoint.
33

44
It is compatible with Windows 7, Windows 8, Windows 8.1 and Windows 10, and requires .NET Framework 4.5. If you are on Windows 8.1 or Windows 10, or if you are on Windows 7/8 and have updates enabled, you already have .NET Framework 4.5. Otherwise, you may [download .NET Framework 4.5.](http://www.microsoft.com/en-us/download/details.aspx?id=30653)

FlashpointSecurePlayer/Server.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
namespace FlashpointSecurePlayer {
1616
public partial class Server : Form {
1717
private CustomSecurityManager CustomSecurityManager;
18-
public Uri WebBrowserURL = null;
18+
private Uri WebBrowserURL = null;
1919

2020
public Server(Uri WebBrowserURL) {
2121
InitializeComponent();

0 commit comments

Comments
 (0)