Remove fstat hack no longer needed with current emscripten (nw)

This commit is contained in:
Justin Kerk 2013-12-07 08:48:43 +00:00
parent 00ec858170
commit 8420457afe

View File

@ -246,21 +246,6 @@ file_error osd_open(const char *path, UINT32 openflags, osd_file **file, UINT64
}
// 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)
fstat((*file)->handle, &st);
#else
@ -268,7 +253,6 @@ file_error osd_open(const char *path, UINT32 openflags, osd_file **file, UINT64
#endif
*filesize = (UINT64)st.st_size;
#endif
error: