mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 03:57:27 +00:00
fix; add check for HdmiIn being null
Not all Airmedia devices that might use this class have an HDMI input. This check should prevent null ref exceptions from happening.
This commit is contained in:
parent
e04f6d0396
commit
f253abd0ae
1 changed files with 9 additions and 2 deletions
|
|
@ -110,9 +110,16 @@ namespace PepperDash.Essentials.DM.AirMedia
|
|||
VideoOutFeedback = new IntFeedback(() => Convert.ToInt16(AirMedia.DisplayControl.VideoOutFeedback));
|
||||
AutomaticInputRoutingEnabledFeedback = new BoolFeedback(() => AirMedia.DisplayControl.EnableAutomaticRoutingFeedback.BoolValue);
|
||||
|
||||
AirMedia.HdmiIn.StreamChange += HdmiIn_StreamChange;
|
||||
// Not all AirMedia versions support HDMI In like the 3200
|
||||
if (AirMedia.HdmiIn != null)
|
||||
{
|
||||
AirMedia.HdmiIn.StreamChange += HdmiIn_StreamChange;
|
||||
HdmiVideoSyncDetectedFeedback = new BoolFeedback(() => AirMedia.HdmiIn.SyncDetectedFeedback.BoolValue);
|
||||
return;
|
||||
}
|
||||
|
||||
HdmiVideoSyncDetectedFeedback = new BoolFeedback(() => AirMedia.HdmiIn.SyncDetectedFeedback.BoolValue);
|
||||
// Return false if the AirMedia device doesn't support HDMI Input
|
||||
HdmiVideoSyncDetectedFeedback = new BoolFeedback(() => false);
|
||||
}
|
||||
|
||||
public override bool CustomActivate()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue