virtualcam - print OutputActive status on toggle

This commit is contained in:
onyx-and-iris 2025-05-25 22:18:24 +01:00
parent d9d3c7c8b2
commit 6ad530ce2e

View File

@ -43,10 +43,16 @@ type VirtualCamToggleCmd struct{} // size = 0x0
// Run executes the command to toggle the virtual camera.
func (c *VirtualCamToggleCmd) Run(ctx *context) error {
_, err := ctx.Client.Outputs.ToggleVirtualCam()
resp, err := ctx.Client.Outputs.ToggleVirtualCam()
if err != nil {
return fmt.Errorf("failed to toggle virtual camera: %w", err)
}
if resp.OutputActive {
fmt.Fprintln(ctx.Out, "Virtual camera is now active.")
} else {
fmt.Fprintln(ctx.Out, "Virtual camera is now inactive.")
}
return nil
}