Replaces every way of handling config for each frontend with SimpleIni. frontend_common's Config class is at the center where it saves and loads all of the cross-platform settings and provides a set of pure virtual functions for platform specific settings.
As a result of making config handling platform specific, several parts had to be moved to each platform's own config class or to other parts. Default keys were put in platform specific config classes and translatable strings for Qt were moved to shared_translation. Default hotkeys, default_theme, window geometry, and qt metatypes were moved to uisettings. Additionally, to reduce dependence on Qt, QStrings were converted to std::strings where applicable.
Note: For GCC there are still a huge number of `-Warray-bounds` warnings
coming from `externals/dynarmic`. I could have added a workaround in
`externals/CMakeLists.txt` similar to what this PR does for other
externals, but given Dynarmic's close affiliation with Yuzu, it would be
better to fix it upstream.
Besides that, on my machine, this makes the build warning-free except
for some warnings from glslangValidator and AutoMoc.
Details:
- Disable some warnings in externals.
- Disable `-Wnullability-completeness`, which is a Clang warning triggered
by the Vulkan SDK where if any pointers in the header are marked
_Nullable, it wants all pointers to be marked _Nullable or _Nonnull.
Most of them are, but some aren't. Who knows why.
- `src/web_service/verify_user_jwt.cpp`: Disable another warning when
including `jwt.hpp`.
- `src/input_common/input_poller.cpp`: Add missing `override` specifiers.
- src/common/swap.h: Remove redundant `operator&`. In general, this
file declares three overloads of each operator. Using `+` as an
example, the overloads are:
- a member function for `swapped_t + integer`
- a member function for `swapped_t + swapped_t`
- a free function for `integer + swapped_t`
But for `operator&`, there was an additional free function for
`swapped_t + integer`, which was redundant with the member function.
This caused a GCC warning saying "ISO C++ says that these are
ambiguous".
The latest version of MSVC STL brings C++23 standard library modules, which conflict with precompiled headers.
Disabling with /experimental:module- has no effect, so force C++20 in the meantime while we wait for module support in other compilers.
Enables shadow-uncaptured-locals and implicit-fallthrough for Clang.
implicit-fallthrough is not enabled by default in -Wall or -Wextra, and
shadow-uncaptured-local doesn't seem to be enabled by default by
-Wshadow, even though GCC has both of these by their respective cases.
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.
Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.
The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.
Following REUSE has a few advantages over the current approach:
- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
`.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
files like binary assets / images is always accurate and up to date
To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.
[REUSE]: https://reuse.software
Follow-up to 01cf05bc75
Now that the entire project is free of variable shadowing, we can enforce this as a compile time error to prevent any further introduction of this logic bug.