summaryrefslogtreecommitdiff
path: root/src/code/graph.c
diff options
context:
space:
mode:
authorpetrie911 <pmontag@Monday.localdomain>2023-10-05 08:01:26 -0500
committerpetrie911 <pmontag@Monday.localdomain>2023-10-05 08:01:26 -0500
commite69b2afb609bc4c180e19d1674e9a38b021eb8e9 (patch)
tree912f0b48250f467a187e667c3e3bd578bf471639 /src/code/graph.c
parenta9897faf0d438772b746d8bb8ad0932075e55455 (diff)
parent03d1a794e1fe3995ae3f4ca99e244e4b14310092 (diff)
Merge remote-tracking branch 'upstream/main' into goht-collab
Diffstat (limited to 'src/code/graph.c')
-rw-r--r--src/code/graph.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/code/graph.c b/src/code/graph.c
index bce162406..3a178d2b8 100644
--- a/src/code/graph.c
+++ b/src/code/graph.c
@@ -1,3 +1,4 @@
+#include "prevent_bss_reordering.h"
#include "z64.h"
#include "regs.h"
#include "functions.h"
@@ -8,7 +9,7 @@ FaultAddrConvClient sGraphFaultAddrConvClient;
FaultClient sGraphFaultClient;
GfxMasterList* gGfxMasterDL;
CfbInfo sGraphCfbInfos[3];
-OSTime sGraphTaskStartTime;
+OSTime sGraphPrevUpdateEndTime;
#include "variables.h"
#include "macros.h"
@@ -16,6 +17,7 @@ OSTime sGraphTaskStartTime;
#include "idle.h"
#include "sys_cfb.h"
#include "system_malloc.h"
+#include "z64speed_meter.h"
#include "overlays/gamestates/ovl_daytelop/z_daytelop.h"
#include "overlays/gamestates/ovl_file_choose/z_file_select.h"
#include "overlays/gamestates/ovl_opening/z_opening.h"
@@ -310,17 +312,17 @@ void Graph_ExecuteAndDraw(GraphicsContext* gfxCtx, GameState* gameState) {
{
OSTime time = osGetTime();
- D_801FBAE8 = sRSPGFXTotalTime;
- D_801FBAE0 = gRSPAudioTotalTime;
+ gRSPGfxTimeTotal = gRSPGfxTimeAcc;
+ gRSPAudioTimeTotal = gRSPAudioTimeAcc;
gRDPTimeTotal = gRDPTimeAcc;
- sRSPGFXTotalTime = 0;
- gRSPAudioTotalTime = 0;
+ gRSPGfxTimeAcc = 0;
+ gRSPAudioTimeAcc = 0;
gRDPTimeAcc = 0;
- if (sGraphTaskStartTime != 0) {
- lastRenderFrameDuration = time - sGraphTaskStartTime;
+ if (sGraphPrevUpdateEndTime != 0) {
+ gGraphUpdatePeriod = time - sGraphPrevUpdateEndTime;
}
- sGraphTaskStartTime = time;
+ sGraphPrevUpdateEndTime = time;
}
}