Skip to content

Commit

Permalink
Update PCAudioDebugConsole.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarti856 committed Jan 2, 2024
1 parent 0dcc380 commit 95dd250
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Solutions/PCAudioDLL/PCAudioDebugConsole.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
using System.Windows.Forms;

namespace PCAudioDLL
Expand All @@ -18,11 +19,18 @@ internal static void WriteLine(string message)
{
if (TxtConsole.InvokeRequired)
{
TxtConsole.Invoke((MethodInvoker)delegate
try
{
TxtConsole.Invoke((MethodInvoker)delegate
{

TxtConsole.Text += message + Environment.NewLine;
});
TxtConsole.Text += message + Environment.NewLine;
});
}
catch(Exception ex)
{
Debug.Write(ex.Message);
}
}
else
{
Expand Down

0 comments on commit 95dd250

Please # to comment.