mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 09:56:30 +00:00
disable usage separate file handle, i need more info.
This commit is contained in:
parent
2a8687df99
commit
a9d6e1ccd0
@ -38,7 +38,7 @@ McmpMgr::McmpMgr() {
|
||||
|
||||
McmpMgr::~McmpMgr() {
|
||||
if (_file) {
|
||||
fclose(_file);
|
||||
// fclose(_file);
|
||||
}
|
||||
free(_compTable);
|
||||
free(_compInput);
|
||||
@ -52,14 +52,14 @@ bool McmpMgr::openSound(const char *filename, byte **resPtr, int &offsetData) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int filePos = ftell(_file);
|
||||
_file = fdopen(fileno(_file), "rb");
|
||||
fseek(_file, filePos, SEEK_SET);
|
||||
// int filePos = ftell(_file);
|
||||
// _file = fdopen(fileno(_file), "rb");
|
||||
// fseek(_file, filePos, SEEK_SET);
|
||||
|
||||
uint32 tag;
|
||||
fread(&tag, 1, 4, _file);
|
||||
if (READ_BE_UINT32(&tag) != MKID_BE('MCMP')) {
|
||||
error("McmpMgr::loadCompTable() Expected MCMP tag");
|
||||
error("McmpMgr::openSound() Expected MCMP tag");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
10
smush.cpp
10
smush.cpp
@ -276,9 +276,9 @@ bool zlibFile::open(const char *filename) {
|
||||
warning("zlibFile %s not found", filename);
|
||||
return false;
|
||||
}
|
||||
int filePos = ftell(_handle);
|
||||
_handle = fdopen(fileno(_handle), "rb");
|
||||
fseek(_handle, filePos, SEEK_SET);
|
||||
// int filePos = ftell(_handle);
|
||||
// _handle = fdopen(fileno(_handle), "rb");
|
||||
// fseek(_handle, filePos, SEEK_SET);
|
||||
|
||||
// Read in the GZ header
|
||||
fread(_inBuf, 2, sizeof(char), _handle); // Header
|
||||
@ -316,8 +316,8 @@ bool zlibFile::open(const char *filename) {
|
||||
|
||||
void zlibFile::close() {
|
||||
if (_handle) {
|
||||
fclose(_handle);
|
||||
_handle = NULL;
|
||||
// fclose(_handle);
|
||||
// _handle = NULL;
|
||||
}
|
||||
|
||||
if (_inBuf) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user