mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Add an on screen lag counter.
This commit is contained in:
@ -132,6 +132,7 @@ void SConfig::SaveSettings()
|
||||
// General
|
||||
ini.Set("General", "LastFilename", m_LastFilename);
|
||||
ini.Set("General", "PauseMovie", m_pauseMovie);
|
||||
ini.Set("General", "ShowLag", m_showLag);
|
||||
|
||||
// ISO folders
|
||||
// clear removed folders
|
||||
@ -262,6 +263,7 @@ void SConfig::LoadSettings()
|
||||
{
|
||||
ini.Get("General", "LastFilename", &m_LastFilename);
|
||||
ini.Get("General", "PauseMovie", &m_pauseMovie, false);
|
||||
ini.Get("General", "ShowLag", &m_showLag, false);
|
||||
|
||||
m_ISOFolder.clear();
|
||||
int numGCMPaths;
|
||||
|
@ -76,6 +76,7 @@ struct SConfig : NonCopyable
|
||||
bool m_ListTaiwan;
|
||||
bool m_ListUnknown;
|
||||
bool m_pauseMovie;
|
||||
bool m_showLag;
|
||||
|
||||
SysConf* m_SYSCONF;
|
||||
|
||||
|
@ -245,6 +245,7 @@ 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_SHOWLAG, CFrame::OnShowLag)
|
||||
EVT_MENU(IDM_FRAMESTEP, CFrame::OnFrameStep)
|
||||
EVT_MENU(IDM_SCREENSHOT, CFrame::OnScreenshot)
|
||||
EVT_MENU(wxID_PREFERENCES, CFrame::OnConfigMain)
|
||||
|
@ -298,6 +298,7 @@ private:
|
||||
void OnRecordReadOnly(wxCommandEvent& event);
|
||||
void OnTASInput(wxCommandEvent& event);
|
||||
void OnTogglePauseMovie(wxCommandEvent& event);
|
||||
void OnShowLag(wxCommandEvent& event);
|
||||
void OnChangeDisc(wxCommandEvent& event);
|
||||
void OnScreenshot(wxCommandEvent& event);
|
||||
void OnActive(wxActivateEvent& event);
|
||||
|
@ -144,9 +144,11 @@ void CFrame::CreateMenu()
|
||||
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->AppendCheckItem(IDM_SHOWLAG, _("Show lag counter"));
|
||||
emulationMenu->Check(IDM_SHOWLAG, SConfig::GetInstance().m_showLag);
|
||||
emulationMenu->Check(IDM_RECORDREADONLY, true);
|
||||
emulationMenu->AppendSeparator();
|
||||
|
||||
|
||||
emulationMenu->Append(IDM_FRAMESTEP, GetMenuLabel(HK_FRAME_ADVANCE), wxEmptyString);
|
||||
|
||||
wxMenu *skippingMenu = new wxMenu;
|
||||
@ -709,6 +711,13 @@ void CFrame::OnTogglePauseMovie(wxCommandEvent& WXUNUSED (event))
|
||||
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().SaveSettings();
|
||||
}
|
||||
|
||||
void CFrame::OnFrameStep(wxCommandEvent& event)
|
||||
{
|
||||
bool wasPaused = (Core::GetState() == Core::CORE_PAUSE);
|
||||
|
@ -81,6 +81,7 @@ enum
|
||||
IDM_RECORDREADONLY,
|
||||
IDM_TASINPUT,
|
||||
IDM_TOGGLE_PAUSEMOVIE,
|
||||
IDM_SHOWLAG,
|
||||
IDM_FRAMESTEP,
|
||||
IDM_SCREENSHOT,
|
||||
IDM_BROWSE,
|
||||
|
Reference in New Issue
Block a user