1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed displaying the number of devices in the LCARS skin in case of non-receiving devices

This commit is contained in:
Klaus Schmidinger 2012-06-07 11:43:35 +02:00
parent ab62437ac6
commit d623479e32

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: skinlcars.c 2.8 2012/06/07 10:37:07 kls Exp $ * $Id: skinlcars.c 2.9 2012/06/07 11:43:35 kls Exp $
*/ */
// "Star Trek: The Next Generation"(R) is a registered trademark of Paramount Pictures, // "Star Trek: The Next Generation"(R) is a registered trademark of Paramount Pictures,
@ -1149,6 +1149,7 @@ void cSkinLCARSDisplayMenu::DrawTimers(void)
osd->DrawRectangle(xs07, ys04, xs13 - 1, ys05 - 1, Theme.Color(clrBackground)); osd->DrawRectangle(xs07, ys04, xs13 - 1, ys05 - 1, Theme.Color(clrBackground));
cSortedTimers SortedTimers; cSortedTimers SortedTimers;
cVector<int> FreeDeviceSlots; cVector<int> FreeDeviceSlots;
int NumDevices = 0;
int y = ys04; int y = ys04;
// Timers and recording devices: // Timers and recording devices:
while (1) { while (1) {
@ -1167,6 +1168,7 @@ void cSkinLCARSDisplayMenu::DrawTimers(void)
Device = RecordControl->Device(); Device = RecordControl->Device();
deviceOffset[Device->DeviceNumber()] = y; deviceOffset[Device->DeviceNumber()] = y;
deviceRecording[Device->DeviceNumber()] = true; deviceRecording[Device->DeviceNumber()] = true;
NumDevices++;
} }
else else
FreeDeviceSlots.Append(y); FreeDeviceSlots.Append(y);
@ -1202,12 +1204,13 @@ void cSkinLCARSDisplayMenu::DrawTimers(void)
break; break;
deviceOffset[Device->DeviceNumber()] = y; deviceOffset[Device->DeviceNumber()] = y;
y += lineHeight + Gap; y += lineHeight + Gap;
NumDevices++;
} }
} }
} }
} }
osd->DrawText(xs02, ys00, itoa(Timers.Count()), Theme.Color(clrMenuFrameFg), frameColor, font, xs03 - xs02, ys01 - ys00, taBottom | taLeft | taBorder); osd->DrawText(xs02, ys00, itoa(Timers.Count()), Theme.Color(clrMenuFrameFg), frameColor, font, xs03 - xs02, ys01 - ys00, taBottom | taLeft | taBorder);
osd->DrawText(xs08, ys00, itoa(cDevice::NumDevices()), Theme.Color(clrMenuFrameFg), frameColor, font, xs09 - xs08, ys01 - ys00, taBottom | taRight | taBorder); osd->DrawText(xs08, ys00, itoa(NumDevices), Theme.Color(clrMenuFrameFg), frameColor, font, xs09 - xs08, ys01 - ys00, taBottom | taRight | taBorder);
lastSignalDisplay = 0; lastSignalDisplay = 0;
initial = true; // forces redrawing of devices initial = true; // forces redrawing of devices
} }