Skip to content

Commit

Permalink
feat: Stopping OBS.Beat.Timer on Unload ( Fixes #195 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Feb 14, 2024
1 parent a76b993 commit ac805f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions obs-powershell.ps.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ $CommandsPath = (Join-Path $PSScriptRoot "Commands")

$MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = {
Get-OBSEffect | Stop-OBSEffect
if (${obs-powershell}.Beat.Timer) {
${obs-powershell}.Beat.Timer.Stop()
Get-EventSubscriber | Where-Object SourceObject -eq ${obs-powershell}.Beat.Timer | Unregister-Event
}
Disconnect-OBS
}

Expand Down

0 comments on commit ac805f6

Please sign in to comment.