mirror of https://github.com/PCSX2/pcsx2.git
onepad: reset the screen saver every 4096 Vsync
I didn't put the code in PCSX2 because it requires the display pointer. And I'm afraid of multithread issue. Related to issue #942
This commit is contained in:
parent
83d578f39a
commit
2b02a7433f
|
@ -160,6 +160,16 @@ void PollForJoystickInput(int cpad)
|
|||
|
||||
EXPORT_C_(void) PADupdate(int pad)
|
||||
{
|
||||
// Gamepad inputs don't count as an activity. Therefore screensaver will
|
||||
// be fired after a couple of minute.
|
||||
// Emulate an user activity
|
||||
static int count = 0;
|
||||
if ((count & 0xFFF) == 0) {
|
||||
// 1 call every 4096 Vsync is enough
|
||||
count++;
|
||||
XResetScreenSaver(GSdsp);
|
||||
}
|
||||
|
||||
// Actually PADupdate is always call with pad == 0. So you need to update both
|
||||
// pads -- Gregory
|
||||
for (int cpad = 0; cpad < 2; cpad++) {
|
||||
|
|
Loading…
Reference in New Issue