From 248cdebfbdcac3582165fb4c05f01c1dfe15ae12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20Bundulis?= Date: Tue, 2 Mar 2021 17:34:57 +0200 Subject: [PATCH] honour the flash configuration * the implementation of the default value should be made version dependent in future --- src/CasparCGFrontend/Flash.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/CasparCGFrontend/Flash.cs b/src/CasparCGFrontend/Flash.cs index 232c575..51d1dca 100755 --- a/src/CasparCGFrontend/Flash.cs +++ b/src/CasparCGFrontend/Flash.cs @@ -21,9 +21,22 @@ public string BufferDepth set { this.bufferDepth = value; NotifyChanged("BufferDepth"); } } + private Boolean? enabled = null; + [XmlElement(ElementName = "enabled")] + public Boolean Enabled + { + get { return this.enabled ?? true; } + set { this.enabled = value; NotifyChanged("Enabled"); } + } + + public bool ShouldSerializEnabled() + { + return this.enabled != null; + } + public bool IsOnlyDefaultValues() { - return bufferDepth == "auto"; + return bufferDepth == "auto" && (this.enabled == null || this.enabled == false); } public event PropertyChangedEventHandler PropertyChanged = delegate { };