Misc changes to how the program runs

- Call DRPC_Init at the end of D_SRB2Main instead of in the middle
- Call Discord_RunCallbacks in D_SRB2Loop instead of G_Ticker
- Fix errorcount nums in I_Error, an old leftover from when Discord_Shutdown was not handled by I_AddExitFunction
This commit is contained in:
Sally Coolatta 2020-08-27 18:50:36 -04:00
parent cb5ab33a93
commit c165b0761c
3 changed files with 11 additions and 11 deletions

View file

@ -731,6 +731,10 @@ void D_SRB2Loop(void)
#ifdef HAVE_BLUA
LUA_Step();
#endif
#ifdef HAVE_DISCORDRPC
Discord_RunCallbacks();
#endif
}
}
@ -1427,10 +1431,6 @@ void D_SRB2Main(void)
CONS_Printf("ST_Init(): Init status bar.\n");
ST_Init();
#ifdef HAVE_DISCORDRPC
DRPC_Init();
#endif
if (M_CheckParm("-room"))
{
if (!M_IsNextParm())
@ -1617,6 +1617,10 @@ void D_SRB2Main(void)
if (!P_SetupLevel(false))
I_Quit(); // fail so reset game stuff
}
#ifdef HAVE_DISCORDRPC
DRPC_Init();
#endif
}
const char *D_Home(void)

View file

@ -2503,10 +2503,6 @@ void G_Ticker(boolean run)
if (spectatedelay4)
spectatedelay4--;
}
#ifdef HAVE_DISCORDRPC
Discord_RunCallbacks();
#endif
}
//

View file

@ -3251,11 +3251,11 @@ void I_Error(const char *error, ...)
I_ShutdownGraphics();
if (errorcount == 6)
I_ShutdownInput();
if (errorcount == 8)
if (errorcount == 7)
I_ShutdownSystem();
if (errorcount == 9)
if (errorcount == 8)
SDL_Quit();
if (errorcount == 10)
if (errorcount == 9)
{
M_SaveConfig(NULL);
G_SaveGameData(false);