mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 09:13:39 +01:00
OpenXR - Use per game stereo separation file
This commit is contained in:
1 parent
93202e47f4
commit
bdde5f0f7f
13 files changed
+669
-25
No files matched your search
@@ -42,6 +42,14 @@ void Compatibility::Load(const std::string &gameID) {
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
IniFile compat;
|
||||
// This loads from assets.
|
||||
if (compat.LoadFromVFS("compatvr.ini")) {
|
||||
CheckSetting(compat, gameID, "UnitsPerMeter", &vrCompat_.UnitsPerMeter);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
IniFile compat2;
|
||||
// This one is user-editable. Need to load it after the system one.
|
||||
@@ -54,6 +62,7 @@ void Compatibility::Load(const std::string &gameID) {
|
||||
|
||||
void Compatibility::Clear() {
|
||||
memset(&flags_, 0, sizeof(flags_));
|
||||
memset(&vrCompat_, 0, sizeof(vrCompat_));
|
||||
}
|
||||
|
||||
void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) {
|
||||
@@ -110,3 +119,9 @@ void Compatibility::CheckSetting(IniFile &iniFile, const std::string &gameID, co
|
||||
*flag |= all;
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
Reference in new issue
Block a user