diff --git a/include/rb3enhanced.h b/include/rb3enhanced.h index f68c383..10b30af 100644 --- a/include/rb3enhanced.h +++ b/include/rb3enhanced.h @@ -33,3 +33,8 @@ extern int RB3E_LoadedSongCount; // Emulator detection int RB3E_IsEmulator(); + +// StageKit set state, needed for fixing LED bug. +#ifdef RB3E_XBOX + void StagekitSetStateHook(int state1, int state2); +#endif diff --git a/source/GameHooks.c b/source/GameHooks.c index 27387c3..798e94f 100644 --- a/source/GameHooks.c +++ b/source/GameHooks.c @@ -68,5 +68,12 @@ void *GameDestructHook(void *theGame, int r4) { char in_game = 0x00; RB3E_SendEvent(RB3E_EVENT_STATE, &in_game, sizeof(in_game)); + +#ifdef RB3E_XBOX + // When not in-game, turn off the stage-kit lights. + // Fixes the RB3 bug(?) that leaves 2 red leds on when exiting the score view screen. + StagekitSetStateHook(0x00, 0xFF); +#endif + return GameDestruct(theGame, r4); }