aboutsummaryrefslogtreecommitdiff
path: root/base/main.cpp
diff options
context:
space:
mode:
authorAlexander Tkachev2016-05-11 01:10:37 +0600
committerAlexander Tkachev2016-08-24 16:05:07 +0600
commit8429c40362b1e4d4010f808740b79baae69c97ed (patch)
tree8916f123e0dfadd807cfccae0446e4627102d1ed /base/main.cpp
parent380902eb071fbe960e615d0c29fc1f5099aa9af8 (diff)
downloadscummvm-rg350-8429c40362b1e4d4010f808740b79baae69c97ed.tar.gz
scummvm-rg350-8429c40362b1e4d4010f808740b79baae69c97ed.tar.bz2
scummvm-rg350-8429c40362b1e4d4010f808740b79baae69c97ed.zip
CLOUD: Add SimpleJSON library as Common::JSON
This commit also adds CloudThread class, which work() method is called every second by TimerManager. Right now it prints JSON examples on the console, so that's why it's introduced with SimpleJSON library.
Diffstat (limited to 'base/main.cpp')
-rw-r--r--base/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 1667106543..593179d80e 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -66,6 +66,7 @@
#endif
#include "backends/keymapper/keymapper.h"
+#include "backends/cloud/cloudthread.h"
#if defined(_WIN32_WCE)
#include "backends/platform/wince/CELauncherDialog.h"
@@ -475,6 +476,11 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
dlg.runModal();
}
#endif
+
+ CloudThread thread;
+ Common::TimerManager *manager = system.getTimerManager();
+ if (!manager->installTimerProc(cloudThread, 1000000, &thread, "Cloud Thread"))
+ warning("Failed to create cloud thread");
// Unless a game was specified, show the launcher dialog
if (0 == ConfMan.getActiveDomain())