mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-23 20:38:07 +01:00
Untested version of GetInstalledDepots.
This commit is contained in:
parent
d2fba40cb4
commit
55835de708
1 changed files with 26 additions and 1 deletions
|
@ -181,7 +181,32 @@ bool Steam_Apps::MarkContentCorrupt( bool bMissingFilesOnly )
|
||||||
// return installed depots in mount order
|
// return installed depots in mount order
|
||||||
uint32 Steam_Apps::GetInstalledDepots( AppId_t appID, DepotId_t *pvecDepots, uint32 cMaxDepots )
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue