VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

I've tried using Caffeine on Windows 10, but it doesn't seem to work? I have a timeout of 15 minutes set in the Windows Power settings(set for 15 minutes) and Cafeine setup to target UniPCemu(class sdl_app) for a shift key at an interval of 2 minutes.

But after 15 minutes, Windows enters standby anyways?

Last edited by superfury on 2018-09-02, 16:38. Edited 1 time in total.

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 1 of 1, by superfury

User metadata
Rank l33t++
Rank
l33t++

I've also added a little line of code(which is enabled by the "nostandby" parameter that can be passed to the app):

			// Prevent Idle-to-Sleep (monitor not affected) (see note above)
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_AWAYMODE_REQUIRED); //Enable noSleep: we're enabled by the parameter!

It's executed within the main emulation loop(so on the same level as any SDL input and video rendering).

Anyone knows why Windows 10 is still entering standby after 15 minutes?

Some more information about this function call: https://stackoverflow.com/questions/34836406/ … tion-is-running

Edit: Modified it to:

			// Prevent Idle-to-Sleep (monitor not affected) (see note above)
SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED); //Enable noSleep: we're enabled by the parameter!

Now to wait for results...

Edit: That latest change seems to have done the trick! 😁

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io