diff options
author | Roland Mainz <roland.mainz@nrubsig.org> | 2004-12-13 01:45:15 +0000 |
---|---|---|
committer | Roland Mainz <roland.mainz@nrubsig.org> | 2004-12-13 01:45:15 +0000 |
commit | fe18885917ffe8a6298ac01c7e17742dedbff33e (patch) | |
tree | 8e58f4f24fffa685ff573dd0442d4f74c92cbde9 | |
parent | ef7712f05885b5654f0fb31711b14eb2e52d7d1d (diff) |
//bugs.freedesktop.org/show_bug.cgi?id=1934) attachment #1393
(https://bugs.freedesktop.org/attachment.cgi?id=1393): Fixing
|SetDPMSTimers()| so that DPMS*Time == 0 disables the appropriate
timer. This takes advantage of the fact that |TimerSet()| with a
timeout argument 0 behaves like |TimerCanel()|. Patch by Egbert Eich
<eich@freedesktop.org>.
-rw-r--r-- | os/WaitFor.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/os/WaitFor.c b/os/WaitFor.c index 3283dd5cf..4c4628552 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -663,17 +663,11 @@ SetDPMSTimers(void) if (!DPMSEnabled) return; - if (DPMSStandbyTime > 0) { - DPMSStandbyTimer = TimerSet(DPMSStandbyTimer, 0, DPMSStandbyTime, - DPMSStandbyTimerExpire, NULL); - } - if (DPMSSuspendTime > 0) { - DPMSSuspendTimer = TimerSet(DPMSSuspendTimer, 0, DPMSSuspendTime, - DPMSSuspendTimerExpire, NULL); - } - if (DPMSOffTime > 0) { - DPMSOffTimer = TimerSet(DPMSOffTimer, 0, DPMSOffTime, - DPMSOffTimerExpire, NULL); - } + DPMSStandbyTimer = TimerSet(DPMSStandbyTimer, 0, DPMSStandbyTime, + DPMSStandbyTimerExpire, NULL); + DPMSSuspendTimer = TimerSet(DPMSSuspendTimer, 0, DPMSSuspendTime, + DPMSSuspendTimerExpire, NULL); + DPMSOffTimer = TimerSet(DPMSOffTimer, 0, DPMSOffTime, + DPMSOffTimerExpire, NULL); } #endif |