| 68 | } |
| 69 | |
| 70 | groupset* ConfigHandler::FindCreateMapping(int groupID, profile* prof) |
| 71 | { |
| 72 | if (groupID < 0) { |
| 73 | groupID = 0x1ffff; |
| 74 | } |
| 75 | if (!prof) |
| 76 | prof = activeProfile; |
| 77 | groupset* gset = FindMapping(groupID, &prof->lightsets); |
| 78 | if (!gset) { |
| 79 | FindCreateGroup(groupID); |
| 80 | modifyProfile.lockWrite(); |
| 81 | prof->lightsets.push_back({ groupID }); |
| 82 | modifyProfile.unlockWrite(); |
| 83 | gset = &prof->lightsets.back(); |
| 84 | } |
| 85 | return gset; |
| 86 | } |
| 87 | |
| 88 | profile* ConfigHandler::FindProfile(int id) { |
| 89 | for (profile* prof : profiles) |
no test coverage detected