This is dosbox-staging icon (see contrib/icons/), rendered to size
128x128 with rsvg-convert (128x128 is recommended for various Linux DEs,
as this icon will mostly see usage on Linux - macOS and Windows have
icons in their native formats). Data dump created with GIMP with
following settings:
- Use 1 byte Run-Length-Encoding
- Save alpha channel
The host_read*, and host_write* functions currently rely on
casting unaligned memory to translate from byte arrays into
higher-level types (like 16and 32bit ints), however this
approach is implementation specific, can cause undefined
behavior, and forces the compiler to use less efficient
aliasing rules.
Unaligned memory casts have historically been corrected by
expanding multi-byte types into their constituents bytes,
shifting them, and re-packing. They've also been solved using
union objects to access the same underlying memory for each
member (legal under C, but not C++). However, we use memcpy
which is compact, readable, universally compatible, and
compiles down efficient inline single-instructions; therefore
imparting no penalty.
This commit adds host_add* functions (for 16 and 32bit values)
that add a host-formatted value to the implied value at a
memory address.
This commit adds handling for quad-words as well: host_readq,
host_writeq, which we use in the cache, which otherwise suffers
from the same alignment issues.
This way it's more obvious to the reader, what given parameter does
(instead of non-descriptive 'false/true'.
Create alias 'FIXED_SIZE' for 'false' meaning "non-resizable" window. It's a
constexpr bool global variable, so compiler will remind us when it'll
be time to remove it.
This call was useful during development and testing with
output=opengl, but now it's no longer necessary. This call causes
output=texture to go into initialization loop, which falls back to
surface, which we definitely do not want.
'resizable' option turns on resizable window if all the prerequisites
are met (OpenGL and compatible shader). Right now only shader 'sharp' was
tested as compatible, but other built-in shaders might be whitelisted in
the future as well (e.g. 'advmame*' shaders seem like good candidates).
Using incompatible shader does not cause any particular problems for the
users, but it looks really ugly - shader implementations clearly were
implemented only for a fixed window size.
'default' option acts as 'resizable' on Linux and 'original' everywhere
else. It also gives as an option to tweak available windowresolution
settings without causing too much disruption to end users.
It's necessary for usecase when game changes resolution while in game.
We don't want to resize the window in such case, just change minimum
size (SDL might decide to update the window size in the result, if new
resolution is higher than current window size).
This works very well when user is resizing the window and going
in/leaving fullscreen. It does not affect usecase where window size is
being updated by the emulator (e.g. game changing resolution).
Some deployments of GCC won't link ASAN build without explicitly
specifying the library, and report:
"ASan runtime does not come first in initial library list;
you should either link runtime to your application or
manually preload it with LD_PRELOAD"
This commit includes the asan library by default for respective
builds.