mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- Fixed: Demo playback on Windows XP since we don't patch fstat for v140_xp bug.
This commit is contained in:
parent
e4281454ce
commit
9dd42be15f
1 changed files with 4 additions and 2 deletions
|
@ -123,7 +123,8 @@ int M_ReadFile (char const *name, BYTE **buffer)
|
|||
handle = open (name, O_RDONLY | O_BINARY, 0666);
|
||||
if (handle == -1)
|
||||
I_Error ("Couldn't read file %s", name);
|
||||
if (fstat (handle,&fileinfo) == -1)
|
||||
// [BL] Use stat instead of fstat for v140_xp hack
|
||||
if (stat (name,&fileinfo) == -1)
|
||||
I_Error ("Couldn't read file %s", name);
|
||||
length = fileinfo.st_size;
|
||||
buf = new BYTE[length];
|
||||
|
@ -149,7 +150,8 @@ int M_ReadFileMalloc (char const *name, BYTE **buffer)
|
|||
handle = open (name, O_RDONLY | O_BINARY, 0666);
|
||||
if (handle == -1)
|
||||
I_Error ("Couldn't read file %s", name);
|
||||
if (fstat (handle,&fileinfo) == -1)
|
||||
// [BL] Use stat instead of fstat for v140_xp hack
|
||||
if (stat (name,&fileinfo) == -1)
|
||||
I_Error ("Couldn't read file %s", name);
|
||||
length = fileinfo.st_size;
|
||||
buf = (BYTE*)M_Malloc(length);
|
||||
|
|
Loading…
Reference in a new issue