change FCEUI_MovieGetInfo to not use a pointer
This commit is contained in:
parent
90be81cd07
commit
67774c1322
|
@ -128,7 +128,7 @@ void UpdateReplayDialog(HWND hwndDlg)
|
|||
|
||||
FCEUFILE* fp = FCEU_fopen(fn,0,"rb",0);
|
||||
bool isarchive = FCEU_isFileInArchive(fn);
|
||||
bool ismovie = FCEUI_MovieGetInfo(fp, &info, false);
|
||||
bool ismovie = FCEUI_MovieGetInfo(fp, info, false);
|
||||
delete fp;
|
||||
if(ismovie)
|
||||
{
|
||||
|
@ -359,7 +359,7 @@ void HandleScan(HWND hwndDlg, FCEUFILE* file, int& i)
|
|||
{
|
||||
MOVIE_INFO info;
|
||||
|
||||
bool scanok = FCEUI_MovieGetInfo(file, &info, true);
|
||||
bool scanok = FCEUI_MovieGetInfo(file, info, true);
|
||||
if(!scanok)
|
||||
return;
|
||||
|
||||
|
|
|
@ -1143,22 +1143,22 @@ void FCEUI_MoviePlayFromBeginning(void)
|
|||
}
|
||||
|
||||
|
||||
bool FCEUI_MovieGetInfo(FCEUFILE* fp, MOVIE_INFO* /* [in, out] */ info, bool skipFrameCount)
|
||||
bool FCEUI_MovieGetInfo(FCEUFILE* fp, MOVIE_INFO& info, bool skipFrameCount)
|
||||
{
|
||||
MovieData md;
|
||||
if(!LoadFM2(md, fp->stream, INT_MAX, skipFrameCount))
|
||||
return false;
|
||||
|
||||
info->movie_version = md.version;
|
||||
info->poweron = md.savestate.size()==0;
|
||||
info->pal = md.palFlag;
|
||||
info->nosynchack = true;
|
||||
info->num_frames = md.records.size();
|
||||
info->md5_of_rom_used = md.romChecksum;
|
||||
info->emu_version_used = md.emuVersion;
|
||||
info->name_of_rom_used = md.romFilename;
|
||||
info->rerecord_count = md.rerecordCount;
|
||||
info->comments = md.comments;
|
||||
info.movie_version = md.version;
|
||||
info.poweron = md.savestate.size()==0;
|
||||
info.pal = md.palFlag;
|
||||
info.nosynchack = true;
|
||||
info.num_frames = md.records.size();
|
||||
info.md5_of_rom_used = md.romChecksum;
|
||||
info.emu_version_used = md.emuVersion;
|
||||
info.name_of_rom_used = md.romFilename;
|
||||
info.rerecord_count = md.rerecordCount;
|
||||
info.comments = md.comments;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -236,7 +236,7 @@ void FCEUI_SaveMovie(const char *fname, EMOVIE_FLAG flags, std::wstring author);
|
|||
void FCEUI_LoadMovie(const char *fname, bool read_only, bool tasedit, int _stopframe);
|
||||
void FCEUI_MoviePlayFromBeginning(void);
|
||||
void FCEUI_StopMovie(void);
|
||||
bool FCEUI_MovieGetInfo(FCEUFILE* fp, MOVIE_INFO* /* [in, out] */ info, bool skipFrameCount = false);
|
||||
bool FCEUI_MovieGetInfo(FCEUFILE* fp, MOVIE_INFO& info, bool skipFrameCount = false);
|
||||
char* FCEUI_MovieGetCurrentName(int addSlotNumber);
|
||||
void FCEUI_MovieToggleReadOnly(void);
|
||||
bool FCEUI_GetMovieToggleReadOnly();
|
||||
|
|
Loading…
Reference in New Issue