mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 15:31:26 +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
|
@ -32,6 +32,11 @@ bool display_sleep_control_supported()
|
|||
|
||||
void enable_display_sleep()
|
||||
{
|
||||
if (!display_sleep_control_supported())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
SetThreadExecutionState(ES_CONTINUOUS);
|
||||
#elif defined(__APPLE__)
|
||||
|
@ -52,6 +57,11 @@ void enable_display_sleep()
|
|||
|
||||
void disable_display_sleep()
|
||||
{
|
||||
if (!display_sleep_control_supported())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED);
|
||||
#elif defined(__APPLE__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue