Frontend: Fix invalid FPS showing when reset

pull/22/head
Connor McLaughlin 6 years ago
parent ae260b924c
commit e80775ed82

@ -489,7 +489,7 @@ void SDLInterface::DrawMainMenuBar()
if (ImGui::BeginMenu("System"))
{
if (ImGui::MenuItem("Reset"))
m_system->Reset();
DoReset();
ImGui::Separator();
@ -654,6 +654,16 @@ void SDLInterface::DrawOSDMessages()
}
}
void SDLInterface::DoReset()
{
m_system->Reset();
m_last_frame_number = 0;
m_last_internal_frame_number = 0;
m_last_global_tick_counter = 0;
m_fps_timer.Reset();
AddOSDMessage("System reset.");
}
void SDLInterface::DoLoadState(u32 index)
{
LoadState(GetSaveStateFilename(index));

@ -51,6 +51,7 @@ private:
// We only pass mouse input through if it's grabbed
bool IsWindowFullscreen() const;
void DrawImGui();
void DoReset();
void DoLoadState(u32 index);
void DoSaveState(u32 index);

Loading…
Cancel
Save