diff options
-rw-r--r-- | libvo/x11_common.c | 8 |
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; |