diff --git a/src/d_main.c b/src/d_main.c index 43eae53e6..dc64ba6f7 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -220,11 +220,12 @@ static void D_GamePadMenuScrollTicker(void) } #undef SCROLLDELAY +static UINT16 curcolor[MAXSPLITSCREENPLAYERS] = {0}; + static void D_DeviceLEDTick(void) { UINT8 i; static UINT16 color[MAXSPLITSCREENPLAYERS] = {0}; - static UINT16 curcolor[MAXSPLITSCREENPLAYERS] = {0}; if (numcontrollers == 0) { @@ -246,6 +247,11 @@ static void D_DeviceLEDTick(void) } } +void D_ResetDeviceLED(void) +{ + memset(curcolor, 0, sizeof(curcolor)); +} + // // D_ProcessEvents // Send all the events of the given timestamp down the responder chain @@ -1021,6 +1027,7 @@ void D_StartTitle(void) D_ClearState(); M_ClearMenus(true); F_StartTitleScreen(); + D_ResetDeviceLED(); } // diff --git a/src/d_main.h b/src/d_main.h index 787e298ab..fe904e15a 100644 --- a/src/d_main.h +++ b/src/d_main.h @@ -87,6 +87,8 @@ void D_ProcessEvents(void); const char *D_Home(void); +void D_ResetDeviceLED(void); + // // BASE LEVEL // diff --git a/src/p_setup.c b/src/p_setup.c index eb31f3451..54f17cea8 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -3025,6 +3025,8 @@ boolean P_SetupLevel(boolean fromnetsave, boolean reloadinggamestate) G_AddMapToBuffer(gamemap-1); + D_ResetDeviceLED(); + return true; }