X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftestclient%2Fmain.cpp;h=2fa510e0bcc15310eaeff0d108c4efeefe6cf479;hb=c36dd10675100ca44b11421ed977c7b987a478fb;hp=65e99bcd95ee40927c195a491277bc8ca5c56005;hpb=b32ffd87ed707124e700477e8b2a10f6132de2c8;p=deb_libcec.git diff --git a/src/testclient/main.cpp b/src/testclient/main.cpp index 65e99bc..2fa510e 100644 --- a/src/testclient/main.cpp +++ b/src/testclient/main.cpp @@ -204,14 +204,24 @@ void ListDevices(ICECAdapter *parser) for (int8_t iDevicePtr = 0; iDevicePtr < iDevicesFound; iDevicePtr++) { - strDeviceInfo.AppendFormat("device: %d\ncom port: %s\n", iDevicePtr + 1, devices[iDevicePtr].comm); + strDeviceInfo.AppendFormat("device: %d\ncom port: %s\n", iDevicePtr + 1, devices[iDevicePtr].comm); libcec_configuration config; config.Clear(); if (!parser->GetDeviceInformation(devices[iDevicePtr].comm, &config)) PrintToStdOut("WARNING: unable to open the device on port %s", devices[iDevicePtr].comm); else - strDeviceInfo.AppendFormat("firmware version: %d\n", config.iFirmwareVersion); + { + strDeviceInfo.AppendFormat("firmware version: %d\n", config.iFirmwareVersion); + + if (config.iFirmwareBuildDate != CEC_DEFAULT_FIRMWARE_BUILD_DATE) + { + time_t buildTime = (time_t)config.iFirmwareBuildDate; + strDeviceInfo.AppendFormat("firmware build date: %s", asctime(gmtime(&buildTime))); + strDeviceInfo = strDeviceInfo.Left((int)strDeviceInfo.length() - 1); // strip \n added by asctime + strDeviceInfo.append(" +0000"); + } + } strDeviceInfo.append("\n"); } PrintToStdOut(strDeviceInfo.c_str());