| 303 | } |
| 304 | |
| 305 | void ConsoleSingleton::refresh() const |
| 306 | { |
| 307 | if (_bCanRefresh) { |
| 308 | RefreshHandler handler; |
| 309 | { |
| 310 | std::lock_guard<std::mutex> lock(_handlerMutex); |
| 311 | handler = _refreshHandler; |
| 312 | } |
| 313 | if (handler) { |
| 314 | handler(); |
| 315 | return; |
| 316 | } |
| 317 | |
| 318 | if (const Bridge* bridge = getBridge()) { |
| 319 | bridge->refresh(); |
| 320 | } |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | void ConsoleSingleton::enableRefresh(const bool enable) |
| 325 | { |