Add option for author name for movies. Also, minor cleanup for previous options i've added.

This commit is contained in:
rog 2012-11-14 16:21:54 -05:00
parent 8fe5aa4ee8
commit 14aa7150d9
7 changed files with 22 additions and 15 deletions

View File

@ -131,8 +131,7 @@ void SConfig::SaveSettings()
// General
ini.Set("General", "LastFilename", m_LastFilename);
ini.Set("General", "PauseMovie", m_pauseMovie);
ini.Set("General", "ShowLag", m_showLag);
ini.Set("General", "ShowLag", m_ShowLag);
// ISO folders
// clear removed folders
@ -248,6 +247,10 @@ void SConfig::SaveSettings()
// GFX Backend
ini.Set("Core", "GFXBackend", m_LocalCoreStartupParameter.m_strVideoBackend);
// Movie
ini.Set("Movie", "PauseMovie", m_PauseMovie);
ini.Set("Movie", "Author", m_strMovieAuthor);
ini.Save(File::GetUserPath(F_DOLPHINCONFIG_IDX));
m_SYSCONF->Save();
}
@ -262,8 +265,7 @@ void SConfig::LoadSettings()
// General
{
ini.Get("General", "LastFilename", &m_LastFilename);
ini.Get("General", "PauseMovie", &m_pauseMovie, false);
ini.Get("General", "ShowLag", &m_showLag, false);
ini.Get("General", "ShowLag", &m_ShowLag, false);
m_ISOFolder.clear();
int numGCMPaths;
@ -388,6 +390,10 @@ void SConfig::LoadSettings()
// GFX Backend
ini.Get("Core", "GFXBackend", &m_LocalCoreStartupParameter.m_strVideoBackend, "");
// Movie
ini.Get("General", "PauseMovie", &m_PauseMovie, false);
ini.Get("Movie", "Author", &m_strMovieAuthor, "");
}
m_SYSCONF = new SysConf();

View File

@ -75,8 +75,9 @@ struct SConfig : NonCopyable
bool m_ListKorea;
bool m_ListTaiwan;
bool m_ListUnknown;
bool m_pauseMovie;
bool m_showLag;
bool m_PauseMovie;
bool m_ShowLag;
std::string m_strMovieAuthor;
SysConf* m_SYSCONF;

View File

@ -92,7 +92,7 @@ std::string GetInputDisplay()
void FrameUpdate()
{
if (IsPlayingInput() && g_currentInputCount == g_totalInputCount -1 && SConfig::GetInstance().m_pauseMovie)
if (IsPlayingInput() && g_currentInputCount == g_totalInputCount -1 && SConfig::GetInstance().m_PauseMovie)
{
Core::SetState(Core::CORE_PAUSE);
}
@ -400,7 +400,7 @@ bool BeginRecordingInput(int controllers)
}
g_playMode = MODE_RECORDING;
GetSettings();
author = SConfig::GetInstance().m_strMovieAuthor;
delete [] tmpInput;
tmpInput = new u8[MAX_DTM_LENGTH];
g_currentByte = g_totalBytes = 0;

View File

@ -143,9 +143,9 @@ void CFrame::CreateMenu()
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_TOGGLE_PAUSEMOVIE, SConfig::GetInstance().m_PauseMovie);
emulationMenu->AppendCheckItem(IDM_SHOWLAG, _("Show lag counter"));
emulationMenu->Check(IDM_SHOWLAG, SConfig::GetInstance().m_showLag);
emulationMenu->Check(IDM_SHOWLAG, SConfig::GetInstance().m_ShowLag);
emulationMenu->Check(IDM_RECORDREADONLY, true);
emulationMenu->AppendSeparator();
@ -708,13 +708,13 @@ void CFrame::OnTASInput(wxCommandEvent& event)
void CFrame::OnTogglePauseMovie(wxCommandEvent& WXUNUSED (event))
{
SConfig::GetInstance().m_pauseMovie = !SConfig::GetInstance().m_pauseMovie;
SConfig::GetInstance().m_PauseMovie = !SConfig::GetInstance().m_PauseMovie;
SConfig::GetInstance().SaveSettings();
}
void CFrame::OnShowLag(wxCommandEvent& WXUNUSED (event))
{
SConfig::GetInstance().m_showLag = !SConfig::GetInstance().m_showLag;
SConfig::GetInstance().m_ShowLag = !SConfig::GetInstance().m_ShowLag;
SConfig::GetInstance().SaveSettings();
}

View File

@ -1095,7 +1095,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
D3D::font.DrawTextScaled(0, 0, 20, 0.0f, 0xFF00FFFF, fps);
}
if (SConfig::GetInstance().m_showLag)
if (SConfig::GetInstance().m_ShowLag)
{
char lag[10];
StringCchPrintfA(lag, 1000, "Lag: %d\n", Movie::g_currentLagCount);

View File

@ -1092,7 +1092,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
D3D::font.DrawTextScaled(0, 0, 20, 20, 0.0f, 0xFF00FFFF, fps);
}
if (SConfig::GetInstance().m_showLag)
if (SConfig::GetInstance().m_ShowLag)
{
char lag[10];
StringCchPrintfA(lag, 1000, "Lag: %d\n", Movie::g_currentLagCount);

View File

@ -532,7 +532,7 @@ void Renderer::DrawDebugInfo()
if (g_ActiveConfig.bShowFPS)
p+=sprintf(p, "FPS: %d\n", s_fps);
if (SConfig::GetInstance().m_showLag)
if (SConfig::GetInstance().m_ShowLag)
p+=sprintf(p, "Lag: %d\n", Movie::g_currentLagCount);
if (g_ActiveConfig.bShowInputDisplay)