mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Fix compilation on linux
This commit is contained in:
parent
e6ffc816c9
commit
6fea4bf527
2 changed files with 10 additions and 10 deletions
|
@ -468,16 +468,16 @@ static char* KeyValues_FindKeyValue(char **vdfbuf, char * const vdfbufend, const
|
|||
|
||||
static void G_ParseSteamKeyValuesForPaths(const char *vdf)
|
||||
{
|
||||
int32_t fd = Bopen(vdf, BO_RDONLY);
|
||||
int32_t size = Bfilelength(fd);
|
||||
buildvfs_fd fd = buildvfs_open_read(vdf);
|
||||
int32_t size = buildvfs_length(fd);
|
||||
char *vdfbufstart, *vdfbuf, *vdfbufend;
|
||||
|
||||
if (size <= 0)
|
||||
return;
|
||||
|
||||
vdfbufstart = vdfbuf = (char*)Xmalloc(size);
|
||||
size = (int32_t)Bread(fd, vdfbuf, size);
|
||||
Bclose(fd);
|
||||
size = (int32_t)buildvfs_read(fd, vdfbuf, size);
|
||||
buildvfs_close(fd);
|
||||
vdfbufend = vdfbuf + size;
|
||||
|
||||
if (KeyValues_FindParentKey(&vdfbuf, vdfbufend, "LibraryFolders"))
|
||||
|
@ -488,7 +488,7 @@ static void G_ParseSteamKeyValuesForPaths(const char *vdf)
|
|||
G_AddSteamPaths(result);
|
||||
}
|
||||
|
||||
Bfree(vdfbufstart);
|
||||
Xfree(vdfbufstart);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -696,16 +696,16 @@ static char* KeyValues_FindKeyValue(char **vdfbuf, char * const vdfbufend, const
|
|||
|
||||
static void G_ParseSteamKeyValuesForPaths(const char *vdf)
|
||||
{
|
||||
int32_t fd = Bopen(vdf, BO_RDONLY);
|
||||
int32_t size = Bfilelength(fd);
|
||||
buildvfs_fd fd = buildvfs_open_read(vdf);
|
||||
int32_t size = buildvfs_length(fd);
|
||||
char *vdfbufstart, *vdfbuf, *vdfbufend;
|
||||
|
||||
if (size <= 0)
|
||||
return;
|
||||
|
||||
vdfbufstart = vdfbuf = (char*)Xmalloc(size);
|
||||
size = (int32_t)Bread(fd, vdfbuf, size);
|
||||
Bclose(fd);
|
||||
size = (int32_t)buildvfs_read(fd, vdfbuf, size);
|
||||
buildvfs_close(fd);
|
||||
vdfbufend = vdfbuf + size;
|
||||
|
||||
if (KeyValues_FindParentKey(&vdfbuf, vdfbufend, "LibraryFolders"))
|
||||
|
@ -716,7 +716,7 @@ static void G_ParseSteamKeyValuesForPaths(const char *vdf)
|
|||
G_AddSteamPaths(result);
|
||||
}
|
||||
|
||||
Bfree(vdfbufstart);
|
||||
Xfree(vdfbufstart);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue