| 73 | } |
| 74 | |
| 75 | void StartupMapLoader::loadMapSafe(const std::string& mapToLoad) |
| 76 | { |
| 77 | // Check if we have a valid openGL context, otherwise postpone the load |
| 78 | if (GlobalOpenGLContext().getSharedContext()) |
| 79 | { |
| 80 | GlobalCommandSystem().executeCommand("OpenMap", mapToLoad); |
| 81 | return; |
| 82 | } |
| 83 | |
| 84 | // No valid context, subscribe to the extensionsInitialised signal |
| 85 | GlobalRenderSystem().signal_extensionsInitialised().connect([mapToLoad]() |
| 86 | { |
| 87 | GlobalCommandSystem().executeCommand("OpenMap", mapToLoad); |
| 88 | }); |
| 89 | } |
| 90 | |
| 91 | const std::string& StartupMapLoader::getName() const |
| 92 | { |
nothing calls this directly
no test coverage detected