summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-03-16 05:15:44 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-03-16 05:15:44 +0000
commit70305e36aecd9feed1a41e23d7d19a5bae63464b (patch)
treed6c22e066c858091635de904b4dc76bbd56288c1 /libvo
parent7fa15ed6e23da6f85773a83753b29cfaf336e25b (diff)
downloadmpv-70305e36aecd9feed1a41e23d7d19a5bae63464b.tar.bz2
mpv-70305e36aecd9feed1a41e23d7d19a5bae63464b.tar.xz
Use system clock for xscreensaver pings (Tobias Diedrich).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12032 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/x11_common.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 2a33e69bc1..e7355cf4b5 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -18,6 +18,7 @@
#include "video_out.h"
#include "aspect.h"
#include "help_mp.h"
+#include "../osdep/timer.h"
#include <X11/Xmd.h>
#include <X11/Xlib.h>
@@ -1142,14 +1143,15 @@ static Window xs_windowid = 0;
static Atom deactivate;
static Atom screensaver;
-static float time_last;
+static unsigned int time_last;
-void xscreensaver_heartbeat(float time)
+void xscreensaver_heartbeat(void)
{
+ unsigned int time = GetTimerMS();
XEvent ev;
if (mDisplay && xs_windowid &&
- ((time - time_last)>30 ||
+ ((time - time_last)>30000 ||
(time - time_last)<0)) {
time_last = time;