mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-27 14:21:28 +00:00
Fix case-insensitive file loading.
Allow usage of capitalization in directory names above the YQ2 working dir when loading non-PAK/PK3 assets with capitalized "name" criteria.
This commit is contained in:
parent
b9e5306c84
commit
31627ef68b
1 changed files with 4 additions and 2 deletions
|
@ -367,7 +367,7 @@ FS_FCloseFile(fileHandle_t f)
|
||||||
int
|
int
|
||||||
FS_FOpenFile(const char *name, fileHandle_t *f, qboolean gamedir_only)
|
FS_FOpenFile(const char *name, fileHandle_t *f, qboolean gamedir_only)
|
||||||
{
|
{
|
||||||
char path[MAX_OSPATH];
|
char path[MAX_OSPATH], lwrName[MAX_OSPATH];
|
||||||
fsHandle_t *handle;
|
fsHandle_t *handle;
|
||||||
fsPack_t *pack;
|
fsPack_t *pack;
|
||||||
fsSearchPath_t *search;
|
fsSearchPath_t *search;
|
||||||
|
@ -463,7 +463,9 @@ FS_FOpenFile(const char *name, fileHandle_t *f, qboolean gamedir_only)
|
||||||
|
|
||||||
if (!handle->file)
|
if (!handle->file)
|
||||||
{
|
{
|
||||||
Q_strlwr(path);
|
Com_sprintf(lwrName, sizeof(lwrName), "%s", handle->name);
|
||||||
|
Q_strlwr(lwrName);
|
||||||
|
Com_sprintf(path, sizeof(path), "%s/%s", search->path, lwrName);
|
||||||
handle->file = Q_fopen(path, "rb");
|
handle->file = Q_fopen(path, "rb");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue