Files
SimpleRemoter/common
yuanyuanxiang 8b92f32c47 fix(config): stop reads from creating empty registry subkeys
iniFile/binFile::GetCachedKey used RegCreateKeyExA for every access, so a plain
GetStr/GetInt on a missing section materialised an empty subkey. CScreenManager's
constructor calls LoadQualityProfiles() unconditionally, which reads profile0..
profile5 x4 keys, so every client start left six zero-valued subkeys behind:
126 of them on the dev box, all with zero values. The server's HKCU\SoftwareYAMA\quality key is the same artefact.

Split the helper by intent: writes go through RegCreateKeyExA, reads through
RegOpenKeyExA. Both still ask for KEY_READ|KEY_WRITE, because the handle cache is
shared and a read-only cached handle would make a later SetStr on the same
section fail.

Also fixes a second bug in SaveQualityProfiles: when a level matched the default
it simply continued, so a level the operator reset to default kept the old
custom values in the registry and the reset never took effect. Add
SectionExists() (open-only, never creates) and write the defaults back when the
section already exists.
2026-11-02 14:12:21 +01:00
..