From c6dcb71d92165d8adc1fe18b05a45f95fbaebbf5 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Fri, 26 Mar 2021 10:43:20 +1000 Subject: [PATCH] Remove goto from PCESoundDebugger.UpdateAfter --- .../tools/PCE/PCESoundDebugger.cs | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/BizHawk.Client.EmuHawk/tools/PCE/PCESoundDebugger.cs b/src/BizHawk.Client.EmuHawk/tools/PCE/PCESoundDebugger.cs index 33ed071c8e..5c3daa4ed3 100644 --- a/src/BizHawk.Client.EmuHawk/tools/PCE/PCESoundDebugger.cs +++ b/src/BizHawk.Client.EmuHawk/tools/PCE/PCESoundDebugger.cs @@ -63,24 +63,31 @@ namespace BizHawk.Client.EmuHawk lvChannels.Items[i].SubItems[1].Text = "-"; lvChannels.Items[i].SubItems[2].Text = "-"; lvChannels.Items[i].SubItems[3].Text = "(disabled)"; - goto DEAD; + _lastSamples[i] = null; + continue; } if (ch.DDA) { lvChannels.Items[i].SubItems[1].Text = "-"; lvChannels.Items[i].SubItems[2].Text = "-"; lvChannels.Items[i].SubItems[3].Text = "(DDA)"; - goto DEAD; + _lastSamples[i] = null; + continue; } lvChannels.Items[i].SubItems[1].Text = ch.Volume.ToString(); lvChannels.Items[i].SubItems[2].Text = ch.Frequency.ToString(); if (ch.NoiseChannel) { lvChannels.Items[i].SubItems[3].Text = "(noise)"; - goto DEAD; + _lastSamples[i] = null; + continue; } - if (ch.Volume == 0) goto DEAD; + if (ch.Volume == 0) + { + _lastSamples[i] = null; + continue; + } lvChannels.Items[i].SubItems[3].Text = "-"; @@ -135,11 +142,6 @@ namespace BizHawk.Client.EmuHawk } lvChannels.Items[i].SubItems[3].Text = _psgEntryTable[md5].Name; - - continue; - - DEAD: - _lastSamples[i] = null; } if (sync)