| 4156 | } |
| 4157 | |
| 4158 | void Config::addActiveDisplay(const char * display) |
| 4159 | { |
| 4160 | if( !display || !display[0] ) |
| 4161 | { |
| 4162 | throw Exception("Active display could not be added to config, display name was empty"); |
| 4163 | } |
| 4164 | |
| 4165 | auto it = std::find(getImpl()->m_activeDisplays.begin(), |
| 4166 | getImpl()->m_activeDisplays.end(), display); |
| 4167 | |
| 4168 | if( it != getImpl()->m_activeDisplays.end() ) |
| 4169 | { |
| 4170 | // Display is already present. |
| 4171 | return; |
| 4172 | } |
| 4173 | |
| 4174 | getImpl()->m_activeDisplays.push_back(display); |
| 4175 | |
| 4176 | getImpl()->m_displayCache.clear(); |
| 4177 | AutoMutex lock(getImpl()->m_cacheidMutex); |
| 4178 | getImpl()->resetCacheIDs(); |
| 4179 | } |
| 4180 | |
| 4181 | void Config::removeActiveDisplay(const char * display) |
| 4182 | { |