/*
* This file is part of the libCEC(R) library.
*
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited. All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
* libCEC(R) is an original work, containing original code.
*
* libCEC(R) is a trademark of Pulse-Eight Limited.
/// </summary>
public void Initialise()
{
+ // only load once
+ if (_initialised)
+ return;
+ _initialised = true;
+
CECActions.ConnectToDevice(Config);
Applications.Initialise(this);
}
Lib.DisableCallbacks();
Lib.StandbyDevices(CecLogicalAddress.Broadcast);
Lib.Close();
+ _initialised = false;
}
/// <summary>
{
if (_config == null)
{
- _config = new LibCECConfiguration { DeviceName = "CEC Tray", ClientVersion = CecClientVersion.Version2_0_0 };
+ _config = new LibCECConfiguration { DeviceName = "CEC Tray", ClientVersion = CecClientVersion.Version2_1_0 };
_config.DeviceTypes.Types[0] = CecDeviceType.RecordingDevice;
_config.SetCallbacks(this);
get { return Lib.ToString(Config.ClientVersion); }
}
+ /// <summary>
+ /// Get the usb vendor id
+ /// </summary>
+ public ushort AdapterVendorId
+ {
+ get { return Lib.GetAdapterVendorId(); }
+ }
+
+ /// <summary>
+ /// Get the usb product id
+ /// </summary>
+ public ushort AdapterProductId
+ {
+ get { return Lib.GetAdapterProductId(); }
+ }
+
+
/// <summary>
/// libCEC
/// </summary>
private readonly CECTray _gui;
public Actions CECActions;
private bool _deviceChangeWarningDisplayed;
+ private bool _initialised;
#endregion
}