Emu: Make prevent_display_sleep dynamic

This commit is contained in:
Megamouse 2020-07-03 17:12:58 +02:00
parent d91551c277
commit 8d2ce2815c
4 changed files with 28 additions and 9 deletions

View file

@ -1618,10 +1618,8 @@ bool Emulator::Pause()
idm::select<named_thread<ppu_thread>>(on_select);
idm::select<named_thread<spu_thread>>(on_select);
if (g_cfg.misc.prevent_display_sleep)
{
enable_display_sleep();
}
// Always Enable display sleep, not only if it was prevented.
enable_display_sleep();
return true;
}
@ -1776,10 +1774,8 @@ void Emulator::Stop(bool restart)
m_force_boot = false;
if (g_cfg.misc.prevent_display_sleep)
{
enable_display_sleep();
}
// Always Enable display sleep, not only if it was prevented.
enable_display_sleep();
if (do_exit || full_stop)
{