completing multiplatform archive/fopen cleanup
This commit is contained in:
parent
9a32bff677
commit
709f1a2b4c
|
@ -561,3 +561,7 @@ bool FCEUD_PauseAfterPlayback() { return false; }
|
||||||
void FCEUD_TurboOn (void) { NoWaiting|= 1; }
|
void FCEUD_TurboOn (void) { NoWaiting|= 1; }
|
||||||
void FCEUD_TurboOff (void) { NoWaiting&=~1; }
|
void FCEUD_TurboOff (void) { NoWaiting&=~1; }
|
||||||
void FCEUD_TurboToggle(void) { NoWaiting^= 1; }
|
void FCEUD_TurboToggle(void) { NoWaiting^= 1; }
|
||||||
|
FCEUFILE* FCEUD_OpenArchiveIndex(ArchiveScanRecord& asr, std::string &fname, int innerIndex) { return 0; }
|
||||||
|
FCEUFILE* FCEUD_OpenArchive(ArchiveScanRecord& asr, std::string& fname, std::string* innerFilename) { return 0; }
|
||||||
|
ArchiveScanRecord FCEUD_ScanArchive(std::string fname) { return ArchiveScanRecord(); }
|
||||||
|
|
||||||
|
|
19
src/file.cpp
19
src/file.cpp
|
@ -202,7 +202,6 @@ FCEUFILE * FCEU_fopen(const char *path, const char *ipsfn, char *mode, char *ext
|
||||||
//try to setup the ips file
|
//try to setup the ips file
|
||||||
if(ipsfn && read)
|
if(ipsfn && read)
|
||||||
ipsfile=FCEUD_UTF8fopen(ipsfn,"rb");
|
ipsfile=FCEUD_UTF8fopen(ipsfn,"rb");
|
||||||
#ifdef WIN32
|
|
||||||
if(read)
|
if(read)
|
||||||
{
|
{
|
||||||
ArchiveScanRecord asr = FCEUD_ScanArchive(fileToOpen);
|
ArchiveScanRecord asr = FCEUD_ScanArchive(fileToOpen);
|
||||||
|
@ -248,24 +247,6 @@ FCEUFILE * FCEU_fopen(const char *path, const char *ipsfn, char *mode, char *ext
|
||||||
ApplyIPS(ipsfile,fceufp);
|
ApplyIPS(ipsfile,fceufp);
|
||||||
return fceufp;
|
return fceufp;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
std::fstream* fp = FCEUD_UTF8_fstream(fileToOpen,mode);
|
|
||||||
if(!fp)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
fceufp = new FCEUFILE();
|
|
||||||
fceufp->filename = fileToOpen;
|
|
||||||
fceufp->filename = fileToOpen;
|
|
||||||
fceufp->archiveIndex = -1;
|
|
||||||
fceufp->stream = (std::iostream*)fp;
|
|
||||||
FCEU_fseek(fceufp,0,SEEK_END);
|
|
||||||
fceufp->size = FCEU_ftell(fceufp);
|
|
||||||
FCEU_fseek(fceufp,0,SEEK_SET);
|
|
||||||
return fceufp;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue