From 67774c1322e16797f41f92405eedcf244ce2527e Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 11 Nov 2008 00:02:22 +0000 Subject: [PATCH] change FCEUI_MovieGetInfo to not use a pointer --- src/drivers/win/replay.cpp | 4 ++-- src/movie.cpp | 22 +++++++++++----------- src/movie.h | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/drivers/win/replay.cpp b/src/drivers/win/replay.cpp index 8487b674..268e15cf 100644 --- a/src/drivers/win/replay.cpp +++ b/src/drivers/win/replay.cpp @@ -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; diff --git a/src/movie.cpp b/src/movie.cpp index 3bd61635..362cec59 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -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; } diff --git a/src/movie.h b/src/movie.h index f836c06a..7a4a8e8a 100644 --- a/src/movie.h +++ b/src/movie.h @@ -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();