mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-16 19:14:18 +01:00
Config: Replace FpuNegDivHack with eeDivRoundMode
This commit is contained in:
1 parent
33eefefffb
commit
413ba09ee0
13 files changed
+124
-121
No files matched your search
@@ -120,6 +120,15 @@ void GameDatabase::parseAndInsert(const std::string_view& serial, const c4::yml:
|
||||
else
|
||||
Console.Error(fmt::format("[GameDB] Invalid EE round mode '{}', specified for serial: '{}'.", eeVal, serial));
|
||||
}
|
||||
if (node["roundModes"].has_child("eeDivRoundMode"))
|
||||
{
|
||||
int eeVal = -1;
|
||||
node["roundModes"]["eeDivRoundMode"] >> eeVal;
|
||||
if (eeVal >= 0 && eeVal < static_cast<int>(FPRoundMode::MaxCount))
|
||||
gameEntry.eeDivRoundMode = static_cast<FPRoundMode>(eeVal);
|
||||
else
|
||||
Console.Error(fmt::format("[GameDB] Invalid EE division round mode '{}', specified for serial: '{}'.", eeVal, serial));
|
||||
}
|
||||
if (node["roundModes"].has_child("vuRoundMode"))
|
||||
{
|
||||
int vuVal = -1;
|
||||
@@ -447,6 +456,19 @@ void GameDatabaseSchema::GameEntry::applyGameFixes(Pcsx2Config& config, bool app
|
||||
}
|
||||
}
|
||||
|
||||
if (eeDivRoundMode < FPRoundMode::MaxCount)
|
||||
{
|
||||
if (applyAuto)
|
||||
{
|
||||
Console.WriteLn("(GameDB) Changing EE/FPU divison roundmode to %d [%s]", eeRoundMode, s_round_modes[static_cast<u8>(eeDivRoundMode)]);
|
||||
config.Cpu.FPUDivFPCR.SetRoundMode(eeDivRoundMode);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.Warning("[GameDB] Skipping changing EE/FPU roundmode to %d [%s]", eeRoundMode, s_round_modes[static_cast<u8>(eeRoundMode)]);
|
||||
}
|
||||
}
|
||||
|
||||
if (vu0RoundMode < FPRoundMode::MaxCount)
|
||||
{
|
||||
if (applyAuto)
|
||||
|
||||
Reference in new issue
Block a user