diff options
| author | Philip Dubé <159546+serprex@users.noreply.github.com> | 2026-08-09 01:05:15 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-09 01:05:15 +0000 |
| commit | 5ecff16bdb259b8aed7b2d53e03e32e6dcef72ae (patch) | |
| tree | e6c54dbb0434d9502d43dd1e0ff3899bc60a3d01 /soh/src/code/graph.c | |
| parent | 404ec05fc517164fd3fbb9b2967e67084b777ddc (diff) | |
Fix heap corruption due to skybox code using GameState as PlayState (#7045)
Also corrects clearing skybox context before Skybox_Setup
Diffstat (limited to 'soh/src/code/graph.c')
| -rw-r--r-- | soh/src/code/graph.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/soh/src/code/graph.c b/soh/src/code/graph.c index 1b7922592..4190955a9 100644 --- a/soh/src/code/graph.c +++ b/soh/src/code/graph.c @@ -28,7 +28,6 @@ FaultClient sGraphFaultClient; CfbInfo sGraphCfbInfos[3]; FaultClient sGraphUcodeFaultClient; -void Skybox_Setup(PlayState* play, SkyboxContext* skyboxCtx, s16 skyboxId); void PadMgr_ThreadEntry(PadMgr* padMgr); // clang-format off @@ -438,7 +437,6 @@ extern void ProcessSaveStateRequests(void); static void RunFrame() { u32 size; char faultMsg[0x50]; - static bool hasSetupSkybox = false; switch (runFrameContext.state) { case 0: @@ -469,14 +467,6 @@ static void RunFrame() { } GameState_Init(gGameState, runFrameContext.ovl->init, &runFrameContext.gfxCtx); - // Setup the normal skybox once before entering any game states to avoid the 0xabababab crash. - // The crash is due to certain skyboxes not loading all the data they need from Skybox_Setup. - if (!hasSetupSkybox) { - PlayState* play = (PlayState*)gGameState; - Skybox_Setup(play, &play->skyboxCtx, SKYBOX_NORMAL_SKY); - hasSetupSkybox = true; - } - uint64_t freq = GetFrequency(); while (GameState_IsRunning(gGameState)) { |
