diff options
| author | JacobPalecki <[email protected]> | 2020-09-22 19:59:47 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-09-22 19:59:47 -0700 |
| commit | 77f420cf45a1a0bee00602965e687097367e2a70 (patch) | |
| tree | fa088af8f2feb54df5bcb6a036715fd32d0511e8 /grapher/Program.cs | |
| parent | Merge pull request #21 from JacobPalecki/GUI (diff) | |
| parent | Update credits (diff) | |
| download | rawaccel-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.cs | 10 |
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); } } } |