Add an option to pause on the last frame of a movie.

This commit is contained in:
rog 2012-11-10 21:57:31 -05:00
parent ab48e1154b
commit 35e5a1e592
7 changed files with 17 additions and 0 deletions

View File

@ -131,6 +131,7 @@ void SConfig::SaveSettings()
// General
ini.Set("General", "LastFilename", m_LastFilename);
ini.Set("General", "PauseMovie", m_pauseMovie);
// ISO folders
// clear removed folders
@ -260,6 +261,7 @@ void SConfig::LoadSettings()
// General
{
ini.Get("General", "LastFilename", &m_LastFilename);
ini.Get("General", "PauseMovie", &m_pauseMovie, false);
m_ISOFolder.clear();
int numGCMPaths;

View File

@ -75,6 +75,7 @@ struct SConfig : NonCopyable
bool m_ListKorea;
bool m_ListTaiwan;
bool m_ListUnknown;
bool m_pauseMovie;
SysConf* m_SYSCONF;

View File

@ -92,6 +92,10 @@ std::string GetInputDisplay()
void FrameUpdate()
{
if (SConfig::GetInstance().m_pauseMovie && IsPlayingInput() && g_currentInputCount == g_totalInputCount -1)
{
Core::SetState(Core::CORE_PAUSE);
}
g_currentFrame++;
if(!g_bPolled)
g_currentLagCount++;

View File

@ -244,6 +244,7 @@ EVT_MENU(IDM_PLAYRECORD, CFrame::OnPlayRecording)
EVT_MENU(IDM_RECORDEXPORT, CFrame::OnRecordExport)
EVT_MENU(IDM_RECORDREADONLY, CFrame::OnRecordReadOnly)
EVT_MENU(IDM_TASINPUT, CFrame::OnTASInput)
EVT_MENU(IDM_TOGGLE_PAUSEMOVIE, CFrame::OnTogglePauseMovie)
EVT_MENU(IDM_FRAMESTEP, CFrame::OnFrameStep)
EVT_MENU(IDM_SCREENSHOT, CFrame::OnScreenshot)
EVT_MENU(wxID_PREFERENCES, CFrame::OnConfigMain)

View File

@ -297,6 +297,7 @@ private:
void OnRecordExport(wxCommandEvent& event);
void OnRecordReadOnly(wxCommandEvent& event);
void OnTASInput(wxCommandEvent& event);
void OnTogglePauseMovie(wxCommandEvent& event);
void OnChangeDisc(wxCommandEvent& event);
void OnScreenshot(wxCommandEvent& event);
void OnActive(wxActivateEvent& event);

View File

@ -142,6 +142,8 @@ void CFrame::CreateMenu()
emulationMenu->Append(IDM_RECORDEXPORT, GetMenuLabel(HK_EXPORT_RECORDING));
emulationMenu->Append(IDM_RECORDREADONLY, GetMenuLabel(HK_READ_ONLY_MODE), wxEmptyString, wxITEM_CHECK);
emulationMenu->Append(IDM_TASINPUT, _("TAS Input"));
emulationMenu->AppendCheckItem(IDM_TOGGLE_PAUSEMOVIE, _("Pause at end of movie"));
emulationMenu->Check(IDM_TOGGLE_PAUSEMOVIE, SConfig::GetInstance().m_pauseMovie);
emulationMenu->Check(IDM_RECORDREADONLY, true);
emulationMenu->AppendSeparator();
@ -702,6 +704,11 @@ void CFrame::OnTASInput(wxCommandEvent& event)
g_TASInputDlg->Show(true);
}
void CFrame::OnTogglePauseMovie(wxCommandEvent& WXUNUSED (event))
{
SConfig::GetInstance().m_pauseMovie = !SConfig::GetInstance().m_pauseMovie;
SConfig::GetInstance().SaveSettings();
}
void CFrame::OnFrameStep(wxCommandEvent& event)
{
bool wasPaused = (Core::GetState() == Core::CORE_PAUSE);

View File

@ -80,6 +80,7 @@ enum
IDM_RECORDEXPORT,
IDM_RECORDREADONLY,
IDM_TASINPUT,
IDM_TOGGLE_PAUSEMOVIE,
IDM_FRAMESTEP,
IDM_SCREENSHOT,
IDM_BROWSE,