Pcsx2Config's strings do not terminate in Pcsx2Config.cpp. They run
through two abstract interfaces:
FilenameOptions::Bios (std::string)
-> SettingsWrapper::Entry(..., std::string&) 2 impls
-> SettingsInterface::GetStringValue(std::string*) 2 impls
So the conversion starts at the bottom, as it had to in IopBios:
SettingsInterface gains GetStringValueBuf and SettingsWrapper gains
EntryBuf, both implemented in both of their subclasses
(MemorySettingsInterface / LayeredSettingsInterface, load / save).
With those in place the Config fields become mechanical.
GetStringValueBuf reports out_len -- the length the value actually had
-- so a caller can tell truncation from a short value. That is the
failure this whole area risks: a path cut at a buffer boundary is
silent, and nothing downstream can distinguish it from the user having
typed something short.
FilenameOptions::Bios is the first field converted. Its constructor
now zeroes the buffer explicitly, because a char array has no default
constructor and std::string did -- an uninitialised settings field
would read as garbage rather than as empty.
Verified with the round trip added in the previous commit: 14 cases, 0
failing, matching the pre-change baseline, including paths of exactly
64, 128, 255, 256, 511, 512 and 1024 bytes. Then the usual: BIOS still
found and identified at boot, Tekken from .cue, .cso and .chd at 1150
frame hashes each identical to baseline, savestate replay matching at
head[554], audio hash identical, gates 36/36. Both build systems, both
configurations.
The remaining Config fields -- Adapter, EthDevice, HddFile,
GzipIsoIndexTemplate, CurrentIRX, CurrentGameArgs, Mcd[].Filename --
are the same change repeated, each gated by the same round trip.
Dropping fast_float from StringUtil.h shrank the include graph every TU
in its closure had been leaning on, and GCC 16.2's leaner libstdc++
surfaced the reliance as build failures (GameDatabase.cpp, IopBios.cpp
on MinGW). Swept the whole closure -- 29 TUs and the 185 project headers
they pull -- for symbols resolved only through std-header transitivity,
and gave every file its own includes: <algorithm> and <utility> where
std::find/none_of/move live, <cmath> in the GSVector umbrella for the
sqrtf its fragments use, <system_error> in StringUtil.h for std::errc,
<cerrno>, <iterator>, <cstring> where named, and <string.h> in
retro_miscellaneous.h so the BIT*_CLEAR_ALL macros expand anywhere.
PRI_SIZET stays as-is: inttypes.h is the expansion site's include, and
MSVC 2005 has no such header.
Verified with a full pcsx2_libretro.so rebuild, the failing objects
through the Makefile path, the 36-TU emitter gate, and C89 checks on
the touched C header.