This keywords is only a hint, was used in C in 1970s, but is useless
nowadays. Some reports indicate, that GCC never used it to actually
treat variable as a register.
It was deprecated from C++ in 2009:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4193.html#809
It was removed from language in C++17, and will likely see new meaning
in some future standard, similar to how 'auto' got replaced in C++11.
Replace the [sdl] `autolock = true/false` configuration setting with [sdl]
`capture_mouse = ...` with a two-value setting.
The first value defines how the mouse is controlled:
- onclick: The mouse will be captured with a click inside the window.
- onstart: The mouse is captured immediately on start (similar to real DOS).
- seamless: The mouse will move seamlessly in and out of DOSBox and cannot be captured.
- nomouse: The mouse is disabled and hidden without any input sent to the game.
The second value defines how middle-clicks are handled:
- middlegame: Middle-clicks are sent to the game (not used to uncapture the mouse).
- middlerelease: Middle-click will uncapture the mouse when windowed (not sent to the game).
Middle-clicks are sent to the game when fullscreen or when seamless control is set.
The default setting of "onclick middlegame" reproduces DOSBox's existing behavior.
This is accomplished by clearing all the binds on the events, and
then re-parsing the file.
This allows batch scripts to change keybindings, and is useful for DOS
game menus, who can now change the mappings per-game.
ie: config -set sdl mapperfile=~/.dosbox/mario-and-luigi.map
or: config -r -conf ~/.dosbox/mario-and-luigi.conf
(with a mapperfile=mario-and-luigi.map line in mario-and-luigi.conf)
Warning: Because internal changes don't have access to the
current_config_path, paths set with config -set are relative to the
CWD. Relevant source lines are src/misc/setup.cpp lines 349 and 917
I'm unsure if this interacts well with the CAPS and NUMLOCK code at the
bottom of MAPPER_Init, as those now get run every time the mapper
reloads. If it does misbehave, those if statements can probably be
moved to the MAPPER_StartUp function, although it is called a bit earlier
than MAPPER_Init.
A natural extension of this would be to add the ability to change the
mapperfile from within the MAPPER UI.
Adds a `--disable-opus-cdda` flag that explicitly disables support
for Ogg Opus CDDA tracks and in turn avoid the need for the Opus package
dependencies such as the opusfile, opus, and ogg libraries.
This feature does not alter the default operation of ./configure, which
is to enable Opus CDDA support and quit if the Opus dependency package,
opusfile, is not found. The user can then choose to either a) install
the package or b) explicitly disable Opus support.
This commit also includes:
- fixes for a double-free in the MP3 close routine that
was discovered during testing
- a message if a CD audio track cannot be added during CDROM
mounting (such as attempting to use Opus tracks when the binary
does not support them).
- the --disable-opus-cdda flag in our config heavy workflow
The 'ptr' pointer in the 'ptr += sizeof (FM_OPL)' expression could be nullptr. In such case,
resulting value will be senseless and it should not be used.
One issue in BinaryFile's constructor:
There is no sense in testing the 'file' pointer against null, as
the memory was allocated using the 'new' operator. The exception
will be generated in the case of memory allocation error.
'new'
- https://www.viva64.com/en/w/v668/
Two issues relating to assigning a value that's already assigned
- https://www.viva64.com/en/w/v1048/
Users who test dosbox-staging via various GUI frontends might have a
problem distinguishing if the instance they have configured is really
dosbox-staging or some other version of DOSBox. Different splash screen
is a simple remedy for it.
Two graphical files are included: one in vector format to allow for
further refinements and one converted to necessary size in png format,
that is used as direct source of logo embedded in the source code. Use
GIMP to convert the png logo to a C file.
Notes about new design:
Orange background was replaced by black to make switch to black
background of empty terminal a little less jarring.
The box side is covered with the rainbow-like pattern to resemble logos
of various computer platforms popular in the 80s. AFAIK IBM or
PC-clones never had such colourful logos, but the point is to resemble
a retro-computing platform while being aesthetically pleasing.
Some computing platforms, that used rainbow patterns are Sinclair,
Commodore, Amiga, Dragon 32, and Apple. The pattern used for
dosbox-staging splash is deliberately different from all of these.
Word "staging" is rendered using excellent Raleway font:
https://www.theleagueofmoveabletype.com/raleway
This change is not supposed to be upstreamed.
There are two functions: one for handling EGA and VGA machines, and
"other" handling all remaining cases. This makes it somewhat clear which
cases should be handled where.
M_TANDY16 seems incorrectly handled in 2 places; this patch decides not
preserve existing behaviour (and adds TODOs). Runtime behaviour changed
only for debug builds.
This way we prevent pointless dynamic_cast; correct usage of
dynamic_cast requires a nullcheck, which was missing in this case
causing Coverity to complain.
Instead of changing cast, let's make this method a virtual one in base
class - this way we could reuse it in future for cases outside of CD-ROM
(e.g. write-protected floppies).
Coverity finds use after free on value pointed by sample_list, but fails
to detect, that this is a global variable, that is being updated by
Sound_FreeSample before freeing any memory.
This code is obviously written with the purpose of freeing whole list,
so there's nothing unexpected here - this is definitely a false
positive finding.
We could mark this issue as false-positive in Coverity, but I think it's
better to avoid tripping it in the first place.
Break lines in descriptions, so that generated .conf file have at most
~80 columns, making it easier to read. This change is made only in
sblaster section.