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

View file

@ -2557,6 +2557,12 @@ void LOC_LoadFile (const char *file)
{ {
q_snprintf(path, sizeof(path), "%s/QuakeEX.kpf", com_basedir); q_snprintf(path, sizeof(path), "%s/QuakeEX.kpf", com_basedir);
rw = SDL_RWFromFile(path, "rb"); 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; if (!rw) goto fail;
sz = SDL_RWsize(rw); sz = SDL_RWsize(rw);
if (sz <= 0) goto fail; if (sz <= 0) goto fail;