X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2FLibCecSharp%2FLibCecSharp.cpp;h=0aec2ff111823d8145a0883ce37e53783c03b42e;hb=e54fd7d2a2bdb442b5913de9de213518198f92b6;hp=c72e0dd2d62ec04f8a817cdd387f890e81aee8fc;hpb=61f3c2ad37b222442f9f9d81cd9f7694ec2089f5;p=deb_libcec.git diff --git a/src/LibCecSharp/LibCecSharp.cpp b/src/LibCecSharp/LibCecSharp.cpp index c72e0dd..0aec2ff 100644 --- a/src/LibCecSharp/LibCecSharp.cpp +++ b/src/LibCecSharp/LibCecSharp.cpp @@ -411,8 +411,10 @@ public: cec_command command; if (m_libCec->GetNextCommand(&command)) { - // TODO parameters - return gcnew CecCommand((CecLogicalAddress)command.initiator, (CecLogicalAddress)command.destination, command.ack == 1 ? true : false, command.eom == 1 ? true : false, command.opcode, command.transmit_timeout); + CecCommand ^ retVal = gcnew CecCommand((CecLogicalAddress)command.initiator, (CecLogicalAddress)command.destination, command.ack == 1 ? true : false, command.eom == 1 ? true : false, command.opcode, command.transmit_timeout); + for (uint8_t iPtr = 0; iPtr < command.parameters.size; iPtr++) + retVal->Parameters->PushBack(command.parameters[iPtr]); + return retVal; } return gcnew CecCommand(); @@ -421,12 +423,12 @@ public: bool Transmit(CecCommand ^ command) { cec_command ccommand; - cec_command::format(ccommand, (cec_logical_address)command->Initiator, (cec_logical_address)command->Destination, (cec_opcode)command->Opcode); + cec_command::Format(ccommand, (cec_logical_address)command->Initiator, (cec_logical_address)command->Destination, (cec_opcode)command->Opcode); ccommand.transmit_timeout = command->TransmitTimeout; ccommand.eom = command->Eom; ccommand.ack = command->Ack; for (unsigned int iPtr = 0; iPtr < command->Parameters->Size; iPtr++) - ccommand.parameters.push_back(command->Parameters->Data[iPtr]); + ccommand.parameters.PushBack(command->Parameters->Data[iPtr]); return m_libCec->Transmit(ccommand); }