Track whether the RCP hang timer has started to prevent double setting (#689)

* Track whether the RCP hang timer has started to prevent double setting

* removed single letter struct field

* remove debug lines

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
This commit is contained in:
someone2639andsomeone2639 authored and GitHub committed 2023-09-22 08:35:17 -05:00
1 parent e61bf8fbc1
commit 42cbaed631
2 files changed
+17 -3

No files matched your search

+10
View File
@@ -97,6 +97,16 @@ extern s8 gDebugLevelSelect;
extern s8 gShowDebugText;
#endif
// Special struct that keeps track of whether its timer has been set.
// Without this check, there is a bug at high CPU loads in which
// the RCP timer gets set twice and the game tries to
// insert __osBaseTimer into a ring buffer that only contains itself,
// causing a particularly messy crash.
typedef struct {
u8 started;
OSTimer timer;
} OSTimerEx;
void set_vblank_handler(s32 index, struct VblankHandler *handler, OSMesgQueue *queue, OSMesg *msg);
void dispatch_audio_sptask(struct SPTask *spTask);
void exec_display_list(struct SPTask *spTask);