summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--views/viewhelpers.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/HISTORY b/HISTORY
index 3c653db..b0d4423 100644
--- a/HISTORY
+++ b/HISTORY
@@ -36,6 +36,8 @@ Version 0.0.2
- using default menu list in case an invalid MenuCategory is set
- added device info in displaychannel, example in metrixHD
- improved menu icon display, additionally using menu cat
+- changed devices list, device numbers start with 0
+
diff --git a/views/viewhelpers.c b/views/viewhelpers.c
index b97a7a3..d08d6f2 100644
--- a/views/viewhelpers.c
+++ b/views/viewhelpers.c
@@ -74,10 +74,11 @@ bool cViewHelpers::SetDevices(bool initial, map<string,int> *intTokens, vector<m
if (!device || !device->NumProvidedSystems()) {
continue;
}
- actualNumDevices++;
+
map< string, string > deviceVals;
stringstream strNum;
strNum << actualNumDevices;
+ actualNumDevices++;
deviceVals.insert(pair< string, string >("devices[num]", strNum.str()));
deviceVals.insert(pair< string, string >("devices[type]", *(device->DeviceType())));
cCamSlot *camSlot = device->CamSlot();