MCPcopy Create free account
hub / github.com/Rat431/ColdAPI_Steam / GetUGCDirectory

Function GetUGCDirectory

src/ColdAPI_Steam/ColdManager.cpp:427–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425 }
426 static bool UReady = false;
427 const char* GetUGCDirectory()
428 {
429 if (!UReady)
430 {
431 if (std::strcmp(Steam_Config::UGCDirectotry, "Auto") == 0)
432 {
433 std::memset(Steam_Config::UGCDirectotry, 0, 0x400);
434 std::strcpy(Steam_Config::UGCDirectotry, Steamapipath);
435 std::strcat(Steam_Config::UGCDirectotry, "ColdStorage\\");
436 std::strcat(Steam_Config::UGCDirectotry, Steam_Config::Username);
437 std::strcat(Steam_Config::UGCDirectotry, "\\");
438 std::strcat(Steam_Config::UGCDirectotry, ColdAPI_General::FormatTheString("%lu", EMPTY, Steam_Config::AppId));
439 std::strcat(Steam_Config::UGCDirectotry, "\\");
440 std::strcat(Steam_Config::UGCDirectotry, "LocalUGC\\");
441 }
442 else
443 {
444 int c = 0;
445
446 // Search if the last byte was a "/".
447 for (;;)
448 {
449 if (Steam_Config::UGCDirectotry[c] == NULL)
450 {
451 if (Steam_Config::UGCDirectotry[c - 1] != '\\' || Steam_Config::UGCDirectotry[c - 1] != '/')
452 std::strcpy(&Steam_Config::UGCDirectotry[c], "\\");
453 break;
454 }
455 c++;
456 }
457 std::strcat(Steam_Config::UGCDirectotry, "ColdStorage\\");
458 std::strcat(Steam_Config::UGCDirectotry, Steam_Config::Username);
459 std::strcat(Steam_Config::UGCDirectotry, "\\");
460 std::strcat(Steam_Config::UGCDirectotry, ColdAPI_General::FormatTheString("%lu", EMPTY, Steam_Config::AppId));
461 std::strcat(Steam_Config::UGCDirectotry, "\\");
462 std::strcat(Steam_Config::UGCDirectotry, "LocalUGC\\");
463 }
464 UReady = true;
465 }
466 return Steam_Config::UGCDirectotry;
467 }
468
469 std::multimap<uint64_t, MyFileStream> Streams;
470 uint64_t GlobalStream = 0;

Callers 15

Storage_InitializzationFunction · 0.85
UGCDownloadMethod · 0.85
GetUGCDetailsMethod · 0.85
UGCReadMethod · 0.85
UGCDownloadMethod · 0.85
GetUGCDetailsMethod · 0.85
UGCReadMethod · 0.85
UGCDownloadMethod · 0.85
GetUGCDetailsMethod · 0.85
UGCReadMethod · 0.85
UGCDownloadMethod · 0.85
GetUGCDetailsMethod · 0.85

Calls 1

FormatTheStringFunction · 0.85

Tested by 15

UGCDownloadMethod · 0.68
GetUGCDetailsMethod · 0.68
UGCReadMethod · 0.68
UGCDownloadMethod · 0.68
GetUGCDetailsMethod · 0.68
UGCReadMethod · 0.68
UGCDownloadMethod · 0.68
GetUGCDetailsMethod · 0.68
UGCReadMethod · 0.68
UGCDownloadMethod · 0.68
GetUGCDetailsMethod · 0.68
UGCReadMethod · 0.68