summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorjkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-07-19 18:47:22 +0000
committerjkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-07-19 18:47:22 +0000
commitca79276b201d00b6533f863e6f7161f7e61e15ad (patch)
tree3e199cf4d01e8976e7b7773002fc9e4139ae7ab7 /libvo
parent5d8d55574019f203c1e0849ba64d01b99ccc6d19 (diff)
downloadmpv-ca79276b201d00b6533f863e6f7161f7e61e15ad.tar.bz2
mpv-ca79276b201d00b6533f863e6f7161f7e61e15ad.tar.xz
x11_common does not compile, when the XDPMS extension is not available on the
target system. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1346 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/x11_common.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 7bdb24a8ed..9987e4b60c 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -17,7 +17,9 @@
#include <X11/Xutil.h>
#include <X11/Xatom.h>
+#ifdef HAVE_XDPMS
#include <X11/extensions/dpms.h>
+#endif
static int dpms_disabled=0;
static int timeout_save=0;
@@ -278,6 +280,7 @@ int vo_x11_check_events(Display *mydisplay){
void saver_on(Display *mDisplay) {
+#ifdef HAVE_XDPMS
int nothing;
if (dpms_disabled)
{
@@ -298,7 +301,8 @@ void saver_on(Display *mDisplay) {
}
}
}
-
+#endif
+
if (timeout_save)
{
int dummy, interval, prefer_blank, allow_exp;
@@ -311,7 +315,9 @@ void saver_on(Display *mDisplay) {
void saver_off(Display *mDisplay) {
- int interval, prefer_blank, allow_exp, nothing;
+ int interval, prefer_blank, allow_exp;
+#ifdef HAVE_XDPMS
+ int nothing;
if (DPMSQueryExtension(mDisplay, &nothing, &nothing))
{
@@ -327,6 +333,7 @@ void saver_off(Display *mDisplay) {
printf ("stat: %d\n", stat);
}
}
+#endif
XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
if (timeout_save)
XSetScreenSaver(mDisplay, 0, interval, prefer_blank, allow_exp);