X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2FLibCecSharp%2FLibCecSharp.cpp;h=c6f52a1a17b2bda673177728538602c81421b669;hb=b818fb5a933c762e71916340384276c6ee5ed6d6;hp=6cdc6ab0a72b14e2cafb86215bef5094ec222f23;hpb=46fb055c33e86ddc180af3374c28008bfc0c567b;p=deb_libcec.git diff --git a/src/LibCecSharp/LibCecSharp.cpp b/src/LibCecSharp/LibCecSharp.cpp index 6cdc6ab..c6f52a1 100644 --- a/src/LibCecSharp/LibCecSharp.cpp +++ b/src/LibCecSharp/LibCecSharp.cpp @@ -226,7 +226,7 @@ namespace CecSharp return m_libCec->SetLogicalAddress((cec_logical_address) logicalAddress); } - bool SetPhysicalAddress(int16_t physicalAddress) + bool SetPhysicalAddress(uint16_t physicalAddress) { return m_libCec->SetPhysicalAddress(physicalAddress); } @@ -388,9 +388,31 @@ namespace CecSharp return m_libCec->GetDevicePhysicalAddress((cec_logical_address)iAddress); } + bool SetStreamPath(CecLogicalAddress iAddress) + { + return m_libCec->SetStreamPath((cec_logical_address)iAddress); + } + + bool SetStreamPath(uint16_t iPhysicalAddress) + { + return m_libCec->SetStreamPath(iPhysicalAddress); + } + + CecLogicalAddresses ^GetLogicalAddresses(void) + { + CecLogicalAddresses ^addr = gcnew CecLogicalAddresses(); + cec_logical_addresses libAddr = m_libCec->GetLogicalAddresses(); + for (unsigned int iPtr = 0; iPtr < 16; iPtr++) + addr->Addresses[iPtr] = (CecLogicalAddress)libAddr.addresses[iPtr]; + addr->Primary = (CecLogicalAddress)libAddr.primary; + return addr; + } + bool GetCurrentConfiguration(LibCECConfiguration ^configuration) { libcec_configuration config; + config.Clear(); + if (m_libCec->GetCurrentConfiguration(&config)) { configuration->BaseDevice = (CecLogicalAddress)config.baseDevice;