aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud
diff options
context:
space:
mode:
authorThierry Crozat2016-10-23 19:58:32 +0100
committerThierry Crozat2016-10-29 15:13:32 +0100
commit8906868ee0369a2b7a768de8cd8537614351b1d1 (patch)
tree4a7cc5f79b0aa31d2a68f8c7d506184737fdce79 /backends/cloud
parente7321867246555dea7d0070feac3657fd16a1fab (diff)
downloadscummvm-rg350-8906868ee0369a2b7a768de8cd8537614351b1d1.tar.gz
scummvm-rg350-8906868ee0369a2b7a768de8cd8537614351b1d1.tar.bz2
scummvm-rg350-8906868ee0369a2b7a768de8cd8537614351b1d1.zip
CLOUD: Use OSDMessageQueue to post OSD messages from the cloud thread
Diffstat (limited to 'backends/cloud')
-rw-r--r--backends/cloud/storage.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/backends/cloud/storage.cpp b/backends/cloud/storage.cpp
index 4cccacf6d6..3a9ae53a43 100644
--- a/backends/cloud/storage.cpp
+++ b/backends/cloud/storage.cpp
@@ -28,6 +28,7 @@
#include "common/debug.h"
#include "common/file.h"
#include <common/translation.h>
+#include "common/osd_message_queue.h"
namespace Cloud {
@@ -207,7 +208,7 @@ void Storage::savesSyncDefaultCallback(BoolResponse response) {
if (!response.value)
warning("SavesSyncRequest called success callback with `false` argument");
- g_system->displayMessageOnOSD(_("Saved games sync complete."));
+ Common::OSDMessageQueue::instance().addMessage(_("Saved games sync complete."));
}
void Storage::savesSyncDefaultErrorCallback(Networking::ErrorResponse error) {
@@ -218,9 +219,9 @@ void Storage::savesSyncDefaultErrorCallback(Networking::ErrorResponse error) {
printErrorResponse(error);
if (error.interrupted)
- g_system->displayMessageOnOSD(_("Saved games sync was cancelled."));
+ Common::OSDMessageQueue::instance().addMessage(_("Saved games sync was cancelled."));
else
- g_system->displayMessageOnOSD(_("Saved games sync failed.\nCheck your Internet connection."));
+ Common::OSDMessageQueue::instance().addMessage(_("Saved games sync failed.\nCheck your Internet connection."));
}
///// DownloadFolderRequest-related /////
@@ -328,7 +329,7 @@ void Storage::directoryDownloadedCallback(FileArrayResponse response) {
} else {
message = _("Download complete.");
}
- g_system->displayMessageOnOSD(message.c_str());
+ Common::OSDMessageQueue::instance().addMessage(message.c_str());
}
void Storage::directoryDownloadedErrorCallback(Networking::ErrorResponse error) {
@@ -336,7 +337,7 @@ void Storage::directoryDownloadedErrorCallback(Networking::ErrorResponse error)
_downloadFolderRequest = nullptr;
_runningRequestsMutex.unlock();
- g_system->displayMessageOnOSD(_("Download failed."));
+ Common::OSDMessageQueue::instance().addMessage(_("Download failed."));
}
} // End of namespace Cloud