movie file wasnt being closed correctly (perhaps fix the tas crashing bug)
This commit is contained in:
parent
2958ab4e71
commit
0a05a707a0
|
@ -312,8 +312,8 @@ static void Export()
|
|||
{
|
||||
fstream* osRecordingMovie = FCEUD_UTF8_fstream(ofn.lpstrFile, "wb");
|
||||
currMovieData.dump(osRecordingMovie);
|
||||
osRecordingMovie->close();
|
||||
delete osRecordingMovie;
|
||||
osRecordingMovie = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -589,12 +589,10 @@ void FCEUI_LoadMovie(char *fname, bool _read_only, int _pauseframe)
|
|||
|
||||
static void closeRecordingMovie()
|
||||
{
|
||||
//if(fpRecordingMovie)
|
||||
// fclose(fpRecordingMovie);
|
||||
if(osRecordingMovie)
|
||||
{
|
||||
osRecordingMovie->close();
|
||||
delete osRecordingMovie;
|
||||
osRecordingMovie = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -930,7 +928,6 @@ bool FCEUI_MovieGetInfo(const std::string& fname, MOVIE_INFO* info, bool skipFra
|
|||
std::fstream* fp = FCEUD_UTF8_fstream(fname, "rb");
|
||||
if(!fp) return false;
|
||||
LoadFM2(md, fp, skipFrameCount);
|
||||
fp->close();
|
||||
delete fp;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue