From 842866d5aee321e1a6713ea8e64ce6f91e025bf2 Mon Sep 17 00:00:00 2001 From: Crementif <26669564+Crementif@users.noreply.github.com> Date: Wed, 13 Jan 2021 01:01:08 +0100 Subject: [PATCH] [BotW] Fix FPS++ slowdown on higher FPS targets --- src/BreathOfTheWild/Mods/FPS++/patch_GameSpeed.asm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/BreathOfTheWild/Mods/FPS++/patch_GameSpeed.asm b/src/BreathOfTheWild/Mods/FPS++/patch_GameSpeed.asm index 0a1c851d..2afa743d 100644 --- a/src/BreathOfTheWild/Mods/FPS++/patch_GameSpeed.asm +++ b/src/BreathOfTheWild/Mods/FPS++/patch_GameSpeed.asm @@ -106,6 +106,7 @@ lis r12, bufferStart@ha ; Load offset to the start of the averaging buffer... lwz r12, bufferStart@l(r12) ; ...into r12 lis r3, bufferEnd@ha ; Load offset to the end of the averaging buffer... lwz r3, bufferEnd@l(r3) ; ...into r3 +addi r3, r3, 0x04 add r11, r12, r30 ; Make full offset by adding r30 (the empty buffer offset) to r12, which is the buffer offset. stfs f10, 0x0(r11) ; Store f12 to the address in r12 + 0x04 using this specific instruction, which also adds the 0x04 to r12 addi r12, r12, 0x04 ; Add 0x04 to the buffer offset to make the next entry offset @@ -133,7 +134,7 @@ lis r11, bufferEnd@ha ; Load offset to the end of the averaging buffer lwz r11, bufferEnd@l(r11) ; ...into r11 addi r12, r12, 0x04 ; Add 0x04 to the current entry offset to have the next entry offset cmpw r11, r12 ; Compare this new entry offset to the end offset -bge .+0x0C ; Skip the next 2 lines if the next entry offset is smaller +bgt .+0x0C ; Skip the next 2 lines if the next entry offset is smaller lis r12, bufferStart@ha ; Load start of the buffer offset... lwz r12, bufferStart@l(r12) ; ...into r12 lis r3, bufferCurrEntry@ha ; Load current buffer entry