Skip to content

Commit

Permalink
Merge pull request #23 from Aytackydln/master
Browse files Browse the repository at this point in the history
Fix numbering in logitech pipe name
  • Loading branch information
diogotr7 authored Dec 29, 2023
2 parents 72ca896 + 697e116 commit 3ce5cef
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 3ce5cef

Please sign in to comment.