MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / loadMapSafe

Method loadMapSafe

radiant/map/StartupMapLoader.cpp:75–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void 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
91const std::string& StartupMapLoader::getName() const
92{

Callers

nothing calls this directly

Calls 3

executeCommandMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected