Mercurial > mplayer.hg
diff libvo/vo_xv.c @ 324:720c640332c8
Szebb es jobb screensaver-kikapcsolo resz
xmga, xv, x11 support (sdl comming soon)
author | laaz |
---|---|
date | Tue, 10 Apr 2001 00:00:04 +0000 |
parents | 4e69a8e2700a |
children | f6b5c2dbc88e |
line wrap: on
line diff
--- a/libvo/vo_xv.c Mon Apr 09 23:31:08 2001 +0000 +++ b/libvo/vo_xv.c Tue Apr 10 00:00:04 2001 +0000 @@ -24,7 +24,6 @@ #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/extensions/XShm.h> -#include <X11/extensions/dpms.h> #include <errno.h> #include "x11_common.h" @@ -79,9 +78,6 @@ static uint32_t drwX,drwY,drwWidth,drwHeight,drwBorderWidth,drwDepth; static uint32_t drwcX,drwcY,dwidth,dheight,mFullscreen; -static int timeout_save=0; -static int dpms_disabled=0; - /* * connect to server, create and map window, * allocate colors and (shared) memory @@ -89,7 +85,6 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format) { int screen; - int nothing, interval, prefer_blank, allow_exp; char *hello = (title == NULL) ? "Xv render" : title; char *name = ":0.0"; XSizeHints hint; @@ -204,23 +199,7 @@ fprintf( stderr,"[xv-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight ); } - if (DPMSQueryExtension(mydisplay, ¬hing, ¬hing)) - { - BOOL onoff; - CARD16 state; - DPMSInfo(mydisplay, &state, &onoff); - if (onoff) - { - dpms_disabled=1; - DPMSDisable(mydisplay); // monitor powersave off - } - } - - XGetScreenSaver(mydisplay, &timeout_save, &interval, &prefer_blank, &allow_exp); - if (timeout_save) - XSetScreenSaver(mydisplay, 0, interval, prefer_blank, allow_exp); - // switching off screensaver - + saver_off(mydisplay); // turning off screen saver return 0; } } @@ -412,25 +391,7 @@ } static void uninit(void) { - int nothing; - if (DPMSQueryExtension(mydisplay, ¬hing, ¬hing)) - { - if (dpms_disabled) - { - DPMSEnable(mydisplay); // restoring power saving settings - DPMSQueryExtension(mydisplay, ¬hing, ¬hing); - } - } - - if (timeout_save) - { - int interval, prefer_blank, allow_exp, dummy; - XGetScreenSaver(mydisplay, &dummy, &interval, &prefer_blank, &allow_exp); - XSetScreenSaver(mydisplay, timeout_save, interval, prefer_blank, allow_exp); - XGetScreenSaver(mydisplay, &timeout_save, &interval, &prefer_blank, &allow_exp); - } - - + saver_on(mydisplay); // screen saver back on }