[Horus] Widgets can be written in Lua
This commit is contained in:
@@ -31,10 +31,12 @@ void Layout::load()
|
||||
{
|
||||
unsigned int count = getZonesCount();
|
||||
for (unsigned int i=0; i<count; i++) {
|
||||
char name[sizeof(persistentData->zones[i].widgetName)+1];
|
||||
memset(name, 0, sizeof(name));
|
||||
strncpy(name, persistentData->zones[i].widgetName, sizeof(persistentData->zones[i].widgetName));
|
||||
widgets[i] = loadWidget(name, getZone(i), &persistentData->zones[i].widgetData);
|
||||
if (persistentData->zones[i].widgetName[0]) {
|
||||
char name[sizeof(persistentData->zones[i].widgetName)+1];
|
||||
memset(name, 0, sizeof(name));
|
||||
strncpy(name, persistentData->zones[i].widgetName, sizeof(persistentData->zones[i].widgetName));
|
||||
widgets[i] = loadWidget(name, getZone(i), &persistentData->zones[i].widgetData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,4 +90,4 @@ void loadCustomScreens()
|
||||
if (customScreens[0] == NULL) {
|
||||
customScreens[0] = registeredLayouts[0]->create(&g_model.screenData[0].layoutData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user