From 8429c40362b1e4d4010f808740b79baae69c97ed Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Wed, 11 May 2016 01:10:37 +0600 Subject: 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. --- base/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'base/main.cpp') 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()) -- cgit v1.2.3