mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
Redo down force HFR fix.
This commit is contained in:
parent
d6fcce918a
commit
075ee43808
2 changed files with 23 additions and 3 deletions
|
|
@ -7,6 +7,20 @@
|
|||
float m_lastLoadingFrameDelta = 0.0f;
|
||||
std::chrono::steady_clock::time_point m_lastLoadingFrameTime;
|
||||
|
||||
void DownForceDeltaTimeFixMidAsmHook(PPCRegister& f0)
|
||||
{
|
||||
f0.f64 = 30.0;
|
||||
}
|
||||
|
||||
void DownForceDeltaTimeFixMidAsmHook(PPCVRegister& v127, PPCRegister& f24)
|
||||
{
|
||||
double factor = 1.0 / (f24.f64 * 30.0);
|
||||
v127.f32[0] *= factor;
|
||||
v127.f32[1] *= factor;
|
||||
v127.f32[2] *= factor;
|
||||
v127.f32[3] *= factor;
|
||||
}
|
||||
|
||||
void HighFrameRateDeltaTimeFixMidAsmHook(PPCRegister& f1)
|
||||
{
|
||||
// Having 60 FPS threshold ensures we still retain
|
||||
|
|
|
|||
|
|
@ -143,9 +143,15 @@ registers = ["r30"]
|
|||
|
||||
# Down force HFR fix
|
||||
[[midasm_hook]]
|
||||
name = "HighFrameRateDeltaTimeFixMidAsmHook"
|
||||
address = 0x8234AB94
|
||||
registers = ["f1"]
|
||||
name = "DownForceDeltaTimeFixMidAsmHook"
|
||||
address = 0x82319D60
|
||||
registers = ["f0"]
|
||||
jump_address = 0x82319D64
|
||||
|
||||
[[midasm_hook]]
|
||||
name = "DownForceDeltaTimeFixMidAsmHook"
|
||||
address = 0x82319DCC
|
||||
registers = ["v127", "f24"]
|
||||
|
||||
# 2D spline HFR fix
|
||||
[[midasm_hook]]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue