mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-25 09:54:15 +08:00
Merge pull request #32 from universal963/universal963-patch-1
More accurate api behaviors fix
This commit is contained in:
commit
601bb51d46
@ -84,8 +84,12 @@ bool Steam_Apps::BIsSubscribedApp( AppId_t appID )
|
||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||
if (appID == 0) return false; // steam returns false
|
||||
if (appID == UINT32_MAX) return true; // steam returns true
|
||||
if (appID == settings->get_local_game_id().AppID()) return true; // steam returns true
|
||||
return settings->hasDLC(appID);
|
||||
if (appID == settings->get_local_game_id().AppID() || settings->hasDLC(appID)) return true; // steam returns true
|
||||
for (auto &d : settings->depots) {
|
||||
if (d == appID)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -112,15 +116,19 @@ uint32 Steam_Apps::GetEarliestPurchaseUnixTime( AppId_t nAppID )
|
||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||
if (nAppID == 0) return 0; // steam returns 0
|
||||
if (nAppID == UINT32_MAX) return 0; // steam returns 0
|
||||
auto t =
|
||||
// 4 days ago
|
||||
startup_time
|
||||
- std::chrono::hours(24 * 4);
|
||||
auto duration = std::chrono::duration_cast<std::chrono::seconds>(t.time_since_epoch());
|
||||
if (nAppID == settings->get_local_game_id().AppID() || settings->hasDLC(nAppID)) {
|
||||
auto t =
|
||||
// 4 days ago
|
||||
startup_time
|
||||
- std::chrono::hours(24 * 4);
|
||||
auto duration = std::chrono::duration_cast<std::chrono::seconds>(t.time_since_epoch());
|
||||
return (uint32)duration.count();
|
||||
}
|
||||
|
||||
for (auto &d : settings->depots) {
|
||||
if (d == nAppID)
|
||||
return (uint32)duration.count();
|
||||
}
|
||||
|
||||
//TODO ?
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user