mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-12 22:02:12 +00:00
Made the refreshdirmenu stuff SLIGHTLY less hacky.
This commit is contained in:
parent
4c495cafc9
commit
1fc835e4a3
3 changed files with 8 additions and 3 deletions
|
@ -82,7 +82,8 @@ typedef enum
|
|||
REFRESHDIR_ADDFILE = 2,
|
||||
REFRESHDIR_WARNING = 4,
|
||||
REFRESHDIR_ERROR = 8,
|
||||
REFRESHDIR_MAX = 16
|
||||
REFRESHDIR_NOTLOADED = 16,
|
||||
REFRESHDIR_MAX = 32
|
||||
} refreshdir_enum;
|
||||
|
||||
boolean preparefilemenu(boolean samedepth);
|
||||
|
|
|
@ -4810,7 +4810,9 @@ static boolean M_AddonsRefresh(void)
|
|||
|
||||
if (refreshdirmenu & REFRESHDIR_ADDFILE)
|
||||
{
|
||||
if (!(dirmenu[dir_on[menudepthleft]][DIR_TYPE] & EXT_LOADED))
|
||||
addonsresponselimit = 0;
|
||||
|
||||
if (refreshdirmenu & REFRESHDIR_NOTLOADED)
|
||||
{
|
||||
char *message = NULL;
|
||||
S_StartSound(NULL, sfx_lose);
|
||||
|
@ -4946,7 +4948,6 @@ static void M_AddonExec(INT32 ch)
|
|||
|
||||
S_StartSound(NULL, sfx_strpst);
|
||||
COM_BufAddText(va("exec %s%s", menupath, dirmenu[dir_on[menudepthleft]]+DIR_STRING));
|
||||
addonsresponselimit = 5;
|
||||
}
|
||||
|
||||
#define len menusearch[0]
|
||||
|
|
|
@ -54,6 +54,8 @@
|
|||
|
||||
#include "v_video.h"
|
||||
|
||||
#include "filesrch.h" // refreshdirmenu
|
||||
|
||||
// wipes
|
||||
#include "f_finale.h"
|
||||
|
||||
|
@ -3054,6 +3056,7 @@ boolean P_AddWadFile(const char *wadfilename, char **firstmapname)
|
|||
|
||||
if ((numlumps = W_LoadWadFile(wadfilename)) == INT16_MAX)
|
||||
{
|
||||
refreshdirmenu |= REFRESHDIR_NOTLOADED;
|
||||
CONS_Printf(M_GetText("Errors occured while loading %s; not added.\n"), wadfilename);
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue