Add message boxes for file add errors

This commit is contained in:
TehRealSalt 2019-05-02 12:03:50 -04:00
parent 73e152a01c
commit 86dfd70c6f
2 changed files with 10 additions and 4 deletions

View File

@ -6570,16 +6570,21 @@ static void G_LoadDemoExtraFiles(UINT8 **pp)
if (toomany)
{
CONS_Printf("Too many files loaded\n");
CONS_Alert(CONS_WARNING, M_GetText("Too many files loaded to add anymore for demo playback\n"));
if (!CON_Ready())
M_StartMessage(M_GetText("There are too many files loaded to add this demo's add-ons.\n\nDemo playback may desync.\n\nPress ESC\n"), NULL, MM_NOTHING);
}
else if (ncs != FS_FOUND)
{
if (ncs == FS_NOTFOUND)
CONS_Printf("You do not have a copy of %s\n", filename);
CONS_Alert(CONS_NOTICE, M_GetText("You do not have a copy of %s\n"), filename);
else if (ncs == FS_MD5SUMBAD)
CONS_Printf("Checksum mismatch on %s\n", filename);
CONS_Alert(CONS_NOTICE, M_GetText("Checksum mismatch on %s\n"), filename);
else
CONS_Printf("Unknown error finding file (%s)\n", filename);
CONS_Alert(CONS_NOTICE, M_GetText("Unknown error finding file %s\n"), filename);
if (!CON_Ready())
M_StartMessage(M_GetText("There were errors trying to add this demo's add-ons. Check the console for more information.\n\nDemo playback may desync.\n\nPress ESC\n"), NULL, MM_NOTHING);
}
else
{

View File

@ -4368,6 +4368,7 @@ void M_StartMessage(const char *string, void *routine,
M_StartControlPanel(); // can't put menuactive to true
if (currentMenu == &MessageDef) // Prevent recursion
MessageDef.prevMenu = ((demo.playback) ? &PlaybackMenuDef : &MainDef);
else
MessageDef.prevMenu = currentMenu;