diff --git a/coreengine/viewelementscommon.c b/coreengine/viewelementscommon.c index a1067c2..2df678a 100644 --- a/coreengine/viewelementscommon.c +++ b/coreengine/viewelementscommon.c @@ -306,7 +306,15 @@ bool cVeDevices::Parse(bool forced) { if (recDevice) { mutexDevices.Lock(); if (recDevices) - recDevices[recDevice->DeviceNumber()] = true; + { + int d = recDevice->DeviceNumber(); + for (int i = 0; i < numDevices; i++) { + if (devices[i] == d) { + recDevices[i] = true; + break; + } + } + } mutexDevices.Unlock(); } } @@ -347,7 +355,7 @@ bool cVeDevices::Parse(bool forced) { } tokenContainer->AddLoopToken(devicesIndex, i, (int)eDevicesLT::signalstrength, *cString::sprintf("%d", signalStrength)); tokenContainer->AddLoopToken(devicesIndex, i, (int)eDevicesLT::signalquality, *cString::sprintf("%d", signalQuality)); - tokenContainer->AddLoopToken(devicesIndex, i, (int)eDevicesLT::livetv, i == deviceLiveTV ? "1" : "0"); + tokenContainer->AddLoopToken(devicesIndex, i, (int)eDevicesLT::livetv, devices[i] == deviceLiveTV ? "1" : "0"); bool isRecording = false; mutexDevices.Lock();