mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-13 16:25:45 -04:00
HostInterface: Restore pause state after switching renderers
Fixes #148.
This commit is contained in:
@ -1027,6 +1027,8 @@ void HostInterface::ModifyResolutionScale(s32 increment)
|
|||||||
|
|
||||||
void HostInterface::RecreateSystem()
|
void HostInterface::RecreateSystem()
|
||||||
{
|
{
|
||||||
|
const bool was_paused = m_paused;
|
||||||
|
|
||||||
std::unique_ptr<ByteStream> stream = ByteStream_CreateGrowableMemoryStream(nullptr, 8 * 1024);
|
std::unique_ptr<ByteStream> stream = ByteStream_CreateGrowableMemoryStream(nullptr, 8 * 1024);
|
||||||
if (!m_system->SaveState(stream.get()) || !stream->SeekAbsolute(0))
|
if (!m_system->SaveState(stream.get()) || !stream->SeekAbsolute(0))
|
||||||
{
|
{
|
||||||
@ -1052,6 +1054,7 @@ void HostInterface::RecreateSystem()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_system->ResetPerformanceCounters();
|
m_system->ResetPerformanceCounters();
|
||||||
|
PauseSystem(was_paused);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HostInterface::SetTimerResolutionIncreased(bool enabled)
|
void HostInterface::SetTimerResolutionIncreased(bool enabled)
|
||||||
|
Reference in New Issue
Block a user