When parsing the command line option "window-size" the DO_LONG_OPTION
inserts "window-size" into the settings StringMap. This is soon later
deleted, but instead of deleting "window-size" it deletes the
non-existent setting "window_size". This is needed because width and
height are stored in "last_window_width" and "last_window_height"
respectivly and "window-size" is not used anywhere.
This means building and running scummvm in tree now works out of the box.
Unfortnatelly registering them as defaults would not work as
ConfMan::hasKey() returns false when only defined as a default, and
in most places this is checked before using those paths. So if we
wanted to use defaults we would need to replace all those checks with
a check that the path is not empty.
There is a drawback to using the session domain though: it takes
priority over all other domains. So a custom extrapath defined for
a game will be ignored. We try to mitigate the issue by only adding
those path if they exist(so that it does not break shadow builds for
example).
Also the change is excluded on Windows as it is not needed there
since the themes and engine data files are embedded in the executable.
This allows opening the launcher after running a command line command,
such as --add. The main use for this would be for backends to be able
to easily add games from a folder on launch.
Normally, GameSpy Arcade (or a third-party app) would set these settings
into moonbase.ini for the game to read. But I feel like a couple of
command line options would be a lot simpler.
Also, doubles as a quick way to host and join a game for testing.
Unfortunately this does not support the demo version.
This allows an initial/default configuration file to be specified via the command line. This allows a default settings file to be bundled and loaded even if it's installed to a read-only location, such as Program Files on Windows, and allows the written config file to be deleted without losing the custom defaults.
Place file named 'scummvm=autorun' next to the ScummVM.
If the file is empty, scummvm will run in autodetect mode, basically
as './scummvm -p . --auto-detect'.
If the file is not empty, then command line parameters will be read
from it one per line. Empty lines and lines starting from '#' are ignored.
If the user supplies more parameters at the command line, those
will also be used and will override the parameters from the autorun file.
Rename scummvm executable into 'scummvm-auto*' and it is equivalent
of 'scummvm -p . --auto-run'. All additional arguments on the command
line are also processed and override the automatic arguments.
This was not properly implemented in GCC versions before 5.1, and
we still have some ports using older GCC versions.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43453#c7 and commit
6ac3994e3e582ec6a304c2a566bb1b0c69d507d2.