Show active compat flags on crash screen

This commit is contained in:
Henrik Rydgård committed 2024-12-10 01:43:44 +01:00
1 parent 594a68eed5
commit 419c329b06
4 files changed
+31 -8

No files matched your search

+14 -5
View File
@@ -74,6 +74,7 @@ void Compatibility::Load(const std::string &gameID) {
void Compatibility::Clear() {
memset(&flags_, 0, sizeof(flags_));
memset(&vrCompat_, 0, sizeof(vrCompat_));
activeList_.clear();
}
void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) {
@@ -163,18 +164,26 @@ void Compatibility::CheckSetting(IniFile &iniFile, const std::string &gameID, co
// Shortcut for debugging, sometimes useful to globally enable compat flags.
bool all = false;
iniFile.Get(option, "ALL", &all, false);
*flag |= all;
if (all) {
*flag |= all;
if (!activeList_.empty()) {
activeList_ += "\n";
}
activeList_ += option;
}
}
}
void Compatibility::CheckSetting(IniFile &iniFile, const std::string &gameID, const char *option, float *flag) {
std::string value;
iniFile.Get(option, gameID.c_str(), &value, "0");
*flag = stof(value);
if (iniFile.Get(option, gameID.c_str(), &value, "0")) {
*flag = stof(value);
}
}
void Compatibility::CheckSetting(IniFile &iniFile, const std::string &gameID, const char *option, int *flag) {
std::string value;
iniFile.Get(option, gameID.c_str(), &value, "0");
*flag = stof(value);
if (iniFile.Get(option, gameID.c_str(), &value, "0")) {
*flag = stof(value);
}
}