There's no reason to having a different name for .conf file on every
platform, it only makes things more difficult from user and developer
perspective.
Windows and macOS config files are left as they were, this change
affects mostly Linux users.
Users are not forced to migrate, but visible warning is being issued if
they aren't. Majority of users probably won't notice it, as the stable
release should generate newly named .conf file.
Ubuntu 16.04 would provide better distro compatibility, but we need SDL
in version 2.0.5 or newer to enable resizable window support on Linux.
Pretty soon Ubuntu 20.04 LTS will be released, so targetting previous
LTS release should be enough.
We need this option to make snapshot/nightly builds compatible with
older distros and runtimes (which might not provide libpng 1.6 by
default). Examples are: Ubuntu 16.04 LTS (and derived distros, such as
LTS Mint) or e.g. Steam Runtime.
Change X11 Window WM_CLASS to 'dosbox-staging' to avoid conflicts with
upstream DOSBox, which might be provided by package manager.
Update .desktop file to specify WMClass to be correlated with
dosbox-staging process (even if executable file conflicts with dosbox
upstream).
Update contrib/icons/Makefile to generate 'hicolor' directory structure.
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.