fix looking for QuakeEX.kpf under userdir

This commit is contained in:
Ozkan Sezer 2021-10-01 11:02:02 +03:00
parent bf85bbb3e8
commit b58efad209
1 changed files with 6 additions and 0 deletions

View File

@ -2557,6 +2557,12 @@ void LOC_LoadFile (const char *file)
{
q_snprintf(path, sizeof(path), "%s/QuakeEX.kpf", com_basedir);
rw = SDL_RWFromFile(path, "rb");
#if defined(DO_USERDIRS)
if (!rw) {
q_snprintf(path, sizeof(path), "%s/QuakeEX.kpf", host_parms->userdir);
rw = SDL_RWFromFile(path, "rb");
}
#endif
if (!rw) goto fail;
sz = SDL_RWsize(rw);
if (sz <= 0) goto fail;