Untested version of GetInstalledDepots.
parent
d2fba40cb4
commit
55835de708
|
@ -181,7 +181,32 @@ bool Steam_Apps::MarkContentCorrupt( bool bMissingFilesOnly )
|
|||
// return installed depots in mount order
|
||||
uint32 Steam_Apps::GetInstalledDepots( AppId_t appID, DepotId_t *pvecDepots, uint32 cMaxDepots )
|
||||
{
|
||||
PRINT_DEBUG("GetInstalledDepots\n");
|
||||
PRINT_DEBUG("GetInstalledDepots %u\n", appID);
|
||||
//TODO not sure about the behavior of this function, I didn't actually test this.
|
||||
if (!pvecDepots) return 0;
|
||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||
|
||||
if (appID == settings->get_local_game_id().AppID()) {
|
||||
unsigned int count = settings->DLCCount();
|
||||
if (cMaxDepots < count) count = cMaxDepots;
|
||||
|
||||
for (int i = 0; i < count; ++i) {
|
||||
AppId_t appid;
|
||||
bool available;
|
||||
std::string name;
|
||||
if (settings->getDLC(i, appid, available, name)) {
|
||||
pvecDepots[i] = appid;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
} else {
|
||||
if (cMaxDepots) {
|
||||
*pvecDepots = appID;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue