From: Lars Op den Kamp Date: Thu, 27 Oct 2011 17:51:57 +0000 (+0200) Subject: win32: sync visual studio project file. use uint32_t instead of uint64_t for the... X-Git-Tag: upstream/2.2.0~1^2~210 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=387b6f6f0cfc29fdb539e6726c1c3bceeb722674;p=deb_libcec.git win32: sync visual studio project file. use uint32_t instead of uint64_t for the vendor id --- diff --git a/project/libcec.vcxproj b/project/libcec.vcxproj index ab7e00e..f2b9f3f 100644 --- a/project/libcec.vcxproj +++ b/project/libcec.vcxproj @@ -17,7 +17,11 @@ + + + + @@ -35,7 +39,11 @@ + + + + diff --git a/project/libcec.vcxproj.filters b/project/libcec.vcxproj.filters index c677d84..febfd09 100644 --- a/project/libcec.vcxproj.filters +++ b/project/libcec.vcxproj.filters @@ -10,6 +10,9 @@ {01b9c84a-dcfe-4bdc-b983-69e3e3929b0f} + + {03bd59df-ccac-4664-b61b-3151bb219efa} + @@ -64,6 +67,16 @@ exports + + implementations + + + implementations + + + implementations + + @@ -84,5 +97,15 @@ platform + + implementations + + + implementations + + + implementations + + \ No newline at end of file diff --git a/src/lib/CECBusDevice.cpp b/src/lib/CECBusDevice.cpp index b3d338f..d0104d0 100644 --- a/src/lib/CECBusDevice.cpp +++ b/src/lib/CECBusDevice.cpp @@ -70,7 +70,7 @@ void CCECBusDevice::AddLog(cec_log_level level, const CStdString &strMessage) m_processor->AddLog(level, strMessage); } -void CCECBusDevice::SetVendorId(uint16_t iVendorId, uint8_t iVendorClass /* = 0 */) +void CCECBusDevice::SetVendorId(uint32_t iVendorId, uint8_t iVendorClass /* = 0 */) { m_iVendorId = iVendorId; m_iVendorClass = iVendorClass; diff --git a/src/lib/CECBusDevice.h b/src/lib/CECBusDevice.h index 613c766..dcd30a1 100644 --- a/src/lib/CECBusDevice.h +++ b/src/lib/CECBusDevice.h @@ -52,9 +52,9 @@ namespace CEC virtual cec_logical_address GetMyLogicalAddress(void) const; virtual uint16_t GetMyPhysicalAddress(void) const; - virtual void SetVendorId(uint16_t iVendorId, uint8_t iVendorClass = 0); + virtual void SetVendorId(uint32_t iVendorId, uint8_t iVendorClass = 0); virtual const char *GetVendorName(void) const { return CECVendorIdToString(m_iVendorId); } - virtual uint64_t GetVendorId(void) const { return m_iVendorId; } + virtual uint32_t GetVendorId(void) const { return m_iVendorId; } virtual uint8_t GetVendorClass(void) const { return m_iVendorClass; } virtual uint64_t GetLastActive(void) const { return m_iLastActive; } @@ -74,7 +74,7 @@ namespace CEC cec_logical_address m_iLogicalAddress; CCECProcessor *m_processor; CCECCommandHandler *m_handler; - uint64_t m_iVendorId; + uint32_t m_iVendorId; uint8_t m_iVendorClass; uint64_t m_iLastActive; CMutex m_mutex; diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 648ec20..6bfab0d 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -533,9 +533,9 @@ void CCECProcessor::ParseVendorId(cec_logical_address device, const cec_datapack return; } - uint64_t iVendorId = ((uint64_t)data[0] << 3) + - ((uint64_t)data[1] << 2) + - (uint64_t)data[2]; + uint32_t iVendorId = ((uint32_t)data[0] << 3) + + ((uint32_t)data[1] << 2) + + (uint32_t)data[2]; m_busDevices[(uint8_t)device]->SetVendorId(iVendorId, data.size >= 4 ? data[3] : 0); } diff --git a/src/lib/implementations/ANCommandHandler.cpp b/src/lib/implementations/ANCommandHandler.cpp index 575c4c3..32565ed 100644 --- a/src/lib/implementations/ANCommandHandler.cpp +++ b/src/lib/implementations/ANCommandHandler.cpp @@ -32,9 +32,9 @@ */ #include "ANCommandHandler.h" -#include "CECBusDevice.h" -#include "CECProcessor.h" -#include "util/StdString.h" +#include "../CECBusDevice.h" +#include "../CECProcessor.h" +#include "../util/StdString.h" using namespace CEC; @@ -74,29 +74,20 @@ bool CANCommandHandler::HandleVendorRemoteButtonDown(const cec_command &command) bool CANCommandHandler::HandleCommand(const cec_command &command) { - bool bHandled(true); + bool bHandled(false); if (command.destination == m_busDevice->GetMyLogicalAddress()) { switch(command.opcode) { case CEC_OPCODE_VENDOR_REMOTE_BUTTON_DOWN: + bHandled = true; HandleVendorRemoteButtonDown(command); break; case CEC_OPCODE_VENDOR_REMOTE_BUTTON_UP: + bHandled = true; HandleUserControlRelease(command); break; default: - bHandled = false; - break; - } - } - else if (command.destination == CECDEVICE_BROADCAST) - { - switch(command.opcode) - { - // TODO - default: - bHandled = false; break; } } diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 314313d..572b3a6 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -32,8 +32,8 @@ */ #include "CECCommandHandler.h" -#include "CECBusDevice.h" -#include "CECProcessor.h" +#include "../CECBusDevice.h" +#include "../CECProcessor.h" using namespace CEC;