summaryrefslogtreecommitdiff
path: root/grapher/Program.cs
diff options
context:
space:
mode:
authorJacobPalecki <[email protected]>2020-09-22 19:59:47 -0700
committerGitHub <[email protected]>2020-09-22 19:59:47 -0700
commit77f420cf45a1a0bee00602965e687097367e2a70 (patch)
treefa088af8f2feb54df5bcb6a036715fd32d0511e8 /grapher/Program.cs
parentMerge pull request #21 from JacobPalecki/GUI (diff)
parentUpdate credits (diff)
downloadrawaccel-77f420cf45a1a0bee00602965e687097367e2a70.tar.xz
rawaccel-77f420cf45a1a0bee00602965e687097367e2a70.zip
Merge pull request #22 from JacobPalecki/GUI
Replace SigmoidGain with Motivity & Cleanup
Diffstat (limited to 'grapher/Program.cs')
-rw-r--r--grapher/Program.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/grapher/Program.cs b/grapher/Program.cs
index 85fd040..485e074 100644
--- a/grapher/Program.cs
+++ b/grapher/Program.cs
@@ -11,9 +11,19 @@ namespace grapher
[STAThread]
static void Main()
{
+ var mutex = new System.Threading.Mutex(true, "RawAccelGrapher", out bool result);
+
+ if (!result)
+ {
+ MessageBox.Show("Another instance of the Raw Accel Grapher is already running.");
+ return;
+ }
+
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new RawAcceleration());
+
+ GC.KeepAlive(mutex);
}
}
}