Commit Graph
371 Commits
Author SHA1 Message Date
Alexander Tkachev b180c73675 CLOUD: Do some refactoring/cleanup
Nothing really major.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 3da38ca60b CLOUD: Replace USE_CLOUD with USE_LIBCURL
In most cases that's the right one to check. USE_CLOUD is defined when
either USE_LIBCURL or USE_SDL_NET are, which means if there is no curl,
USE_CLOUD still could be defined and linking errors would appear.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 0af97e59bc CLOUD: Add LocalWebserver
Available as LocalServer singleton. It's being started and stopped by
StorageWizardDialog. It doesn't handle clients yet, though.
2016-08-24 16:07:55 +06:00
Alexander Tkachev b3bf532211 CLOUD: Make CloudManager singleton
It's needed to ::destroy() it in main().
2016-08-24 16:07:55 +06:00
Alexander Tkachev 1f974a7a2a CLOUD: Fix ConnectionManager's destructor
It now terminates active Requests.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 4e7dec5500 CLOUD: Add DropboxCreateDirectoryRequest
Also add CloudManager::testFeature(), because syncSaves() now works fine
and I don't want to break it again and again with my testing requests.
2016-08-24 16:07:55 +06:00
Alexander Tkachev e743a65636 CLOUD: Add Dropbox into CloudManager's configs
This commit adds:
* ConfMan's new "cloud" domain;
* CloudManager's init() method, where it loads keys from "cloud" configs
domain;
* CurlJsonRequest's addHeader() and addPostField() methods;
* temporary Storage's printInfo() method;
* DropboxStorage's implementation of printInfo(), which is using access
token and user id;
* DropboxStorage's loadFromConfig() static method to load access token
and user id from configs and create a Storage instance with those;
* temporary DropboxStorage's authThroughConsole() static method, which
guides user through auth process from the console.

So, in CloudManager's init() implementation ScummVM checks that there is
"current_storage_type" key in "cloud" domain of configs, and loads
corresponding storage if there is such key.

If there is no such key, ScummVM offers user to auth with Dropbox.
That's done through console, and thus it's temporary (it also requires
restarting ScummVM twice and manually editing config.ini file).
2016-08-24 16:07:55 +06:00
Alexander Tkachev fade746f37 CLOUD: Add USE_CLOUD feature
Adds USE_CLOUD in both configure and create_project.
2016-08-24 16:07:55 +06:00
Alexander Tkachev ca2eeb2214 CLOUD: Add Cloud::Manager and Cloud::Storage
This commit introduces Common::CloudManager, which can be accessed from
OSystem.

The backend for this manager is Cloud::Manager (defined in
backends/cloud/manager.h). It should load all users storages from
configs and provide access to current Storage instance. For now it just
creates a new one.

Cloud::Storage (backends/cloud/storage.h) provides an API to interact
with cloud storage, for example, create new directory or sync files.
Right now it's not ready and has only two dummy methods: listDirectory()
and syncSaves().

There is Cloud::Dropbox::DropboxStorage backend
(backends/cloud/dropbox/dropboxstorage.h) for Cloud::Storage. Right now
it implements both listDirectory() and syncSaves() with starting timer
task and handling it by printing out some JSON examples.
2016-08-24 16:05:07 +06:00
Alexander Tkachev 7446ffd73b CLOUD: Integrate CloudThread into OSystem
Would be changed soon.
2016-08-24 16:05:07 +06:00
Alexander Tkachev 8429c40362 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.
2016-08-24 16:05:07 +06:00
Eugene Sandulenko 0fdab36710 COMMON: Introduce --debug-channels-only command line flag.
Many of our systems currently generate significant amount of debug
output on deeper levels. Now, when your engine is using Debug Channels,
you might want to show that debug information only, which is currently
not possible, as the generic output will be mixed in your output.

Alternative solution would be to implement possibility to specify
per-channel debug levels.
2016-08-13 21:07:43 +02:00
Bastien Bouclet 8294d55a53 BASE: Allow setting the debug flags from the configuration file
Useful for devices where passing command line arguments is not possible.
2016-06-05 11:49:40 +02:00
Eugene Sandulenko 97a2a9c622 Merge pull request #710 from vandalo/master
COMMON: Fix wrong warning message
2016-05-16 10:18:00 +02:00
vandaloandFerran coma rosell a406ce6d55 COMMON: Fix wrong error message
The error message was not correct.

When you add a game data dir to launcher and after do this
rename game data dir the error was wrong.
It said that the "path wasn't a directory",
the expected error message was
"Path does not exists" because we had changed.

How to solve this:
We split in two the validation of the path, first
we check if it's a existing path and then if the path is a directory.

if (!dir.exists())
	err = Common::kPathDoesNotExist;
else if (!dir.isDirectory())
	err = Common::kPathNotDirectory;

Solve Bug: 6765 Wrong error code if directory missing
2016-04-16 17:59:20 +02:00
Eugene Sandulenko 17a8f0badd UPDATES: Plug updates dialog in.
Launched when ScummVM is run first time with updates feature.
2016-03-30 10:58:57 +02:00
Johannes Schickel c321a71241 BASE: Initialize default GUI option values before engine instantiation.
This fixes engines (like AGI) which query the configuration options inside
their constructor.
2016-01-17 02:18:03 +01:00
Matthew Hoops bab1afa6cc BASE: Fix infinite loop upon trying to play a game and not finding the engine
A regression from f74ba29753
2015-02-22 16:49:29 -05:00
Torbjörn Andersson cc916625d9 SCUMM: Add a "chained games manager"
This replaces the somewhat ugly use of the config manager to store
the chained games.
2014-12-30 10:47:51 +01:00
Torbjörn Andersson f74ba29753 SCUMM: Enable Day of the Tentacle easter egg
Instead of returning to the launcher, a game may now specify a list
of "chained" games and optional save slots. The first game is popped
from the list and started. Quitting still quits the entire ScummVM.
It seemed like the sensible thing to do.
2014-12-30 03:45:14 +01:00
Ben Castricum 0d215badf7 GUI: change FullScreen into fullscreen
This makes it consistant with other references to fullscreen.
2014-08-28 20:46:30 +02:00
Johannes Schickel 960e16009c BASE: Allow 'all' to enable all debug channels via CLI too. 2014-06-05 16:35:07 +02:00
Johannes Schickel f62153c795 BASE: Make GPL headers consistent in themselves. 2014-02-18 02:39:32 +01:00
Johannes Schickel 651e280801 ENGINES: Introduce method Engine::initializePath which sets up SearchMan.
This replaces the hardcoded addition of the game path in runGame in
base/main.cpp by an engine configurable one.
2014-01-22 18:07:06 +01:00
Johannes Schickel ed180f6b67 BASE: Add hack to switch graphics manager in runGame.
This is a (temporary) hack to assure that when the launcher is set up as an
SurfaceSDL graphics mode and the game is using an OpenGL graphics mode
everything will work as expected.
2013-10-19 22:17:42 +02:00
Matthew Hoops 4a7e4e5b22 ALL: Don't use EventRecorder at all when not compiled in 2013-07-06 23:54:45 -04:00
Eugene Sandulenko f59512c47e RECORDER: Implement Events Recorder 2013-05-17 00:18:09 +03:00
Matthew Hoops 893a2b37ff GRAPHICS: Rework YUV->RGB code a bit 2012-09-17 19:30:46 -04:00
D G Turner 03d34f1f92 BASE: Close possible EngineManager memory leak.
This singleton was omitted from fuzzie's memory leak fixes in 6bff611.
Thanks to Tomaz^ for spotting this.
2012-09-18 00:01:36 +01:00
Johannes Schickel b96143c180 Merge pull request #213 from fuzzie/leak-fixes
The pull request in question is "Memory leak fixes".
2012-05-03 13:45:40 -07:00
Johannes Schickel a54045fa7d BASE: Construct empty String instead of using "". 2012-04-01 19:59:23 +02:00
Filippos Karapetis 6a49d3eadd ENGINES: Return all available custom GUI options if no target is specified
This is used to set default settings for all custom game options when an
engine starts
2012-03-31 13:55:03 +03:00
Alyssa Milburn b470c9af28 BASE: Free TTFLibrary singleton on shutdown.
This uses a helper function because TTFLibrary is internal.
2012-03-28 19:17:53 +02:00
Alyssa Milburn 6bff611605 BASE: Destroy singletons on exit. 2012-03-28 19:16:29 +02:00
Filippos KarapetisandJohannes Schickel c84cd8dee8 GUI: Add per-engine and per-game options 2012-03-19 20:32:34 +01:00
Tarek Soliman 6afac4e01e KEYMAPPER: Rename HardwareKey to HardwareInput 2012-02-27 13:00:56 -06:00
Tarek Soliman 784ee5dd65 KEYMAPPER: Fix mistake in last commit 2012-02-22 17:23:12 -06:00
Tarek Soliman befff7ee44 KEYMAPPER: Minor cleanup 2012-02-22 17:17:55 -06:00
Tarek Soliman aa42d78658 KEYMAPPER: Remove automapping dead code 2012-02-21 08:20:40 -06:00
Tarek Soliman 3f6d549b0e KEYMAPPER: Move F7 and F8 handling to DefaultEventMapper 2012-02-20 06:49:22 -06:00
Tarek Soliman 5cf932198e KEYMAPPER: Fix Action ctor args in most keymaps 2012-02-13 23:24:59 -06:00
Tarek Soliman 705761011d KEYMAPPER: Allow ports to define their own global keymap 2012-02-12 13:28:13 -06:00
Tarek Soliman da4b03139d KEYMAPPER: Added Toggle FullScreen action 2012-02-04 19:53:57 -06:00
Tarek Soliman a488556dcd KEYMAPPER: Handle EVENT_MAINMENU directly 2012-02-02 19:10:01 -06:00
Tarek Soliman d143872be6 KEYMAPPER: Constantify global keymap name 2012-01-07 21:20:29 -06:00
Tarek Soliman 40b68b41c7 KEYMAPPER: Make engine keymap init and cleanup more generic 2011-12-30 12:36:11 -06:00
Tarek Soliman b708d6de79 Revert "KEYMAPPER: Make global keymap that is always active"
This reverts commit ac85d134b3.
2011-11-02 10:16:16 -05:00
Tarek Soliman ac85d134b3 KEYMAPPER: Make global keymap that is always active
Keymapper now has a global keymap outside the active keymap stack.
That global keymap is always checked after the active stack has been checked.
2011-10-27 10:46:22 -05:00
Tarek Soliman a69340bd59 BASE: Make global keymap inherit 2011-10-27 10:46:22 -05:00
Johannes Schickel 8d0a88e7f4 BASE: Slight cleanup. 2011-10-06 00:29:22 +02:00