[Config] Gracefully handle type mismatches in cvars.

Detect cvar type mismatch and reset to default value, as well
as show message to the user that the cvar from the config has
been updated.
This commit is contained in:
Herman S.
2025-11-06 09:42:28 +09:00
committed by Radosław Gliński
parent 70e44ab6ec
commit 93adb2bb95
3 changed files with 45 additions and 2 deletions

View File

@@ -30,6 +30,7 @@ cxxopts::Options options("xenia", "Xbox 360 Emulator");
std::map<std::string, ICommandVar*>* CmdVars;
std::map<std::string, IConfigVar*>* ConfigVars;
std::multimap<uint32_t, const IConfigVarUpdate*>* IConfigVarUpdate::updates_;
std::vector<std::string>* config_type_mismatch_warnings = nullptr;
void PrintHelpAndExit() {
std::cout << options.help({""}) << std::endl;