Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ SigningCertificate_Encoded.txt
*.zip
/QPlayerOld
/api
/TestProj
/TestResults
/QPlayer.Tests/CueListTests2.cs
/QPlayer.Tests/CueListTests3.cs
5 changes: 4 additions & 1 deletion QPlayer.MagicQCTRLPlugin/MagicQCTRLPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ private void MagicQCTRLTask()
driver?.OnMessageReceived -= Driver_OnMessageReceived;
MainViewModel.Log($"MagicQCTRL disconnected due to an error: {ex.Message}", MainViewModel.LogLevel.Warning);
}
driver?.Dispose();
finally
{
driver?.Dispose();
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion QPlayer.MagicQCTRLPlugin/QPlayer.MagicQCTRLPlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<EnableDynamicLoading>true</EnableDynamicLoading>
<UseWPF>true</UseWPF>

<Version>0.1.1</Version>
<Version>0.1.2</Version>
<Authors>Thomas Mathieson</Authors>
<Company>Thomas Mathieson</Company>
<Copyright>©️ Thomas Mathieson 2026</Copyright>
Expand Down
15 changes: 11 additions & 4 deletions QPlayer.MagicQCTRLPlugin/USBDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ internal class USBDriver : IDisposable

public void USBConnectAsync()
{
DeviceList.Local.Changed += (o, e) =>
{
USBConnect();
};
DeviceList.Local.Changed += OnDeviceListChangedHandler;
}

private void OnDeviceListChangedHandler(object? sender, EventArgs e)
{
USBConnect();
}

/// <summary>
Expand Down Expand Up @@ -203,6 +205,11 @@ public void Dispose()
usbRXTask?.Dispose();
}
catch { }
try
{
DeviceList.Local.Changed -= OnDeviceListChangedHandler;
}
catch { }
usbDevice = null;
OnConnectionStatusChanged?.Invoke(false);
isDisposing = false;
Expand Down
Loading
Loading