mirror of
https://github.com/holub/mame
synced 2025-06-06 12:53:46 +03:00
Remove fstat hack no longer needed with current emscripten (nw)
This commit is contained in:
parent
00ec858170
commit
8420457afe
@ -246,21 +246,6 @@ file_error osd_open(const char *path, UINT32 openflags, osd_file **file, UINT64
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get the file size
|
// get the file size
|
||||||
#ifdef SDLMAME_EMSCRIPTEN
|
|
||||||
//the fstat approach does not work on emscripten, work around for now
|
|
||||||
FILE *fileptr;
|
|
||||||
fileptr = fdopen((*file)->handle,"rb");
|
|
||||||
if (fileptr == NULL)
|
|
||||||
{
|
|
||||||
*filesize = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fseek(fileptr, 0, SEEK_END);
|
|
||||||
*filesize = ftell(fileptr);
|
|
||||||
fseek(fileptr, 0, SEEK_SET);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
#if defined(SDLMAME_DARWIN) || defined(SDLMAME_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) || defined(SDLMAME_HAIKU)
|
#if defined(SDLMAME_DARWIN) || defined(SDLMAME_WIN32) || defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_OS2) || defined(SDLMAME_HAIKU)
|
||||||
fstat((*file)->handle, &st);
|
fstat((*file)->handle, &st);
|
||||||
#else
|
#else
|
||||||
@ -268,7 +253,6 @@ file_error osd_open(const char *path, UINT32 openflags, osd_file **file, UINT64
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
*filesize = (UINT64)st.st_size;
|
*filesize = (UINT64)st.st_size;
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
Loading…
Reference in New Issue
Block a user