mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 14:31:24 +12:00
Emu: Make prevent_display_sleep dynamic
This commit is contained in:
parent
d91551c277
commit
8d2ce2815c
4 changed files with 28 additions and 9 deletions
|
@ -8,6 +8,7 @@
|
|||
#include "persistent_settings.h"
|
||||
#include "gs_frame.h"
|
||||
#include "gl_gs_frame.h"
|
||||
#include "display_sleep_control.h"
|
||||
|
||||
#ifdef WITH_DISCORD_RPC
|
||||
#include "_discord_utils.h"
|
||||
|
@ -460,6 +461,18 @@ void gui_application::OnChangeStyleSheetRequest(const QString& path)
|
|||
|
||||
void gui_application::OnEmuSettingsChange()
|
||||
{
|
||||
if (Emu.IsRunning())
|
||||
{
|
||||
if (g_cfg.misc.prevent_display_sleep)
|
||||
{
|
||||
enable_display_sleep();
|
||||
}
|
||||
else
|
||||
{
|
||||
disable_display_sleep();
|
||||
}
|
||||
}
|
||||
|
||||
Emu.ConfigureLogs();
|
||||
rsx::overlays::reset_performance_overlay();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue