Achievements: Re-add NeedsIdleUpdate()

Forgot I needed this on Android..
pull/3347/head
Stenzek 2 months ago
parent 556a53e564
commit 9b62632951
No known key found for this signature in database

@ -832,6 +832,15 @@ void Achievements::IdleUpdate()
rc_client_idle(s_state.client);
}
bool Achievements::NeedsIdleUpdate()
{
if (!IsActive())
return false;
const auto lock = GetLock();
return (s_state.http_downloader && s_state.http_downloader->HasAnyRequests());
}
void Achievements::FrameUpdate()
{
if (!IsActive())

@ -58,6 +58,9 @@ void FrameUpdate();
/// Called when the system is paused, because FrameUpdate() won't be getting called.
void IdleUpdate();
/// Returns true if idle updates are necessary (e.g. outstanding requests).
bool NeedsIdleUpdate();
/// Saves/loads state.
bool DoState(StateWrapper& sw);

Loading…
Cancel
Save