HostInterface: Move PauseSystem from common to base

This commit is contained in:
Connor McLaughlin
2020-12-17 01:12:56 +10:00
parent e044858953
commit fa0f177e51
4 changed files with 21 additions and 21 deletions

View File

@ -130,6 +130,22 @@ void HostInterface::PowerOffSystem()
DestroySystem();
}
void HostInterface::PauseSystem(bool paused)
{
if (paused == System::IsPaused() || System::IsShutdown())
return;
System::SetState(paused ? System::State::Paused : System::State::Running);
if (!paused)
m_audio_stream->EmptyBuffers();
m_audio_stream->PauseOutput(paused);
OnSystemPaused(paused);
if (!paused)
System::ResetPerformanceCounters();
}
void HostInterface::DestroySystem()
{
if (System::IsShutdown())
@ -399,6 +415,8 @@ bool HostInterface::SaveState(const char* filename)
void HostInterface::OnSystemCreated() {}
void HostInterface::OnSystemPaused(bool paused) {}
void HostInterface::OnSystemDestroyed() {}
void HostInterface::OnSystemPerformanceCountersUpdated() {}