Mercurial > mplayer.hg
changeset 741:00f97e760cbc
DPMS re-enable patch by Loring Holden
author | arpi_esp |
---|---|
date | Wed, 09 May 2001 20:15:37 +0000 |
parents | d9b08199047f |
children | 8e5f87d56ed3 |
files | libvo/x11_common.c |
diffstat | 1 files changed, 16 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/x11_common.c Wed May 09 19:24:04 2001 +0000 +++ b/libvo/x11_common.c Wed May 09 20:15:37 2001 +0000 @@ -219,9 +219,19 @@ { if (DPMSQueryExtension(mDisplay, ¬hing, ¬hing)) { - printf ("Enabling DPMS\n"); - DPMSEnable(mDisplay); // restoring power saving settings - DPMSQueryExtension(mDisplay, ¬hing, ¬hing); + if (!DPMSEnable(mDisplay)) { // restoring power saving settings + printf("DPMS not available?\n"); + } else { + // DPMS does not seem to be enabled unless we call DPMSInfo + BOOL onoff; + CARD16 state; + DPMSInfo(mDisplay, &state, &onoff); + if (onoff) { + printf ("Successfully enabled DPMS\n"); + } else { + printf ("Could not enable DPMS\n"); + } + } } } @@ -246,9 +256,11 @@ DPMSInfo(mDisplay, &state, &onoff); if (onoff) { + Status stat; printf ("Disabling DPMS\n"); dpms_disabled=1; - DPMSDisable(mDisplay); // monitor powersave off + stat = DPMSDisable(mDisplay); // monitor powersave off + printf ("stat: %d\n", stat); } } XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);