MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / MakeMasterServerTransport

Function MakeMasterServerTransport

engine/Poseidon/UI/OptionsUIApp.cpp:1339–1367  ·  view source on GitHub ↗

libcurl download bridged to the agnostic DownloadFileFn. The C progress callback can't carry captures, so onBytes is reached through a void* context.

Source from the content-addressed store, hash-verified

1337 cls->Add("selection", RString("display"));
1338 cls->Add("angle", 0.0f);
1339 cls->SetBase(sourceCls->GetClassInterface());
1340
1341 Control* ctrl = notebook->LoadControl(*cls);
1342 if (C3DStatic* text = dynamic_cast<C3DStatic*>(ctrl))
1343 {
1344 text->SetText(FormatNetworkMasterServerAttribution(GetNetworkMasterServer()));
1345 }
1346 }
1347 }
1348
1349 ApplyInitialSort();
1350}
1351
1352void DisplayMods::SeedTestMods(int count)
1353{
1354 CModsList* list = dynamic_cast<CModsList*>(GetCtrl(IDC_MODS_LIST));
1355 if (!list)
1356 return;
1357 AutoArray<ModRow> rows;
1358 for (int i = 0; i < count; i++)
1359 {
1360 ModRow r;
1361 char buf[64];
1362 snprintf(buf, sizeof(buf), "@testmod%d", i + 1);
1363 r.modId = buf;
1364 r.folderName = buf;
1365 snprintf(buf, sizeof(buf), "Test Mod %d", i + 1);
1366 r.name = buf;
1367 r.version = "1.0";
1368 r.sizeBytes = static_cast<int64_t>(i + 1) * 10 * 1024 * 1024;
1369 r.state = static_cast<ModRowState>(i % 3); // cycles Missing/Downloaded/Active
1370 r.source = (i % 2 == 0) ? ModRowSource::Workshop : ModRowSource::Local; // odd rows Local

Callers 1

OnButtonClickedMethod · 0.85

Calls 2

emptyMethod · 0.45

Tested by

no test coverage detected