Added metadata loading(right-click during playback, 'View comments and subtitles') for recent movies, last played movie, and drag-n-drop movies, and likely managed any others that I didn't try as well.
This commit is contained in:
parent
dd0d5df80b
commit
4b4cf0723d
|
@ -61,6 +61,7 @@
|
|||
#include "cdlogger.h"
|
||||
#include "throttle.h"
|
||||
#include "tasedit.h"
|
||||
#include "replay.h"
|
||||
#include "palette.h" //For the SetPalette function
|
||||
#include "main.h"
|
||||
#include "args.h"
|
||||
|
@ -711,6 +712,7 @@ int main(int argc,char *argv[])
|
|||
replayReadOnlySetting = true;
|
||||
|
||||
FCEUI_LoadMovie(MovieToLoad, replayReadOnlySetting, false, replayStopFrameSetting!=0);
|
||||
FCEUX_LoadMovieExtras(MovieToLoad);
|
||||
free(MovieToLoad);
|
||||
MovieToLoad = NULL;
|
||||
}
|
||||
|
@ -784,7 +786,9 @@ doloopy:
|
|||
return(0);
|
||||
}
|
||||
|
||||
|
||||
void FCEUX_LoadMovieExtras(const char * fname) {
|
||||
UpdateReplayCommentsSubs(fname);
|
||||
}
|
||||
|
||||
//mbg merge 7/19/06 - the function that contains the code that used to just be UpdateFCEUWindow() and FCEUD_UpdateInput()
|
||||
void _updateWindow()
|
||||
|
|
|
@ -118,6 +118,7 @@ void DoPriority();
|
|||
void RemoveDirs();
|
||||
void CreateDirs();
|
||||
void SetDirs();
|
||||
void FCEUX_LoadMovieExtras(const char * fname);
|
||||
//void initDirectories(); //adelikat 03/02/09 - commenting out reference to a directory that I commented out
|
||||
|
||||
#endif
|
||||
|
|
|
@ -118,6 +118,21 @@ static char* GetSavePath(HWND hwndDlg)
|
|||
return fn;
|
||||
}
|
||||
|
||||
void UpdateReplayCommentsSubs(const char * fname) {
|
||||
|
||||
MOVIE_INFO info;
|
||||
|
||||
FCEUFILE *fp = FCEU_fopen(fname,0,"rb",0);
|
||||
bool scanok = FCEUI_MovieGetInfo(fp, info, true);
|
||||
delete fp;
|
||||
|
||||
if(!scanok)
|
||||
return;
|
||||
|
||||
currComments = info.comments;
|
||||
currSubtitles = info.subtitles;
|
||||
}
|
||||
|
||||
void UpdateReplayDialog(HWND hwndDlg)
|
||||
{
|
||||
int doClear=1;
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
void Replay_LoadMovie(bool tasedit);
|
||||
void UpdateReplayCommentsSubs(const char * fname);
|
|
@ -1333,6 +1333,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
if (!GameInfo) //If no game is loaded, load the Open Game dialog
|
||||
LoadNewGamey(hWnd, 0);
|
||||
FCEUI_LoadMovie(outname.c_str(), 1, false, false);
|
||||
FCEUX_LoadMovieExtras(outname.c_str());
|
||||
} else {
|
||||
std::string msg = "Failure converting " + fileDropped + "\r\n\r\n" + EFCM_CONVERTRESULT_message(result);
|
||||
MessageBox(hWnd,msg.c_str(),"Failure converting fcm", 0);
|
||||
|
@ -1354,8 +1355,10 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
{
|
||||
if (!GameInfo) //If no game is loaded, load the Open Game dialog
|
||||
LoadNewGamey(hWnd, 0);
|
||||
if (GameInfo && !(fileDropped.find(".fm2") == string::npos)) //.fm2 is at the end of the filename so that must be the extension
|
||||
if (GameInfo && !(fileDropped.find(".fm2") == string::npos)) { //.fm2 is at the end of the filename so that must be the extension
|
||||
FCEUI_LoadMovie(ftmp, 1, false, false); //We are convinced it is a movie file, attempt to load it
|
||||
FCEUX_LoadMovieExtras(ftmp);
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------------
|
||||
//Check if Savestate file
|
||||
|
@ -1461,6 +1464,8 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
RemoveRecentItem((wParam - MOVIE_FIRST_RECENT_FILE), recent_movie, MAX_NUMBER_OF_MOVIE_RECENT_FILES);
|
||||
UpdateMovieRMenu(recentmoviemenu, recent_movie, MENU_MOVIE_RECENT, MOVIE_FIRST_RECENT_FILE);
|
||||
}
|
||||
} else {
|
||||
FCEUX_LoadMovieExtras(fname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1951,6 +1956,8 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
RemoveRecentItem(0, recent_movie, MAX_NUMBER_OF_MOVIE_RECENT_FILES);
|
||||
UpdateMovieRMenu(recentmoviemenu, recent_movie, MENU_MOVIE_RECENT, MOVIE_FIRST_RECENT_FILE);
|
||||
}
|
||||
} else {
|
||||
FCEUX_LoadMovieExtras(recent_movie[0]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue