From 7cd7dec6683948120d6e80b2d3093c5b42094dd8 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 25 Mar 2020 01:48:51 +1000 Subject: [PATCH] HostInterface: Restore pause state after switching renderers Fixes #148. --- src/core/host_interface.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/host_interface.cpp b/src/core/host_interface.cpp index bd59754b7..b1ea194ff 100644 --- a/src/core/host_interface.cpp +++ b/src/core/host_interface.cpp @@ -1027,6 +1027,8 @@ void HostInterface::ModifyResolutionScale(s32 increment) void HostInterface::RecreateSystem() { + const bool was_paused = m_paused; + std::unique_ptr stream = ByteStream_CreateGrowableMemoryStream(nullptr, 8 * 1024); if (!m_system->SaveState(stream.get()) || !stream->SeekAbsolute(0)) { @@ -1052,6 +1054,7 @@ void HostInterface::RecreateSystem() } m_system->ResetPerformanceCounters(); + PauseSystem(was_paused); } void HostInterface::SetTimerResolutionIncreased(bool enabled)