Skip to content

Commit

Permalink
fix numbering in logitech pipe name
Browse files Browse the repository at this point in the history
  • Loading branch information
Aytackydln committed Dec 29, 2023
1 parent 72ca896 commit 697e116
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,18 @@ public LogitechPipeListenerService(ILogger logger, Plugin plugin)
_colors = new();
_excluded = new();

_pipeListener = new("LGS_LED_SDK-00000001");
var id = WTSGetActiveConsoleSessionId();
var pipeName = $"LGS_LED_SDK-{id:00000000}";
_pipeListener = new(pipeName);
_pipeListener.ClientConnected += OnPipeListenerClientConnected;
_pipeListener.ClientDisconnected += OnPipeListenerClientDisconnected;
_pipeListener.CommandReceived += OnPipeListenerCommandReceived;
_pipeListener.Exception += OnPipeListenerException;
}

[DllImport("kernel32.dll")]
private static extern uint WTSGetActiveConsoleSessionId();

private void OnPipeListenerException(object sender, Exception e)
{
_logger.Error(e, "Logitech wrapper reader exception ");
Expand Down

0 comments on commit 697e116

Please sign in to comment.