Commit Graph

384 Commits

Author SHA1 Message Date
Eric Culp 6d11f46b15 BASE: Only reload engine plugins after return to launcher
The other plugins do not need to be reloaded. Reloading
the scaler plugins breaks the graphics.
2019-03-10 03:49:29 +02:00
Bastien Bouclet bbbd40477d GUI: Add an option to set the GUI language to the game language 2018-12-02 19:47:32 +01:00
Thierry Crozat adacb4fcfd BASE: Add command line stretch mode arg 2018-07-08 16:54:51 +01:00
Torbjörn Andersson 4ea8ed4ff5 JANITORIAL: Fix comment typo 2018-06-13 20:49:36 +02:00
Bastien Bouclet 643ce81cf7 BASE: Remove temporary targets when they fail to launch
Prevents invalid targets created from the command line to show up in the
launcher.

Fixes Trac#2788.
2018-06-03 13:48:31 +02:00
Bastien Bouclet 8fb149e3c7 ENGINES: Change MetaEngine::findGame to return a plain game descriptor 2018-05-10 09:04:23 +02:00
Adrian Frühwirth 3747d852ee JANITORIAL: Fix whitespace 2018-04-15 16:31:31 +02:00
Colin Snover d087c9605f BASE: Remove bad casts between incompatible Plugin types
Previously, a C-style cast was used to convert a
Common::Array<Plugin *>, populated with pointers to StaticPlugin
and DynamicPlugin instances, to a
Common::Array<PluginSubclass<T> *>, but PluginSubclass<T> is a
*sibling* class to StaticPlugin/DynamicPlugin, so this cast was
invalid and the results undefined. The methods for retrieving
subclasses of plugins can't be easily changed to just generate an
array of temporary wrapper objects that expose an identical API
which dereferences to the preferred PluginObject subclass because
pointers to these objects are retained by other parts of ScummVM,
so the wrappers would needed to be persisted or they would need to
just re-expose the underlying Plugin object again. This indicated
that a way to solve this problem is to have the callers receive
Plugin objects and get the PluginObject from the Plugin by
explicitly stating their desired type, in a similar manner to
std::get(std::variant), so that the pattern used by this patch to
solve the problem.

Closes gh-1051.
2017-12-03 20:26:38 -06:00
Thierry Crozat d98d4bc25d UPDATES: Fix crash when compiling with updates enabled but without an UpdateManager
This can happen when Sparkle was not found during configure which results
in USE_UPDATES being defined but USE_SPARKLE not being defined.
2017-09-08 21:21:53 +01:00
Thierry Crozat 3ae52a61af COMMON: Add referencing and destruction of the OSDMessageQueue instance
Registering the OSDMessageQueue instance as an event source is now done
right after the event manager is initialised. This ensures that it is created in a
sensible place and not for example in another thread). Also registering the
event source is moved to a separate function instead of being in the constructor
to remove any issue in case some code tries to display a OSD Message very early
on (the instance would be created then, but it would be registered as an event
source later).
2016-10-29 15:13:32 +01:00
Eugene Sandulenko e8b70a4686 ALL: Fix compilation with disabled cloud but enabled libcurl 2016-10-17 18:55:22 +02:00
Thierry Crozat 3e08c33c35 GUI: Add checkbox and config option to enable/disable graphics filtering 2016-10-13 01:45:01 +01:00
Eugene Sandulenko 355c4fa646 JANITORIAL: Remove more trailing spaces 2016-10-09 15:02:02 +02:00
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
vandalo 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 Karapetis 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