Skip to content

Commit

Permalink
Launch daemon exe when running on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
X9VoiD committed Sep 20, 2020
1 parent f24b739 commit 4f2ac0d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions OpenTabletDriver.UX/DaemonWatchdog.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Timers;

namespace OpenTabletDriver.UX
Expand Down Expand Up @@ -28,6 +29,12 @@ public class DaemonWatchdog: IDisposable

public void Start()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
daemonProcess.StartInfo.FileName = "OpenTabletDriver.Daemon.exe";
daemonProcess.StartInfo.Arguments = null;
}

this.daemonProcess.Start();
this.watchdogTimer.Start();
this.watchdogTimer.Elapsed += (sender, e) =>
Expand Down

0 comments on commit 4f2ac0d

Please sign in to comment.