New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent windows from idling while playing a game with a gc controller #3985
Conversation
is this a Qt specific issue? Does this issue occur on wx? |
Whatever the current windows dolphin 5.0 release uses. It would probably happen on wx too, but I don't know. |
we use wx, so this fix would not apply. |
It needs to be added to wx as well then. I can do that real quick. |
I can confirm this occurs on WX on Windows, at least when playing exclusively with real Wiimotes... |
I amended my commit with the WX additions. I put it next to the X11 code that prevents screensaver. |
I see you tied the code to bDisableScreensaver. AFAIK this is related to the screen saving option from Wii Menu, not the actual screen saver from the host computer... |
@dolphin-emu-bot rebuild |
Ah sorry, I'll fix that, and the lint error too. |
Hope that works. |
I'm pretty sure bDisableScreensaver is actually the right thing to check... it's currently tied to the code which disables the screensaver on Windows. See also 62e790f. |
Yeah, looking at the InhibitScreensaver shows code related to linux's screensaver program so you're right. Amended again. |
Looks like I can download the binary, so I'll test it. |
Works. Played about 8 matches of melee with no problem. Went back to 5.0 and after 2 matches, windows disk defrag starts up and starts lagging the game. Testing DolphinQT now |
Doesn't work for DolphinQt2. Weird. Any ideas? |
Uh, ignore that DolphinQT binary, it's a stale build left over from another PR. |
That or Q_OS_WIN isn't defined. |
No, I'm 100% sure that's the case. Qt doesn't build on windows until #3981, and that's not merged yet. |
All right |
I've run into this issue with Real Wiimotes before, so I'm happy to see this change. |
ForceStop(); | ||
|
||
#ifdef Q_OS_WIN | ||
// Allow windows to idle or turn off display again | ||
SetThreadExecutionState(ES_CONTINUOUS); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Now the screensaver option is present in both and both will always prevent idle processes from running so people won't have to try figuring out why their game is lagging for some unknown reason. |
Fixed the lint error |
I don't have a build environment to test this and the setup for VS2015 gives me errors so if someone could take this over, I'd appreciate it. This is basically #3008 which got lost in the move to qt2, except I added a flag that prevents windows from idling. Basically, if there are no keyboard or mouse inputs for a certain amount of time, windows will enter an idle state and start running background processes which make dolphin lag pretty bad. Hopefully this code will fix this issue: https://bugs.dolphin-emu.org/issues/9655
This change is