-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
42 lines (36 loc) · 1.17 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using DeckSurf.SDK.Core;
using System;
using System.Threading;
namespace MacroDeck.StreamDeckConnector
{
internal class Program
{
public static string Host { get; private set; } = "127.0.0.1:8191";
public static int LongPressDelay { get; private set; } = 1000;
[STAThread]
public static void Main(string[] args)
{
var exitSignal = new ManualResetEvent(false);
for (int i = 0; i < args.Length; i++)
{
try
{
switch (args[i].ToLower())
{
case "--host":
if (args[i + 1] == null) break;
Host = args[i + 1];
break;
case "--long-press-ms":
if (args[i + 1] == null) break;
LongPressDelay = Int32.Parse(args[i + 1]);
break;
}
} catch { }
}
Console.WriteLine($"Using host {Host}");
USBHelper.Initialize();
exitSignal.WaitOne();
}
}
}