File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
mods/Standalones/Profiler/src Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -480,8 +480,19 @@ void Hook_DrawOTag(int a)
480480 DrawOTag (a );
481481}
482482
483- // JMP hooks for callbacks...
483+ void Hook_RA_Vsync ()
484+ {
485+ void DebugProfiler_Subsection (int flag );
486+ DebugProfiler_Subsection (1 );
487+ }
488+
489+ void Hook_RA_DrawSync ()
490+ {
491+ void DebugProfiler_Subsection (int flag );
492+ DebugProfiler_Subsection (2 );
493+ }
484494
495+ #define JMP (dest ) (((unsigned long)dest & 0x3FFFFFF) >> 2 | 0x8000000)
485496#define JAL (dest ) (((unsigned long)dest & 0x3FFFFFF) >> 2 | 0xC000000)
486497
487498void RunEntryHook ()
@@ -530,5 +541,7 @@ void RunEntryHook()
530541 * (int * )0x80037854 = JAL (Hook_Timer );
531542 * (int * )0x800379b0 = JAL (Hook_DrawOTag );
532543
533- // JMPs for vsync/drawsync
544+ // JMPs for vsync/drawsync on JR $RA
545+ * (int * )0x80034b40 = JMP (Hook_RA_Vsync );
546+ * (int * )0x80034a9c = JMP (Hook_RA_DrawSync );
534547}
You can’t perform that action at this time.
0 commit comments