Skip to content

Commit

Permalink
Might have solved the tape issue
Browse files Browse the repository at this point in the history
  • Loading branch information
EngstromJimmy committed Jul 21, 2022
1 parent 3b49ad3 commit 36d0f5c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Platforms/ZXBox.Blazor/Components/EmulatorComponent.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,17 @@ private async void GameLoop_Elapsed(object sender, ElapsedEventArgs e)
sw.Stop();
if (tapePlayer != null && tapePlayer.IsPlaying)
{
TapeStopped = false;
PercentLoaded = ((Convert.ToDouble(tapePlayer.CurrentTstate) / Convert.ToDouble(tapePlayer.TotalTstates)) * 100);
await InvokeAsync(() => StateHasChanged());
}
if (!TapeStopped && !tapePlayer.IsPlaying)
{
TapeStopped = true;
await InvokeAsync(() => StateHasChanged());
}
}

bool TapeStopped = false;
GCHandle gchsound;
IntPtr pinnedsound;
WebAssemblyJSRuntime mono;
Expand Down

0 comments on commit 36d0f5c

Please sign in to comment.