Begins the transition to using fmt for string formatting where
applicable. Given fmt supports formatting std::string instances out of
the box, we can remove now-unnecessary calls to .c_str() and .data().
Note that this change does not touch the actual logging subsystem aside
from converting the final StringFromFormat call in the process over to
fmt::format. Given our logging system is heavily used throughout the
entire codebase, and converting that over will be quite a large change
by itself, this will be tackled near the end of the conversion process.
Currently, it is possible for the DiscordHandler thread to be in the
middle of sleeping when Dolphin is closing. This results in a very
noticeable delay of up to 2 seconds that is unacceptable, especially
for people who don't use the Discord integration.
This fixes the issue by making the thread wait on an Event instead
and signalling it when shutting down.
Previously, this array potentially wouldn't be placed within the
read-only segment, since it wasn't marked const. We can make the lookup
table const, along with any other nearby variables.
It appears that some older drivers do not support
CreateSwapChainForHwnd, resulting in DXGI_ERROR_INVALID_CALL. For these
cases, fall back to the base CreateSwapChain() from DXGI 1.0.
In theory this should also let us run on Win7 without the platform
update, but in reality we require the newer shader compiler so this
probably won't work regardless. Also any hardware of this vintage is
unlikely to run Dolphin well.
We can use std::array and const char* to make these capable of fully
being stored in the read-only segment, and get rid of a few static
constructors (144 of them).
Avoids dragging in IniFile, EXI device and SI device headers in this header which is
quite widely used throughout the codebase.
This also uncovered a few cases where indirect inclusions were being
relied upon, which this also fixes.
We can std::move the std::string parameter in Label's constructor,
allowing the constructor to be moved into in calling code.
We can cascade this outwards in the interface as well.
Given this is a private struct and it's used in a container that
supports incomplete types, we can forward-declare it and move it into
the cpp file. While we're at it, we can change the name to Label to
follow our formatting guidelines.
We also move the destructor definition into the cpp file, as that will
allow us to make the entire label_t type hidden from external view in a
following change.
This aims to emulate rotational latency as part of the disc drive
timings, which makes loading times have more variance (like on a
real disc drive) but should not affect the average loading times.
Starting with C++17, this allows for the same behavior as the existing
code, but without the need to manually write the out-of-class
definitions as well.