mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-03 15:21:40 +00:00
CLOUD: Notify the backend starting or finishing a download from the cloud
This commit is contained in:
parent
b0ae8424c9
commit
e0c67c3949
@ -57,8 +57,10 @@ void Storage::printErrorResponse(Networking::ErrorResponse error) {
|
|||||||
Networking::Request *Storage::addRequest(Networking::Request *request) {
|
Networking::Request *Storage::addRequest(Networking::Request *request) {
|
||||||
_runningRequestsMutex.lock();
|
_runningRequestsMutex.lock();
|
||||||
++_runningRequestsCount;
|
++_runningRequestsCount;
|
||||||
if (_runningRequestsCount == 1)
|
if (_runningRequestsCount == 1) {
|
||||||
|
g_system->taskStarted(OSystem::kCloudDownload);
|
||||||
debug(9, "Storage is working now");
|
debug(9, "Storage is working now");
|
||||||
|
}
|
||||||
_runningRequestsMutex.unlock();
|
_runningRequestsMutex.unlock();
|
||||||
return ConnMan.addRequest(request, new Common::Callback<Storage, Networking::Request *>(this, &Storage::requestFinishedCallback));
|
return ConnMan.addRequest(request, new Common::Callback<Storage, Networking::Request *>(this, &Storage::requestFinishedCallback));
|
||||||
}
|
}
|
||||||
@ -72,8 +74,10 @@ void Storage::requestFinishedCallback(Networking::Request *invalidRequestPointer
|
|||||||
--_runningRequestsCount;
|
--_runningRequestsCount;
|
||||||
if (_syncRestartRequestsed)
|
if (_syncRestartRequestsed)
|
||||||
restartSync = true;
|
restartSync = true;
|
||||||
if (_runningRequestsCount == 0 && !restartSync)
|
if (_runningRequestsCount == 0) {
|
||||||
|
g_system->taskFinished(OSystem::kCloudDownload);
|
||||||
debug(9, "Storage is not working now");
|
debug(9, "Storage is not working now");
|
||||||
|
}
|
||||||
_runningRequestsMutex.unlock();
|
_runningRequestsMutex.unlock();
|
||||||
|
|
||||||
if (restartSync)
|
if (restartSync)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user