Commit Graph

956 Commits

Author SHA1 Message Date
Bastien Bouclet
9d62f13e3a BASE: Fix a segfault when mass detector encounters an empty directory
Was introduced in the recent detection rework.
2018-06-17 18:09:40 +02: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
1dcb8076db ENGINES: Remove usage of C++11 extended initializer lists 2018-05-10 09:26:26 +02:00
Bastien Bouclet
90b78c5446 ENGINES: Merge GameDescriptor and DetectedGame 2018-05-10 09:04:23 +02:00
Bastien Bouclet
faa2534f46 ENGINES: Factor adding games to ConfMan 2018-05-10 09:04:23 +02:00
Bastien Bouclet
5aff87dc15 ENGINES: Turn GameDescriptor into a simple struct 2018-05-10 09:04:23 +02:00
Bastien Bouclet
643c24db75 ENGINES: Change MetaEngine::listSupportedGames to return plain game descriptors 2018-05-10 09:04:23 +02:00
Bastien Bouclet
8fb149e3c7 ENGINES: Change MetaEngine::findGame to return a plain game descriptor 2018-05-10 09:04:23 +02:00
Bastien Bouclet
cf1ebf2951 ENGINES: Add unknown game variants to the game detector results 2018-05-10 09:04:23 +02:00
Lothar Serra Mari
451cf2304f ENGINES: Show the unknown Game dialog only when the detector is launched by the Add Game feature 2018-04-29 21:47:10 +01:00
Thierry Crozat
cb02d7471d BASE: Allow listing save games for all targets 2018-04-25 19:40:20 +01:00
Thierry Crozat
5907add148 BASE: Use --game to specify target for --list-saves command
This change brings the --list-saves command syntax in line with
other commands.
2018-04-25 19:40:20 +01:00
Bastien Bouclet
818117bda2 BASE: Allow options to come after command on the command line 2018-04-22 08:23:58 +02:00
Adrian Frühwirth
3747d852ee JANITORIAL: Fix whitespace 2018-04-15 16:31:31 +02:00
Tarek Soliman
093d477a08 BASE: Minor text fix for --copy-protection help 2018-04-12 20:28:39 -05:00
Vincent Bernat
9edd8eff01 AUDIO: add support for OPL2LPT
The OPL2LPT is an OPL2 chip plugged on a parallel port. It is
write-only but otherwise acts as a classic AdLib. This commit adds
support for this device.

User is expected to have the right permissions on the parallel
port. By default, the first suitable parallel port is used. It is
possible to override that with the hidden configuration setting
"opl2lpt_parport".

It depends on the presence of the libieee1284 library which abstracts
a bit parallel port handling. An alternative would be to access
directly /dev/parportX on Linux. This would amount of code but it
would be Linux-only.

Tested with Indy 3 and SOMI.
2018-04-08 09:17:19 +02:00
Eugene Sandulenko
e0968df671 BASE: Show nuked audio driver only when compiled 2018-04-07 09:37:58 +02:00
nukeykt
b2052bc66f AUDIO: Add Nuked OPL3 core 2018-04-07 09:34:00 +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
cd7e6cd31c RELEASE: This is 2.1.0git 2017-11-30 00:13:10 +00:00
Colin Snover
c13defd661 RELEASE: 1.10 will henceforth be known as 2.0
General consensus on the ML was that people wanted to do this.
http://lists.scummvm.org/pipermail/scummvm-devel/2017-November/012008.html
2017-11-21 15:26:52 -06:00
Bastien Bouclet
2f733c812a BASE: Minor command line detection cleanup 2017-11-02 19:49:43 +01: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
62957b38ac CMD: Handle --game=<ID> for --detect and --auto-detect
The README and command line help indicated this should work,
but this was not implemented.
2017-08-06 19:14:13 +01:00
Thierry Crozat
8e5b8510c8 CMD: Improve warnings for --detect and --add when no game is found 2017-08-06 19:14:13 +01:00
Tobia Tesan
78253e38d1 CMD: Print full path information for --detect 2017-08-06 19:14:13 +01:00
Tobia Tesan
31c541beda CMD: Update error codes in case of autodetector error 2017-08-06 19:14:13 +01:00
Tobia Tesan
426ec1f989 CMD: Add --recursive option for adding & detection
New semantics is as follows:

[-p <dir>] --add                 adds all games in <dir> or
                                 working dir

[-p <dir>] --detect              enumerates dectected games in
                                 <dir> with their ids

[-p <dir>] --game <id> --add     adds just game <id> if found
                                 in <dir> and not already added

[-p <dir>] --recursive --add     adds all games in <dir> and
                                 subdirs if not already added

[-p <dir>] --recursive --game <id> --add
                                 adds just game <id> if found
                                 in <dir> or its subdirs and
                                 not already added

[-p <dir>] --recursive --detect  enumerates games in <dir>
                                 and subdirs

[-p <dir>] --auto-detect         launches the first game
                                 found in <dir>

[-p <dir>] --recursive --auto-detect
                                 displays error message

The reason for the displaying an error message when attempting to do
autodetection on a whole tree is mainly one of UX, IMO it *might* get
confusing on a sufficiently large/deep tree.
The relevant if() can be removed safely if it's concluded that's not the
case.
2017-08-06 19:14:13 +01:00
Tobia Tesan
c3058ad0ee CMD: Fix batch adding of games
This implements the behaviour as discussed in PR926:
https://github.com/scummvm/scummvm/pull/926#discussion_r126132411

Essentially:

[-p <dir>] --add                adds all games in <dir> or working dir
[-p <dir>] --detect             enumerates dectected games with their
ids
[-p <dir>] --game <id> --add    adds just game <id>
2017-08-06 19:14:13 +01:00
Eugene Sandulenko
940b2a20f1 Revert "COMMON: Change way the Singleton instances are instantiated"
This reverts commit eefa72afa1.

With this patch ConfigManager is broken.
2017-07-10 21:17:41 +02:00
Thierry Crozat
eefa72afa1 COMMON: Change way the Singleton instances are instantiated
This fixes tons of warnings with clang from a recent xcode version on
macOS (and possibly other systems) complaining that an instantiation
of _singleton is required but no definition is available.
2017-07-10 21:11:20 +02:00
Thierry Crozat
ee0ac26621 BASE: Fix auto-detect command to detect and start game
There were several issues.

The first one was introduced recently and caused the preferred target
to be used as a game ID, which resulted in an error when this is not
a valid game ID. Thus this fixes bug #9754.

The other issues were here since the auto-detect command was added and
caused other command line options, suh as the path, to be lost. This
usually resulted in a failure to start the game as the data files could
not be found (unless the ID happened to be the same name as a target
previously added). This also caused a reappearance of the old bug
2017-05-03 00:17:16 +01:00
Thierry Crozat
ae8944e104 BASE: Improve error handling when detecting games 2017-04-24 20:04:05 +01:00
Thierry Crozat
5d91efa74d BASE: Check scanf return value when adding a game 2017-04-24 20:04:05 +01:00
yinsimei
28ab63136a CMD: Detect and add game(s) with commandline
This implements feature request #7885
2017-04-23 21:52:19 +01:00
Thierry Crozat
7caeb60350 BASE: Ignore -NSDocumentRevisionDebugMode command line argument on OS X
This is automatically added by Xcode when not toggling off the
"Allow debugging when using document Versions Browser". Since
this is on by default, and to avoid everybody having to google it,
I have decided to just ignore it on OS X.
2017-02-06 21:54:50 +00:00
Thierry Crozat
577e189a37 BASE: Auto-detect now starts the first game found 2016-11-07 19:29:53 +00:00
Thierry Crozat
6d2fd12bb4 BASE: Clarify how to specify a path in help for the auto-detect command 2016-10-29 23:41:21 +01:00
Thierry Crozat
5fd376d020 BASE: Auto-detect option now uses the specified path 2016-10-29 17:56:47 +01:00
iskrich
d65f2b3821 BASE: Formatting code 2016-10-29 17:56:47 +01:00
iskrich
598407a425 BASE: Add --auto-detect command
Allows to display games in the current directory that are compatible with ScummVM.

This option enables the user to find games in the directory from which ScummVM was launched. In terminal it looks like:

--------------------------------------------------------------------------------------

$ scummvm --auto-detect

ID                   Description
-------------------- ---------------------------------------------------------
drascula             Drascula: The Vampire Strikes Back (DOS/English)
queen                Flight of the Amazon Queen (Talkie/DOS/English)

--------------------------------------------------------------------------------------

The current directory is defined as dir(".") then using EngineMan.detectGames to recognise games.
2016-10-29 17:56:47 +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
047e0b9f84 BASE: Add command line for specifyong Director start movie 2016-10-24 10:56:40 +02: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
Eugene Sandulenko
53790e7497 RELEASE: This is 1.10.0git 2016-09-26 20:57:54 +02:00
Eugene Sandulenko
4af0bc4924 AMIGAOS: Amiga needs date in specific format in version cookie. Now AmiUpdate works 2016-09-10 22:19:32 +02:00
Alexander Tkachev
b180c73675 CLOUD: Do some refactoring/cleanup
Nothing really major.
2016-08-24 16:07:55 +06:00